From eb5563fe5c7a34fe98615324098cc36fe79199b9 Mon Sep 17 00:00:00 2001 From: Gil Mizrahi Date: Tue, 9 Jul 2024 13:54:53 +0300 Subject: [PATCH] Delete v3 and v4 configuration tests in favor of ndc-snapshot-metadata tests (#527) ### What The v3 and v4 configuration tests are a bit redundant because we have the ndc-snapshot-metadata tests. This PR removes them, introduces a snapshot for the current v4-config, and deletes the schema.json in each dir because they are also not used in favor of `static/schema.json`. --- Cargo.lock | 1 - crates/configuration/Cargo.toml | 1 - crates/configuration/src/version3/mod.rs | 3 - ...ion3__tests__get_configuration_schema.snap | 1506 ------ crates/configuration/src/version3/tests.rs | 79 - crates/configuration/src/version4/mod.rs | 3 - ...ion4__tests__get_configuration_schema.snap | 1564 ------- crates/configuration/src/version4/tests.rs | 79 - .../v4-chinook-ndc-metadata/schema.json | 1387 ------ .../citus/v4-chinook-ndc-metadata/schema.json | 1387 ------ .../v4-chinook-ndc-metadata/schema.json | 1387 ------ .../configuration.json | 4043 +++++++++++++++++ .../summarize_organizations.sql | 22 + .../v4-chinook-ndc-metadata/schema.json | 1387 ------ static/schema.json | 8 + .../v4-chinook-ndc-metadata/schema.json | 1387 ------ 16 files changed, 4073 insertions(+), 10171 deletions(-) delete mode 100644 crates/configuration/src/version3/snapshots/ndc_postgres_configuration__version3__tests__get_configuration_schema.snap delete mode 100644 crates/configuration/src/version3/tests.rs delete mode 100644 crates/configuration/src/version4/snapshots/ndc_postgres_configuration__version4__tests__get_configuration_schema.snap delete mode 100644 crates/configuration/src/version4/tests.rs delete mode 100644 static/aurora/v4-chinook-ndc-metadata/schema.json delete mode 100644 static/citus/v4-chinook-ndc-metadata/schema.json delete mode 100644 static/cockroach/v4-chinook-ndc-metadata/schema.json create mode 100644 static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/configuration.json create mode 100644 static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/native_queries/summarize_organizations.sql delete mode 100644 static/postgres/v4-chinook-ndc-metadata/schema.json delete mode 100644 static/yugabyte/v4-chinook-ndc-metadata/schema.json diff --git a/Cargo.lock b/Cargo.lock index 56fff9e6f..6fed1dd26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1483,7 +1483,6 @@ version = "0.8.0" dependencies = [ "anyhow", "clap", - "insta", "jsonschema", "prometheus", "query-engine-metadata", diff --git a/crates/configuration/Cargo.toml b/crates/configuration/Cargo.toml index 991ace7f3..0a7c26fcf 100644 --- a/crates/configuration/Cargo.toml +++ b/crates/configuration/Cargo.toml @@ -24,5 +24,4 @@ tokio = { workspace = true, features = ["full"] } tracing = { workspace = true } [dev-dependencies] -insta = { workspace = true, features = ["json"] } jsonschema = { workspace = true } diff --git a/crates/configuration/src/version3/mod.rs b/crates/configuration/src/version3/mod.rs index f286a9e27..9ccd28650 100644 --- a/crates/configuration/src/version3/mod.rs +++ b/crates/configuration/src/version3/mod.rs @@ -25,9 +25,6 @@ use crate::error::{ use crate::values::{ConnectionUri, Secret}; use crate::VersionTag; -#[cfg(test)] -mod tests; - const CONFIGURATION_FILENAME: &str = "configuration.json"; const CONFIGURATION_JSONSCHEMA_FILENAME: &str = "schema.json"; const CONFIGURATION_QUERY: &str = include_str!("version3.sql"); diff --git a/crates/configuration/src/version3/snapshots/ndc_postgres_configuration__version3__tests__get_configuration_schema.snap b/crates/configuration/src/version3/snapshots/ndc_postgres_configuration__version3__tests__get_configuration_schema.snap deleted file mode 100644 index 6d58e95b9..000000000 --- a/crates/configuration/src/version3/snapshots/ndc_postgres_configuration__version3__tests__get_configuration_schema.snap +++ /dev/null @@ -1,1506 +0,0 @@ ---- -source: crates/configuration/src/version3/tests.rs -expression: schema ---- -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RawConfiguration", - "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "$ref": "#/definitions/Version" - }, - "$schema": { - "description": "Jsonschema of the configuration format.", - "default": null, - "type": [ - "string", - "null" - ] - }, - "connectionSettings": { - "description": "Database connection settings.", - "default": { - "connectionUri": { - "variable": "CONNECTION_URI" - }, - "poolSettings": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "isolationLevel": "ReadCommitted" - }, - "allOf": [ - { - "$ref": "#/definitions/DatabaseConnectionSettings" - } - ] - }, - "metadata": { - "description": "Connector metadata.", - "default": { - "tables": {}, - "compositeTypes": {}, - "nativeQueries": {}, - "aggregateFunctions": {}, - "comparisonOperators": {}, - "typeRepresentations": {} - }, - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, - "introspectionOptions": { - "description": "Database introspection options.", - "default": { - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "unqualifiedSchemasForTables": [ - "public" - ], - "unqualifiedSchemasForTypesAndProcedures": [ - "public", - "pg_catalog", - "tiger", - "auth", - "pgsodium" - ], - "comparisonOperatorMapping": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "<>", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "introspectPrefixFunctionComparisonOperators": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ] - }, - "allOf": [ - { - "$ref": "#/definitions/IntrospectionOptions" - } - ] - }, - "mutationsVersion": { - "description": "Which version of the generated mutation procedures to include in the schema response", - "default": null, - "anyOf": [ - { - "$ref": "#/definitions/MutationsVersion" - }, - { - "type": "null" - } - ] - } - }, - "definitions": { - "Version": { - "type": "string", - "enum": [ - "3" - ] - }, - "DatabaseConnectionSettings": { - "description": "Database connection settings.", - "type": "object", - "required": [ - "connectionUri" - ], - "properties": { - "connectionUri": { - "description": "Connection string for a Postgres-compatible database.", - "allOf": [ - { - "$ref": "#/definitions/ConnectionUri" - } - ] - }, - "poolSettings": { - "description": "Connection pool settings.", - "default": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "allOf": [ - { - "$ref": "#/definitions/PoolSettings" - } - ] - }, - "isolationLevel": { - "description": "Query isolation level.", - "default": "ReadCommitted", - "allOf": [ - { - "$ref": "#/definitions/IsolationLevel" - } - ] - } - } - }, - "ConnectionUri": { - "$ref": "#/definitions/Secret" - }, - "Secret": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": [ - "variable" - ], - "properties": { - "variable": { - "$ref": "#/definitions/Variable" - } - } - } - ] - }, - "Variable": { - "description": "The name of an an environment variable.", - "type": "string" - }, - "PoolSettings": { - "description": "Settings for the PostgreSQL connection pool", - "type": "object", - "properties": { - "maxConnections": { - "description": "maximum number of pool connections", - "default": 50, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "poolTimeout": { - "description": "timeout for acquiring a connection from the pool (seconds)", - "default": 30, - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "idleTimeout": { - "description": "idle timeout for releasing a connection from the pool (seconds)", - "default": 180, - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "checkConnectionAfterIdle": { - "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", - "default": 60, - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "connectionLifetime": { - "description": "maximum lifetime for an individual connection (seconds)", - "default": 600, - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - } - }, - "IsolationLevel": { - "description": "The isolation level of the transaction in which a query is executed.", - "oneOf": [ - { - "description": "Prevents reading data from another uncommitted transaction.", - "type": "string", - "enum": [ - "ReadCommitted" - ] - }, - { - "description": "Reading the same data twice is guaranteed to return the same result.", - "type": "string", - "enum": [ - "RepeatableRead" - ] - }, - { - "description": "Concurrent transactions behave identically to serializing them one at a time.", - "type": "string", - "enum": [ - "Serializable" - ] - } - ] - }, - "Metadata": { - "description": "Metadata information.", - "type": "object", - "properties": { - "tables": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TablesInfo" - } - ] - }, - "compositeTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/CompositeTypes" - } - ] - }, - "nativeQueries": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/NativeQueries" - } - ] - }, - "aggregateFunctions": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/AggregateFunctions" - } - ] - }, - "comparisonOperators": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ComparisonOperators" - } - ] - }, - "typeRepresentations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TypeRepresentations" - } - ] - } - } - }, - "TablesInfo": { - "description": "Mapping from a \"table\" name to its information.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TableInfo" - } - }, - "TableInfo": { - "description": "Information about a database table (or any other kind of relation).", - "type": "object", - "required": [ - "columns", - "schemaName", - "tableName" - ], - "properties": { - "schemaName": { - "type": "string" - }, - "tableName": { - "type": "string" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ColumnInfo" - } - }, - "uniquenessConstraints": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/UniquenessConstraints" - } - ] - }, - "foreignRelations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ForeignRelations" - } - ] - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "ColumnInfo": { - "description": "Information about a database column.", - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "hasDefault": { - "$ref": "#/definitions/HasDefault" - }, - "isIdentity": { - "$ref": "#/definitions/IsIdentity" - }, - "isGenerated": { - "$ref": "#/definitions/IsGenerated" - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "Type": { - "description": "The type of values that a column, field, or argument may take.", - "oneOf": [ - { - "type": "object", - "required": [ - "scalarType" - ], - "properties": { - "scalarType": { - "$ref": "#/definitions/ScalarType" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "compositeType" - ], - "properties": { - "compositeType": { - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "arrayType" - ], - "properties": { - "arrayType": { - "$ref": "#/definitions/Type" - } - }, - "additionalProperties": false - } - ] - }, - "ScalarType": { - "description": "A Scalar Type.", - "type": "string" - }, - "Nullable": { - "description": "Can this column contain null values", - "type": "string", - "enum": [ - "nullable", - "nonNullable" - ] - }, - "HasDefault": { - "description": "Does this column have a default value.", - "type": "string", - "enum": [ - "noDefault", - "hasDefault" - ] - }, - "IsIdentity": { - "description": "Is this column an identity column.", - "type": "string", - "enum": [ - "notIdentity", - "identityByDefault", - "identityAlways" - ] - }, - "IsGenerated": { - "description": "Is this column a generated column.", - "type": "string", - "enum": [ - "notGenerated", - "stored" - ] - }, - "UniquenessConstraints": { - "description": "A mapping from the name of a unique constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UniquenessConstraint" - } - }, - "UniquenessConstraint": { - "description": "The set of columns that make up a uniqueness constraint.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "ForeignRelations": { - "description": "A mapping from the name of a foreign key constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ForeignRelation" - } - }, - "ForeignRelation": { - "description": "A foreign key constraint.", - "type": "object", - "required": [ - "columnMapping", - "foreignTable" - ], - "properties": { - "foreignSchema": { - "type": [ - "string", - "null" - ] - }, - "foreignTable": { - "type": "string" - }, - "columnMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "CompositeTypes": { - "description": "Map of all known composite types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CompositeType" - } - }, - "CompositeType": { - "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", - "type": "object", - "required": [ - "fields", - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/FieldInfo" - } - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "FieldInfo": { - "description": "Information about a composite type field.", - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "NativeQueries": { - "description": "Metadata information of native queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NativeQueryInfo" - } - }, - "NativeQueryInfo": { - "description": "Information about a Native Query", - "type": "object", - "required": [ - "columns", - "sql" - ], - "properties": { - "sql": { - "description": "SQL expression to use for the Native Query. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", - "allOf": [ - { - "$ref": "#/definitions/NativeQuerySql" - } - ] - }, - "columns": { - "description": "Columns returned by the Native Query", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "arguments": { - "description": "Names and types of arguments that can be passed to this Native Query", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "isProcedure": { - "description": "True if this native query mutates the database", - "type": "boolean" - } - } - }, - "NativeQuerySql": { - "description": "Native Query SQL location.", - "anyOf": [ - { - "description": "Refer to an external Native Query SQL file.", - "type": "object", - "required": [ - "file" - ], - "properties": { - "file": { - "description": "Relative path to a sql file.", - "type": "string" - } - } - }, - { - "description": "Inline Native Query SQL string.", - "type": "object", - "required": [ - "inline" - ], - "properties": { - "inline": { - "description": "An inline Native Query SQL string.", - "allOf": [ - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - } - } - }, - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - }, - "InlineNativeQuerySql": { - "type": "string" - }, - "ReadOnlyColumnInfo": { - "description": "Information about a native query column.", - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "AggregateFunctions": { - "description": "All supported aggregate functions, grouped by type.", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AggregateFunction" - } - } - }, - "AggregateFunction": { - "type": "object", - "required": [ - "returnType" - ], - "properties": { - "returnType": { - "$ref": "#/definitions/ScalarType" - } - } - }, - "ComparisonOperators": { - "description": "The complete list of supported binary operators for scalar types. Not all of these are supported for every type.", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ComparisonOperator" - } - } - }, - "ComparisonOperator": { - "description": "Represents a postgres binary comparison operator", - "type": "object", - "required": [ - "argumentType", - "operatorKind", - "operatorName" - ], - "properties": { - "operatorName": { - "type": "string" - }, - "operatorKind": { - "$ref": "#/definitions/OperatorKind" - }, - "argumentType": { - "$ref": "#/definitions/ScalarType" - }, - "isInfix": { - "default": true, - "type": "boolean" - } - } - }, - "OperatorKind": { - "description": "Is it a built-in operator, or a custom operator.", - "type": "string", - "enum": [ - "equal", - "in", - "custom" - ] - }, - "TypeRepresentations": { - "description": "Type representation of scalar types, grouped by type.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TypeRepresentation" - } - }, - "TypeRepresentation": { - "description": "Type representation of a scalar type.", - "oneOf": [ - { - "description": "JSON booleans", - "type": "string", - "enum": [ - "boolean" - ] - }, - { - "description": "Any JSON string", - "type": "string", - "enum": [ - "string" - ] - }, - { - "description": "float4", - "type": "string", - "enum": [ - "float32" - ] - }, - { - "description": "float8", - "type": "string", - "enum": [ - "float64" - ] - }, - { - "description": "int2", - "type": "string", - "enum": [ - "int16" - ] - }, - { - "description": "int4", - "type": "string", - "enum": [ - "int32" - ] - }, - { - "description": "int8 as integer", - "type": "string", - "enum": [ - "int64" - ] - }, - { - "description": "int8 as string", - "type": "string", - "enum": [ - "int64AsString" - ] - }, - { - "description": "numeric", - "type": "string", - "enum": [ - "bigDecimal" - ] - }, - { - "description": "numeric as string", - "type": "string", - "enum": [ - "bigDecimalAsString" - ] - }, - { - "description": "timestamp", - "type": "string", - "enum": [ - "timestamp" - ] - }, - { - "description": "timestamp with timezone", - "type": "string", - "enum": [ - "timestamptz" - ] - }, - { - "description": "time", - "type": "string", - "enum": [ - "time" - ] - }, - { - "description": "time with timezone", - "type": "string", - "enum": [ - "timetz" - ] - }, - { - "description": "date", - "type": "string", - "enum": [ - "date" - ] - }, - { - "description": "uuid", - "type": "string", - "enum": [ - "uUID" - ] - }, - { - "description": "geography", - "type": "string", - "enum": [ - "geography" - ] - }, - { - "description": "geometry", - "type": "string", - "enum": [ - "geometry" - ] - }, - { - "description": "Any JSON number", - "type": "string", - "enum": [ - "number" - ] - }, - { - "description": "Any JSON number, with no decimal part", - "type": "string", - "enum": [ - "integer" - ] - }, - { - "description": "An arbitrary json.", - "type": "string", - "enum": [ - "json" - ] - }, - { - "description": "One of the specified string values", - "type": "object", - "required": [ - "enum" - ], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - ] - }, - "IntrospectionOptions": { - "description": "Options which only influence how the configuration is updated.", - "type": "object", - "properties": { - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTables": { - "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", - "default": [ - "public" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTypesAndProcedures": { - "description": "The types and procedures in these schemas will be returned unqualified.", - "default": [ - "public", - "pg_catalog", - "tiger", - "auth", - "pgsodium" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "comparisonOperatorMapping": { - "description": "The mapping of comparison operator names to apply when updating the configuration", - "default": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "<>", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "type": "array", - "items": { - "$ref": "#/definitions/ComparisonOperatorMapping" - } - }, - "introspectPrefixFunctionComparisonOperators": { - "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", - "default": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ComparisonOperatorMapping": { - "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", - "type": "object", - "required": [ - "exposedName", - "operatorKind", - "operatorName" - ], - "properties": { - "operatorName": { - "description": "The name of the operator as defined by the database", - "type": "string" - }, - "exposedName": { - "description": "The name the operator will appear under in the exposed API", - "type": "string" - }, - "operatorKind": { - "description": "Equal, In or Custom.", - "allOf": [ - { - "$ref": "#/definitions/OperatorKind" - } - ] - } - } - }, - "MutationsVersion": { - "description": "Which version of the generated mutations will be included in the schema", - "type": "string", - "enum": [ - "v1" - ] - } - } -} diff --git a/crates/configuration/src/version3/tests.rs b/crates/configuration/src/version3/tests.rs deleted file mode 100644 index 51cf46aeb..000000000 --- a/crates/configuration/src/version3/tests.rs +++ /dev/null @@ -1,79 +0,0 @@ -//! Tests that configuration generation has not changed. -//! -//! If you have changed it intentionally, run `just generate-configuration`. -//! -//! The github CI setup runs these tests subject to the filtering logic in -//! '.github/test-configuration.json'. Naming a test with the prefix 'postgres_current_only` will -//! ensure they only run on the latest version of postgres being tested. This is necessary because -//! they rely on supporting data (the chinook NDC metadata configuration) which we maintain only for -//! the latest version. - -#![cfg(test)] - -use crate::version3::RawConfiguration; -use std::path::Path; - -use crate::common; - -mod postgres { - pub(super) const CHINOOK_NDC_METADATA_PATH: &str = "static/postgres/v3-chinook-ndc-metadata"; -} - -mod citus { - pub(super) const CHINOOK_NDC_METADATA_PATH: &str = "static/citus/v3-chinook-ndc-metadata"; -} - -mod cockroach { - pub(super) const CHINOOK_NDC_METADATA_PATH: &str = "static/cockroach/v3-chinook-ndc-metadata"; -} - -#[tokio::test] -async fn get_configuration_schema() { - let schema = schemars::schema_for!(RawConfiguration); - insta::assert_json_snapshot!(schema); -} - -// version 3 tests - -#[tokio::test] -async fn postgres_configuration_v3_conforms_to_the_schema() { - configuration_conforms_to_the_schema(postgres::CHINOOK_NDC_METADATA_PATH) - .await - .unwrap(); -} - -#[tokio::test] -async fn citus_configuration_v3_conforms_to_the_schema() { - configuration_conforms_to_the_schema(citus::CHINOOK_NDC_METADATA_PATH) - .await - .unwrap(); -} - -#[tokio::test] -async fn cockroach_configuration_v3_conforms_to_the_schema() { - configuration_conforms_to_the_schema(cockroach::CHINOOK_NDC_METADATA_PATH) - .await - .unwrap(); -} - -async fn configuration_conforms_to_the_schema( - chinook_ndc_metadata_path: impl AsRef, -) -> anyhow::Result<()> { - common::check_value_conforms_to_schema::( - &read_configuration(chinook_ndc_metadata_path).await?, - ); - Ok(()) -} - -async fn read_configuration( - chinook_ndc_metadata_path: impl AsRef, -) -> anyhow::Result { - let absolute_configuration_directory = - common::get_path_from_project_root(chinook_ndc_metadata_path); - - let contents = - tokio::fs::read_to_string(absolute_configuration_directory.join("configuration.json")) - .await?; - - Ok(serde_json::from_str(&contents)?) -} diff --git a/crates/configuration/src/version4/mod.rs b/crates/configuration/src/version4/mod.rs index 4eccf776a..d056e9883 100644 --- a/crates/configuration/src/version4/mod.rs +++ b/crates/configuration/src/version4/mod.rs @@ -27,9 +27,6 @@ use crate::environment::Environment; use crate::error::{ParseConfigurationError, WriteParsedConfigurationError}; use crate::values::{ConnectionUri, Secret}; -#[cfg(test)] -mod tests; - const CONFIGURATION_FILENAME: &str = "configuration.json"; const CONFIGURATION_JSONSCHEMA_FILENAME: &str = "schema.json"; const CONFIGURATION_QUERY: &str = include_str!("introspection.sql"); diff --git a/crates/configuration/src/version4/snapshots/ndc_postgres_configuration__version4__tests__get_configuration_schema.snap b/crates/configuration/src/version4/snapshots/ndc_postgres_configuration__version4__tests__get_configuration_schema.snap deleted file mode 100644 index cc6d1730c..000000000 --- a/crates/configuration/src/version4/snapshots/ndc_postgres_configuration__version4__tests__get_configuration_schema.snap +++ /dev/null @@ -1,1564 +0,0 @@ ---- -source: crates/configuration/src/version4/tests.rs -expression: schema ---- -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ParsedConfiguration", - "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "$ref": "#/definitions/Version" - }, - "$schema": { - "description": "Jsonschema of the configuration format.", - "default": null, - "type": [ - "string", - "null" - ] - }, - "connectionSettings": { - "description": "Database connection settings.", - "default": { - "connectionUri": { - "variable": "CONNECTION_URI" - }, - "poolSettings": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "isolationLevel": "ReadCommitted" - }, - "allOf": [ - { - "$ref": "#/definitions/DatabaseConnectionSettings" - } - ] - }, - "metadata": { - "description": "Connector metadata.", - "default": { - "tables": {}, - "scalarTypes": {}, - "compositeTypes": {}, - "nativeQueries": {} - }, - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, - "introspectionOptions": { - "description": "Database introspection options.", - "default": { - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "unqualifiedSchemasForTables": [ - "public" - ], - "unqualifiedSchemasForTypesAndProcedures": [ - "public", - "pg_catalog", - "tiger" - ], - "comparisonOperatorMapping": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "introspectPrefixFunctionComparisonOperators": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "typeRepresentations": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - } - }, - "allOf": [ - { - "$ref": "#/definitions/IntrospectionOptions" - } - ] - }, - "mutationsVersion": { - "description": "Which version of the generated mutation procedures to include in the schema response", - "default": null, - "anyOf": [ - { - "$ref": "#/definitions/MutationsVersion" - }, - { - "type": "null" - } - ] - } - }, - "definitions": { - "Version": { - "type": "string", - "enum": [ - "4" - ] - }, - "DatabaseConnectionSettings": { - "description": "Database connection settings.", - "type": "object", - "required": [ - "connectionUri" - ], - "properties": { - "connectionUri": { - "description": "Connection string for a Postgres-compatible database.", - "allOf": [ - { - "$ref": "#/definitions/ConnectionUri" - } - ] - }, - "poolSettings": { - "description": "Connection pool settings.", - "default": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "allOf": [ - { - "$ref": "#/definitions/PoolSettings" - } - ] - }, - "isolationLevel": { - "description": "Query isolation level.", - "default": "ReadCommitted", - "allOf": [ - { - "$ref": "#/definitions/IsolationLevel" - } - ] - } - } - }, - "ConnectionUri": { - "$ref": "#/definitions/Secret" - }, - "Secret": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": [ - "variable" - ], - "properties": { - "variable": { - "$ref": "#/definitions/Variable" - } - } - } - ] - }, - "Variable": { - "description": "The name of an an environment variable.", - "type": "string" - }, - "PoolSettings": { - "description": "Settings for the PostgreSQL connection pool", - "type": "object", - "properties": { - "maxConnections": { - "description": "maximum number of pool connections", - "default": 50, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "poolTimeout": { - "description": "timeout for acquiring a connection from the pool (seconds)", - "default": 30, - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "idleTimeout": { - "description": "idle timeout for releasing a connection from the pool (seconds)", - "default": 180, - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "checkConnectionAfterIdle": { - "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", - "default": 60, - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "connectionLifetime": { - "description": "maximum lifetime for an individual connection (seconds)", - "default": 600, - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - } - }, - "IsolationLevel": { - "description": "The isolation level of the transaction in which a query is executed.", - "oneOf": [ - { - "description": "Prevents reading data from another uncommitted transaction.", - "type": "string", - "enum": [ - "ReadCommitted" - ] - }, - { - "description": "Reading the same data twice is guaranteed to return the same result.", - "type": "string", - "enum": [ - "RepeatableRead" - ] - }, - { - "description": "Concurrent transactions behave identically to serializing them one at a time.", - "type": "string", - "enum": [ - "Serializable" - ] - } - ] - }, - "Metadata": { - "description": "Metadata information.", - "type": "object", - "properties": { - "tables": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TablesInfo" - } - ] - }, - "scalarTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ScalarTypes" - } - ] - }, - "compositeTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/CompositeTypes" - } - ] - }, - "nativeQueries": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/NativeQueries" - } - ] - } - } - }, - "TablesInfo": { - "description": "Mapping from a \"table\" name to its information.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TableInfo" - } - }, - "TableInfo": { - "description": "Information about a database table (or any other kind of relation).", - "type": "object", - "required": [ - "columns", - "schemaName", - "tableName" - ], - "properties": { - "schemaName": { - "type": "string" - }, - "tableName": { - "type": "string" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ColumnInfo" - } - }, - "uniquenessConstraints": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/UniquenessConstraints" - } - ] - }, - "foreignRelations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ForeignRelations" - } - ] - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "ColumnInfo": { - "description": "Information about a database column.", - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "hasDefault": { - "$ref": "#/definitions/HasDefault" - }, - "isIdentity": { - "$ref": "#/definitions/IsIdentity" - }, - "isGenerated": { - "$ref": "#/definitions/IsGenerated" - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "Type": { - "description": "The type of values that a column, field, or argument may take.", - "oneOf": [ - { - "type": "object", - "required": [ - "scalarType" - ], - "properties": { - "scalarType": { - "$ref": "#/definitions/ScalarTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "compositeType" - ], - "properties": { - "compositeType": { - "$ref": "#/definitions/CompositeTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "arrayType" - ], - "properties": { - "arrayType": { - "$ref": "#/definitions/Type" - } - }, - "additionalProperties": false - } - ] - }, - "ScalarTypeName": { - "description": "A name of a Scalar Type, as it appears in the NDC scheme.", - "type": "string" - }, - "CompositeTypeName": { - "description": "The name of a Composite Type, as it appears in the NDC schema", - "type": "string" - }, - "Nullable": { - "description": "Can this column contain null values", - "type": "string", - "enum": [ - "nullable", - "nonNullable" - ] - }, - "HasDefault": { - "description": "Does this column have a default value.", - "type": "string", - "enum": [ - "noDefault", - "hasDefault" - ] - }, - "IsIdentity": { - "description": "Is this column an identity column.", - "type": "string", - "enum": [ - "notIdentity", - "identityByDefault", - "identityAlways" - ] - }, - "IsGenerated": { - "description": "Is this column a generated column.", - "type": "string", - "enum": [ - "notGenerated", - "stored" - ] - }, - "UniquenessConstraints": { - "description": "A mapping from the name of a unique constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UniquenessConstraint" - } - }, - "UniquenessConstraint": { - "description": "The set of columns that make up a uniqueness constraint.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "ForeignRelations": { - "description": "A mapping from the name of a foreign key constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ForeignRelation" - } - }, - "ForeignRelation": { - "description": "A foreign key constraint.", - "type": "object", - "required": [ - "columnMapping", - "foreignTable" - ], - "properties": { - "foreignSchema": { - "type": [ - "string", - "null" - ] - }, - "foreignTable": { - "type": "string" - }, - "columnMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ScalarTypes": { - "description": "Map of all known/occurring scalar types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ScalarType" - } - }, - "ScalarType": { - "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", - "type": "object", - "required": [ - "aggregateFunctions", - "comparisonOperators", - "schemaName", - "typeName" - ], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "aggregateFunctions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AggregateFunction" - } - }, - "comparisonOperators": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ComparisonOperator" - } - }, - "typeRepresentation": { - "anyOf": [ - { - "$ref": "#/definitions/TypeRepresentation" - }, - { - "type": "null" - } - ] - } - } - }, - "AggregateFunction": { - "type": "object", - "required": [ - "returnType" - ], - "properties": { - "returnType": { - "$ref": "#/definitions/ScalarTypeName" - } - } - }, - "ComparisonOperator": { - "description": "Represents a postgres binary comparison operator", - "type": "object", - "required": [ - "argumentType", - "operatorKind", - "operatorName" - ], - "properties": { - "operatorName": { - "type": "string" - }, - "operatorKind": { - "$ref": "#/definitions/OperatorKind" - }, - "argumentType": { - "$ref": "#/definitions/ScalarTypeName" - }, - "isInfix": { - "default": true, - "type": "boolean" - } - } - }, - "OperatorKind": { - "description": "Is it a built-in operator, or a custom operator.", - "type": "string", - "enum": [ - "equal", - "in", - "custom" - ] - }, - "TypeRepresentation": { - "description": "Type representation of a scalar type.", - "oneOf": [ - { - "description": "JSON booleans", - "type": "string", - "enum": [ - "boolean" - ] - }, - { - "description": "Any JSON string", - "type": "string", - "enum": [ - "string" - ] - }, - { - "description": "float4", - "type": "string", - "enum": [ - "float32" - ] - }, - { - "description": "float8", - "type": "string", - "enum": [ - "float64" - ] - }, - { - "description": "int2", - "type": "string", - "enum": [ - "int16" - ] - }, - { - "description": "int4", - "type": "string", - "enum": [ - "int32" - ] - }, - { - "description": "int8 as integer", - "type": "string", - "enum": [ - "int64" - ] - }, - { - "description": "int8 as string", - "type": "string", - "enum": [ - "int64AsString" - ] - }, - { - "description": "numeric", - "type": "string", - "enum": [ - "bigDecimal" - ] - }, - { - "description": "numeric as string", - "type": "string", - "enum": [ - "bigDecimalAsString" - ] - }, - { - "description": "timestamp", - "type": "string", - "enum": [ - "timestamp" - ] - }, - { - "description": "timestamp with timezone", - "type": "string", - "enum": [ - "timestamptz" - ] - }, - { - "description": "time", - "type": "string", - "enum": [ - "time" - ] - }, - { - "description": "time with timezone", - "type": "string", - "enum": [ - "timetz" - ] - }, - { - "description": "date", - "type": "string", - "enum": [ - "date" - ] - }, - { - "description": "uuid", - "type": "string", - "enum": [ - "uUID" - ] - }, - { - "description": "geography", - "type": "string", - "enum": [ - "geography" - ] - }, - { - "description": "geometry", - "type": "string", - "enum": [ - "geometry" - ] - }, - { - "description": "Any JSON number", - "type": "string", - "enum": [ - "number" - ] - }, - { - "description": "Any JSON number, with no decimal part", - "type": "string", - "enum": [ - "integer" - ] - }, - { - "description": "An arbitrary json.", - "type": "string", - "enum": [ - "json" - ] - }, - { - "description": "One of the specified string values", - "type": "object", - "required": [ - "enum" - ], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - ] - }, - "CompositeTypes": { - "description": "Map of all known composite types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CompositeType" - } - }, - "CompositeType": { - "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", - "type": "object", - "required": [ - "fields", - "schemaName", - "typeName" - ], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/FieldInfo" - } - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "FieldInfo": { - "description": "Information about a composite type field.", - "type": "object", - "required": [ - "fieldName", - "type" - ], - "properties": { - "fieldName": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "NativeQueries": { - "description": "Metadata information of native queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NativeQueryInfo" - } - }, - "NativeQueryInfo": { - "description": "Information about a Native Query", - "type": "object", - "required": [ - "columns", - "sql" - ], - "properties": { - "sql": { - "description": "SQL expression to use for the Native Query. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", - "allOf": [ - { - "$ref": "#/definitions/NativeQuerySql" - } - ] - }, - "columns": { - "description": "Columns returned by the Native Query", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "arguments": { - "description": "Names and types of arguments that can be passed to this Native Query", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "isProcedure": { - "description": "True if this native query mutates the database", - "type": "boolean" - } - } - }, - "NativeQuerySql": { - "description": "Native Query SQL location.", - "anyOf": [ - { - "description": "Refer to an external Native Query SQL file.", - "type": "object", - "required": [ - "file" - ], - "properties": { - "file": { - "description": "Relative path to a sql file.", - "type": "string" - } - } - }, - { - "description": "Inline Native Query SQL string.", - "type": "object", - "required": [ - "inline" - ], - "properties": { - "inline": { - "description": "An inline Native Query SQL string.", - "allOf": [ - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - } - } - }, - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - }, - "InlineNativeQuerySql": { - "type": "string" - }, - "ReadOnlyColumnInfo": { - "description": "Information about a native query column.", - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "description": { - "default": null, - "type": [ - "string", - "null" - ] - } - } - }, - "IntrospectionOptions": { - "description": "Options which only influence how the configuration is updated.", - "type": "object", - "properties": { - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTables": { - "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", - "default": [ - "public" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTypesAndProcedures": { - "description": "The types and procedures in these schemas will be returned unqualified.", - "default": [ - "public", - "pg_catalog", - "tiger" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "comparisonOperatorMapping": { - "description": "The mapping of comparison operator names to apply when updating the configuration", - "default": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "type": "array", - "items": { - "$ref": "#/definitions/ComparisonOperatorMapping" - } - }, - "introspectPrefixFunctionComparisonOperators": { - "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", - "default": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "typeRepresentations": { - "description": "The type representations to pick for base scalar types.", - "default": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - }, - "allOf": [ - { - "$ref": "#/definitions/TypeRepresentations" - } - ] - } - } - }, - "ComparisonOperatorMapping": { - "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", - "type": "object", - "required": [ - "exposedName", - "operatorKind", - "operatorName" - ], - "properties": { - "operatorName": { - "description": "The name of the operator as defined by the database", - "type": "string" - }, - "exposedName": { - "description": "The name the operator will appear under in the exposed API", - "type": "string" - }, - "operatorKind": { - "description": "Equal, In or Custom.", - "allOf": [ - { - "$ref": "#/definitions/OperatorKind" - } - ] - } - } - }, - "TypeRepresentations": { - "description": "The type representations that guide introspection.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TypeRepresentation" - } - }, - "MutationsVersion": { - "description": "Which version of the generated mutations will be included in the schema", - "type": "string", - "enum": [ - "v1", - "v2" - ] - } - } -} diff --git a/crates/configuration/src/version4/tests.rs b/crates/configuration/src/version4/tests.rs deleted file mode 100644 index 7bcb0140b..000000000 --- a/crates/configuration/src/version4/tests.rs +++ /dev/null @@ -1,79 +0,0 @@ -//! Tests that configuration generation has not changed. -//! -//! If you have changed it intentionally, run `just generate-configuration`. -//! -//! The github CI setup runs these tests subject to the filtering logic in -//! '.github/test-configuration.json'. Naming a test with the prefix 'postgres_current_only` will -//! ensure they only run on the latest version of postgres being tested. This is necessary because -//! they rely on supporting data (the chinook NDC metadata configuration) which we maintain only for -//! the latest version. - -#![cfg(test)] - -use crate::version4::ParsedConfiguration; -use std::path::Path; - -use crate::common; - -mod postgres { - pub(super) const CHINOOK_NDC_METADATA_PATH: &str = "static/postgres/v4-chinook-ndc-metadata"; -} - -mod citus { - pub(super) const CHINOOK_NDC_METADATA_PATH: &str = "static/citus/v4-chinook-ndc-metadata"; -} - -mod cockroach { - pub(super) const CHINOOK_NDC_METADATA_PATH: &str = "static/cockroach/v4-chinook-ndc-metadata"; -} - -#[tokio::test] -async fn get_configuration_schema() { - let schema = schemars::schema_for!(ParsedConfiguration); - insta::assert_json_snapshot!(schema); -} - -// version 3 tests - -#[tokio::test] -async fn postgres_configuration_v3_conforms_to_the_schema() { - configuration_conforms_to_the_schema(postgres::CHINOOK_NDC_METADATA_PATH) - .await - .unwrap(); -} - -#[tokio::test] -async fn citus_configuration_v3_conforms_to_the_schema() { - configuration_conforms_to_the_schema(citus::CHINOOK_NDC_METADATA_PATH) - .await - .unwrap(); -} - -#[tokio::test] -async fn cockroach_configuration_v3_conforms_to_the_schema() { - configuration_conforms_to_the_schema(cockroach::CHINOOK_NDC_METADATA_PATH) - .await - .unwrap(); -} - -async fn configuration_conforms_to_the_schema( - chinook_ndc_metadata_path: impl AsRef, -) -> anyhow::Result<()> { - common::check_value_conforms_to_schema::( - &read_configuration(chinook_ndc_metadata_path).await?, - ); - Ok(()) -} - -async fn read_configuration( - chinook_ndc_metadata_path: impl AsRef, -) -> anyhow::Result { - let absolute_configuration_directory = - common::get_path_from_project_root(chinook_ndc_metadata_path); - - let contents = - tokio::fs::read_to_string(absolute_configuration_directory.join("configuration.json")) - .await?; - - Ok(serde_json::from_str(&contents)?) -} diff --git a/static/aurora/v4-chinook-ndc-metadata/schema.json b/static/aurora/v4-chinook-ndc-metadata/schema.json deleted file mode 100644 index 787e63813..000000000 --- a/static/aurora/v4-chinook-ndc-metadata/schema.json +++ /dev/null @@ -1,1387 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ParsedConfiguration", - "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", - "type": "object", - "required": ["version"], - "properties": { - "version": { - "$ref": "#/definitions/Version" - }, - "$schema": { - "description": "Jsonschema of the configuration format.", - "type": ["string", "null"] - }, - "connectionSettings": { - "description": "Database connection settings.", - "default": { - "connectionUri": { - "variable": "CONNECTION_URI" - }, - "poolSettings": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "isolationLevel": "ReadCommitted" - }, - "allOf": [ - { - "$ref": "#/definitions/DatabaseConnectionSettings" - } - ] - }, - "metadata": { - "description": "Connector metadata.", - "default": { - "tables": {}, - "scalarTypes": {}, - "compositeTypes": {}, - "nativeQueries": {} - }, - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, - "introspectionOptions": { - "description": "Database introspection options.", - "default": { - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "unqualifiedSchemasForTables": ["public"], - "unqualifiedSchemasForTypesAndProcedures": [ - "public", - "pg_catalog", - "tiger" - ], - "comparisonOperatorMapping": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "introspectPrefixFunctionComparisonOperators": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "typeRepresentations": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - } - }, - "allOf": [ - { - "$ref": "#/definitions/IntrospectionOptions" - } - ] - }, - "mutationsVersion": { - "description": "Which version of the generated mutation procedures to include in the schema response", - "anyOf": [ - { - "$ref": "#/definitions/MutationsVersion" - }, - { - "type": "null" - } - ] - } - }, - "definitions": { - "Version": { - "type": "string", - "enum": ["4"] - }, - "DatabaseConnectionSettings": { - "description": "Database connection settings.", - "type": "object", - "required": ["connectionUri"], - "properties": { - "connectionUri": { - "description": "Connection string for a Postgres-compatible database.", - "allOf": [ - { - "$ref": "#/definitions/ConnectionUri" - } - ] - }, - "poolSettings": { - "description": "Connection pool settings.", - "default": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "allOf": [ - { - "$ref": "#/definitions/PoolSettings" - } - ] - }, - "isolationLevel": { - "description": "Query isolation level.", - "default": "ReadCommitted", - "allOf": [ - { - "$ref": "#/definitions/IsolationLevel" - } - ] - } - } - }, - "ConnectionUri": { - "$ref": "#/definitions/Secret" - }, - "Secret": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": ["variable"], - "properties": { - "variable": { - "$ref": "#/definitions/Variable" - } - } - } - ] - }, - "Variable": { - "description": "The name of an an environment variable.", - "type": "string" - }, - "PoolSettings": { - "description": "Settings for the PostgreSQL connection pool", - "type": "object", - "properties": { - "maxConnections": { - "description": "maximum number of pool connections", - "default": 50, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "poolTimeout": { - "description": "timeout for acquiring a connection from the pool (seconds)", - "default": 30, - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "idleTimeout": { - "description": "idle timeout for releasing a connection from the pool (seconds)", - "default": 180, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "checkConnectionAfterIdle": { - "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", - "default": 60, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "connectionLifetime": { - "description": "maximum lifetime for an individual connection (seconds)", - "default": 600, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - } - } - }, - "IsolationLevel": { - "description": "The isolation level of the transaction in which a query is executed.", - "oneOf": [ - { - "description": "Prevents reading data from another uncommitted transaction.", - "type": "string", - "enum": ["ReadCommitted"] - }, - { - "description": "Reading the same data twice is guaranteed to return the same result.", - "type": "string", - "enum": ["RepeatableRead"] - }, - { - "description": "Concurrent transactions behave identically to serializing them one at a time.", - "type": "string", - "enum": ["Serializable"] - } - ] - }, - "Metadata": { - "description": "Metadata information.", - "type": "object", - "properties": { - "tables": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TablesInfo" - } - ] - }, - "scalarTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ScalarTypes" - } - ] - }, - "compositeTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/CompositeTypes" - } - ] - }, - "nativeQueries": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/NativeQueries" - } - ] - } - } - }, - "TablesInfo": { - "description": "Mapping from a \"table\" name to its information.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TableInfo" - } - }, - "TableInfo": { - "description": "Information about a database table (or any other kind of relation).", - "type": "object", - "required": ["columns", "schemaName", "tableName"], - "properties": { - "schemaName": { - "type": "string" - }, - "tableName": { - "type": "string" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ColumnInfo" - } - }, - "uniquenessConstraints": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/UniquenessConstraints" - } - ] - }, - "foreignRelations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ForeignRelations" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "ColumnInfo": { - "description": "Information about a database column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "hasDefault": { - "$ref": "#/definitions/HasDefault" - }, - "isIdentity": { - "$ref": "#/definitions/IsIdentity" - }, - "isGenerated": { - "$ref": "#/definitions/IsGenerated" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "Type": { - "description": "The type of values that a column, field, or argument may take.", - "oneOf": [ - { - "type": "object", - "required": ["scalarType"], - "properties": { - "scalarType": { - "$ref": "#/definitions/ScalarTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["compositeType"], - "properties": { - "compositeType": { - "$ref": "#/definitions/CompositeTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["arrayType"], - "properties": { - "arrayType": { - "$ref": "#/definitions/Type" - } - }, - "additionalProperties": false - } - ] - }, - "ScalarTypeName": { - "description": "A name of a Scalar Type, as it appears in the NDC scheme.", - "type": "string" - }, - "CompositeTypeName": { - "description": "The name of a Composite Type, as it appears in the NDC schema", - "type": "string" - }, - "Nullable": { - "description": "Can this column contain null values", - "type": "string", - "enum": ["nullable", "nonNullable"] - }, - "HasDefault": { - "description": "Does this column have a default value.", - "type": "string", - "enum": ["noDefault", "hasDefault"] - }, - "IsIdentity": { - "description": "Is this column an identity column.", - "type": "string", - "enum": ["notIdentity", "identityByDefault", "identityAlways"] - }, - "IsGenerated": { - "description": "Is this column a generated column.", - "type": "string", - "enum": ["notGenerated", "stored"] - }, - "UniquenessConstraints": { - "description": "A mapping from the name of a unique constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UniquenessConstraint" - } - }, - "UniquenessConstraint": { - "description": "The set of columns that make up a uniqueness constraint.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "ForeignRelations": { - "description": "A mapping from the name of a foreign key constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ForeignRelation" - } - }, - "ForeignRelation": { - "description": "A foreign key constraint.", - "type": "object", - "required": ["columnMapping", "foreignTable"], - "properties": { - "foreignSchema": { - "type": ["string", "null"] - }, - "foreignTable": { - "type": "string" - }, - "columnMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ScalarTypes": { - "description": "Map of all known/occurring scalar types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ScalarType" - } - }, - "ScalarType": { - "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", - "type": "object", - "required": [ - "aggregateFunctions", - "comparisonOperators", - "schemaName", - "typeName" - ], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "description": { - "type": ["string", "null"] - }, - "aggregateFunctions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AggregateFunction" - } - }, - "comparisonOperators": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ComparisonOperator" - } - }, - "typeRepresentation": { - "anyOf": [ - { - "$ref": "#/definitions/TypeRepresentation" - }, - { - "type": "null" - } - ] - } - } - }, - "AggregateFunction": { - "type": "object", - "required": ["returnType"], - "properties": { - "returnType": { - "$ref": "#/definitions/ScalarTypeName" - } - } - }, - "ComparisonOperator": { - "description": "Represents a postgres binary comparison operator", - "type": "object", - "required": ["argumentType", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "type": "string" - }, - "operatorKind": { - "$ref": "#/definitions/OperatorKind" - }, - "argumentType": { - "$ref": "#/definitions/ScalarTypeName" - }, - "isInfix": { - "default": true, - "type": "boolean" - } - } - }, - "OperatorKind": { - "description": "Is it a built-in operator, or a custom operator.", - "type": "string", - "enum": ["equal", "in", "custom"] - }, - "TypeRepresentation": { - "description": "Type representation of a scalar type.", - "oneOf": [ - { - "description": "JSON booleans", - "type": "string", - "enum": ["boolean"] - }, - { - "description": "Any JSON string", - "type": "string", - "enum": ["string"] - }, - { - "description": "float4", - "type": "string", - "enum": ["float32"] - }, - { - "description": "float8", - "type": "string", - "enum": ["float64"] - }, - { - "description": "int2", - "type": "string", - "enum": ["int16"] - }, - { - "description": "int4", - "type": "string", - "enum": ["int32"] - }, - { - "description": "int8 as integer", - "type": "string", - "enum": ["int64"] - }, - { - "description": "int8 as string", - "type": "string", - "enum": ["int64AsString"] - }, - { - "description": "numeric", - "type": "string", - "enum": ["bigDecimal"] - }, - { - "description": "numeric as string", - "type": "string", - "enum": ["bigDecimalAsString"] - }, - { - "description": "timestamp", - "type": "string", - "enum": ["timestamp"] - }, - { - "description": "timestamp with timezone", - "type": "string", - "enum": ["timestamptz"] - }, - { - "description": "time", - "type": "string", - "enum": ["time"] - }, - { - "description": "time with timezone", - "type": "string", - "enum": ["timetz"] - }, - { - "description": "date", - "type": "string", - "enum": ["date"] - }, - { - "description": "uuid", - "type": "string", - "enum": ["uUID"] - }, - { - "description": "geography", - "type": "string", - "enum": ["geography"] - }, - { - "description": "geometry", - "type": "string", - "enum": ["geometry"] - }, - { - "description": "Any JSON number", - "type": "string", - "enum": ["number"] - }, - { - "description": "Any JSON number, with no decimal part", - "type": "string", - "enum": ["integer"] - }, - { - "description": "An arbitrary json.", - "type": "string", - "enum": ["json"] - }, - { - "description": "One of the specified string values", - "type": "object", - "required": ["enum"], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - ] - }, - "CompositeTypes": { - "description": "Map of all known composite types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CompositeType" - } - }, - "CompositeType": { - "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", - "type": "object", - "required": ["fields", "schemaName", "typeName"], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/FieldInfo" - } - }, - "description": { - "type": ["string", "null"] - } - } - }, - "FieldInfo": { - "description": "Information about a composite type field.", - "type": "object", - "required": ["fieldName", "type"], - "properties": { - "fieldName": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "NativeQueries": { - "description": "Metadata information of native queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NativeQueryInfo" - } - }, - "NativeQueryInfo": { - "description": "Information about a Native Query", - "type": "object", - "required": ["columns", "sql"], - "properties": { - "sql": { - "description": "SQL expression to use for the Native Query. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", - "allOf": [ - { - "$ref": "#/definitions/NativeQuerySql" - } - ] - }, - "columns": { - "description": "Columns returned by the Native Query", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "arguments": { - "description": "Names and types of arguments that can be passed to this Native Query", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "description": { - "type": ["string", "null"] - }, - "isProcedure": { - "description": "True if this native query mutates the database", - "type": "boolean" - } - } - }, - "NativeQuerySql": { - "description": "Native Query SQL location.", - "anyOf": [ - { - "description": "Refer to an external Native Query SQL file.", - "type": "object", - "required": ["file"], - "properties": { - "file": { - "description": "Relative path to a sql file.", - "type": "string" - } - } - }, - { - "description": "Inline Native Query SQL string.", - "type": "object", - "required": ["inline"], - "properties": { - "inline": { - "description": "An inline Native Query SQL string.", - "allOf": [ - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - } - } - }, - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - }, - "InlineNativeQuerySql": { - "type": "string" - }, - "ReadOnlyColumnInfo": { - "description": "Information about a native query column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "IntrospectionOptions": { - "description": "Options which only influence how the configuration is updated.", - "type": "object", - "properties": { - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTables": { - "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", - "default": ["public"], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTypesAndProcedures": { - "description": "The types and procedures in these schemas will be returned unqualified.", - "default": ["public", "pg_catalog", "tiger"], - "type": "array", - "items": { - "type": "string" - } - }, - "comparisonOperatorMapping": { - "description": "The mapping of comparison operator names to apply when updating the configuration", - "default": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "type": "array", - "items": { - "$ref": "#/definitions/ComparisonOperatorMapping" - } - }, - "introspectPrefixFunctionComparisonOperators": { - "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", - "default": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "typeRepresentations": { - "description": "The type representations to pick for base scalar types.", - "default": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - }, - "allOf": [ - { - "$ref": "#/definitions/TypeRepresentations" - } - ] - } - } - }, - "ComparisonOperatorMapping": { - "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", - "type": "object", - "required": ["exposedName", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "description": "The name of the operator as defined by the database", - "type": "string" - }, - "exposedName": { - "description": "The name the operator will appear under in the exposed API", - "type": "string" - }, - "operatorKind": { - "description": "Equal, In or Custom.", - "allOf": [ - { - "$ref": "#/definitions/OperatorKind" - } - ] - } - } - }, - "TypeRepresentations": { - "description": "The type representations that guide introspection.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TypeRepresentation" - } - }, - "MutationsVersion": { - "description": "Which version of the generated mutations will be included in the schema", - "type": "string", - "enum": ["v1", "v2"] - } - } -} diff --git a/static/citus/v4-chinook-ndc-metadata/schema.json b/static/citus/v4-chinook-ndc-metadata/schema.json deleted file mode 100644 index 787e63813..000000000 --- a/static/citus/v4-chinook-ndc-metadata/schema.json +++ /dev/null @@ -1,1387 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ParsedConfiguration", - "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", - "type": "object", - "required": ["version"], - "properties": { - "version": { - "$ref": "#/definitions/Version" - }, - "$schema": { - "description": "Jsonschema of the configuration format.", - "type": ["string", "null"] - }, - "connectionSettings": { - "description": "Database connection settings.", - "default": { - "connectionUri": { - "variable": "CONNECTION_URI" - }, - "poolSettings": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "isolationLevel": "ReadCommitted" - }, - "allOf": [ - { - "$ref": "#/definitions/DatabaseConnectionSettings" - } - ] - }, - "metadata": { - "description": "Connector metadata.", - "default": { - "tables": {}, - "scalarTypes": {}, - "compositeTypes": {}, - "nativeQueries": {} - }, - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, - "introspectionOptions": { - "description": "Database introspection options.", - "default": { - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "unqualifiedSchemasForTables": ["public"], - "unqualifiedSchemasForTypesAndProcedures": [ - "public", - "pg_catalog", - "tiger" - ], - "comparisonOperatorMapping": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "introspectPrefixFunctionComparisonOperators": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "typeRepresentations": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - } - }, - "allOf": [ - { - "$ref": "#/definitions/IntrospectionOptions" - } - ] - }, - "mutationsVersion": { - "description": "Which version of the generated mutation procedures to include in the schema response", - "anyOf": [ - { - "$ref": "#/definitions/MutationsVersion" - }, - { - "type": "null" - } - ] - } - }, - "definitions": { - "Version": { - "type": "string", - "enum": ["4"] - }, - "DatabaseConnectionSettings": { - "description": "Database connection settings.", - "type": "object", - "required": ["connectionUri"], - "properties": { - "connectionUri": { - "description": "Connection string for a Postgres-compatible database.", - "allOf": [ - { - "$ref": "#/definitions/ConnectionUri" - } - ] - }, - "poolSettings": { - "description": "Connection pool settings.", - "default": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "allOf": [ - { - "$ref": "#/definitions/PoolSettings" - } - ] - }, - "isolationLevel": { - "description": "Query isolation level.", - "default": "ReadCommitted", - "allOf": [ - { - "$ref": "#/definitions/IsolationLevel" - } - ] - } - } - }, - "ConnectionUri": { - "$ref": "#/definitions/Secret" - }, - "Secret": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": ["variable"], - "properties": { - "variable": { - "$ref": "#/definitions/Variable" - } - } - } - ] - }, - "Variable": { - "description": "The name of an an environment variable.", - "type": "string" - }, - "PoolSettings": { - "description": "Settings for the PostgreSQL connection pool", - "type": "object", - "properties": { - "maxConnections": { - "description": "maximum number of pool connections", - "default": 50, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "poolTimeout": { - "description": "timeout for acquiring a connection from the pool (seconds)", - "default": 30, - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "idleTimeout": { - "description": "idle timeout for releasing a connection from the pool (seconds)", - "default": 180, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "checkConnectionAfterIdle": { - "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", - "default": 60, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "connectionLifetime": { - "description": "maximum lifetime for an individual connection (seconds)", - "default": 600, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - } - } - }, - "IsolationLevel": { - "description": "The isolation level of the transaction in which a query is executed.", - "oneOf": [ - { - "description": "Prevents reading data from another uncommitted transaction.", - "type": "string", - "enum": ["ReadCommitted"] - }, - { - "description": "Reading the same data twice is guaranteed to return the same result.", - "type": "string", - "enum": ["RepeatableRead"] - }, - { - "description": "Concurrent transactions behave identically to serializing them one at a time.", - "type": "string", - "enum": ["Serializable"] - } - ] - }, - "Metadata": { - "description": "Metadata information.", - "type": "object", - "properties": { - "tables": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TablesInfo" - } - ] - }, - "scalarTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ScalarTypes" - } - ] - }, - "compositeTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/CompositeTypes" - } - ] - }, - "nativeQueries": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/NativeQueries" - } - ] - } - } - }, - "TablesInfo": { - "description": "Mapping from a \"table\" name to its information.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TableInfo" - } - }, - "TableInfo": { - "description": "Information about a database table (or any other kind of relation).", - "type": "object", - "required": ["columns", "schemaName", "tableName"], - "properties": { - "schemaName": { - "type": "string" - }, - "tableName": { - "type": "string" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ColumnInfo" - } - }, - "uniquenessConstraints": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/UniquenessConstraints" - } - ] - }, - "foreignRelations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ForeignRelations" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "ColumnInfo": { - "description": "Information about a database column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "hasDefault": { - "$ref": "#/definitions/HasDefault" - }, - "isIdentity": { - "$ref": "#/definitions/IsIdentity" - }, - "isGenerated": { - "$ref": "#/definitions/IsGenerated" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "Type": { - "description": "The type of values that a column, field, or argument may take.", - "oneOf": [ - { - "type": "object", - "required": ["scalarType"], - "properties": { - "scalarType": { - "$ref": "#/definitions/ScalarTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["compositeType"], - "properties": { - "compositeType": { - "$ref": "#/definitions/CompositeTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["arrayType"], - "properties": { - "arrayType": { - "$ref": "#/definitions/Type" - } - }, - "additionalProperties": false - } - ] - }, - "ScalarTypeName": { - "description": "A name of a Scalar Type, as it appears in the NDC scheme.", - "type": "string" - }, - "CompositeTypeName": { - "description": "The name of a Composite Type, as it appears in the NDC schema", - "type": "string" - }, - "Nullable": { - "description": "Can this column contain null values", - "type": "string", - "enum": ["nullable", "nonNullable"] - }, - "HasDefault": { - "description": "Does this column have a default value.", - "type": "string", - "enum": ["noDefault", "hasDefault"] - }, - "IsIdentity": { - "description": "Is this column an identity column.", - "type": "string", - "enum": ["notIdentity", "identityByDefault", "identityAlways"] - }, - "IsGenerated": { - "description": "Is this column a generated column.", - "type": "string", - "enum": ["notGenerated", "stored"] - }, - "UniquenessConstraints": { - "description": "A mapping from the name of a unique constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UniquenessConstraint" - } - }, - "UniquenessConstraint": { - "description": "The set of columns that make up a uniqueness constraint.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "ForeignRelations": { - "description": "A mapping from the name of a foreign key constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ForeignRelation" - } - }, - "ForeignRelation": { - "description": "A foreign key constraint.", - "type": "object", - "required": ["columnMapping", "foreignTable"], - "properties": { - "foreignSchema": { - "type": ["string", "null"] - }, - "foreignTable": { - "type": "string" - }, - "columnMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ScalarTypes": { - "description": "Map of all known/occurring scalar types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ScalarType" - } - }, - "ScalarType": { - "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", - "type": "object", - "required": [ - "aggregateFunctions", - "comparisonOperators", - "schemaName", - "typeName" - ], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "description": { - "type": ["string", "null"] - }, - "aggregateFunctions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AggregateFunction" - } - }, - "comparisonOperators": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ComparisonOperator" - } - }, - "typeRepresentation": { - "anyOf": [ - { - "$ref": "#/definitions/TypeRepresentation" - }, - { - "type": "null" - } - ] - } - } - }, - "AggregateFunction": { - "type": "object", - "required": ["returnType"], - "properties": { - "returnType": { - "$ref": "#/definitions/ScalarTypeName" - } - } - }, - "ComparisonOperator": { - "description": "Represents a postgres binary comparison operator", - "type": "object", - "required": ["argumentType", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "type": "string" - }, - "operatorKind": { - "$ref": "#/definitions/OperatorKind" - }, - "argumentType": { - "$ref": "#/definitions/ScalarTypeName" - }, - "isInfix": { - "default": true, - "type": "boolean" - } - } - }, - "OperatorKind": { - "description": "Is it a built-in operator, or a custom operator.", - "type": "string", - "enum": ["equal", "in", "custom"] - }, - "TypeRepresentation": { - "description": "Type representation of a scalar type.", - "oneOf": [ - { - "description": "JSON booleans", - "type": "string", - "enum": ["boolean"] - }, - { - "description": "Any JSON string", - "type": "string", - "enum": ["string"] - }, - { - "description": "float4", - "type": "string", - "enum": ["float32"] - }, - { - "description": "float8", - "type": "string", - "enum": ["float64"] - }, - { - "description": "int2", - "type": "string", - "enum": ["int16"] - }, - { - "description": "int4", - "type": "string", - "enum": ["int32"] - }, - { - "description": "int8 as integer", - "type": "string", - "enum": ["int64"] - }, - { - "description": "int8 as string", - "type": "string", - "enum": ["int64AsString"] - }, - { - "description": "numeric", - "type": "string", - "enum": ["bigDecimal"] - }, - { - "description": "numeric as string", - "type": "string", - "enum": ["bigDecimalAsString"] - }, - { - "description": "timestamp", - "type": "string", - "enum": ["timestamp"] - }, - { - "description": "timestamp with timezone", - "type": "string", - "enum": ["timestamptz"] - }, - { - "description": "time", - "type": "string", - "enum": ["time"] - }, - { - "description": "time with timezone", - "type": "string", - "enum": ["timetz"] - }, - { - "description": "date", - "type": "string", - "enum": ["date"] - }, - { - "description": "uuid", - "type": "string", - "enum": ["uUID"] - }, - { - "description": "geography", - "type": "string", - "enum": ["geography"] - }, - { - "description": "geometry", - "type": "string", - "enum": ["geometry"] - }, - { - "description": "Any JSON number", - "type": "string", - "enum": ["number"] - }, - { - "description": "Any JSON number, with no decimal part", - "type": "string", - "enum": ["integer"] - }, - { - "description": "An arbitrary json.", - "type": "string", - "enum": ["json"] - }, - { - "description": "One of the specified string values", - "type": "object", - "required": ["enum"], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - ] - }, - "CompositeTypes": { - "description": "Map of all known composite types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CompositeType" - } - }, - "CompositeType": { - "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", - "type": "object", - "required": ["fields", "schemaName", "typeName"], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/FieldInfo" - } - }, - "description": { - "type": ["string", "null"] - } - } - }, - "FieldInfo": { - "description": "Information about a composite type field.", - "type": "object", - "required": ["fieldName", "type"], - "properties": { - "fieldName": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "NativeQueries": { - "description": "Metadata information of native queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NativeQueryInfo" - } - }, - "NativeQueryInfo": { - "description": "Information about a Native Query", - "type": "object", - "required": ["columns", "sql"], - "properties": { - "sql": { - "description": "SQL expression to use for the Native Query. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", - "allOf": [ - { - "$ref": "#/definitions/NativeQuerySql" - } - ] - }, - "columns": { - "description": "Columns returned by the Native Query", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "arguments": { - "description": "Names and types of arguments that can be passed to this Native Query", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "description": { - "type": ["string", "null"] - }, - "isProcedure": { - "description": "True if this native query mutates the database", - "type": "boolean" - } - } - }, - "NativeQuerySql": { - "description": "Native Query SQL location.", - "anyOf": [ - { - "description": "Refer to an external Native Query SQL file.", - "type": "object", - "required": ["file"], - "properties": { - "file": { - "description": "Relative path to a sql file.", - "type": "string" - } - } - }, - { - "description": "Inline Native Query SQL string.", - "type": "object", - "required": ["inline"], - "properties": { - "inline": { - "description": "An inline Native Query SQL string.", - "allOf": [ - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - } - } - }, - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - }, - "InlineNativeQuerySql": { - "type": "string" - }, - "ReadOnlyColumnInfo": { - "description": "Information about a native query column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "IntrospectionOptions": { - "description": "Options which only influence how the configuration is updated.", - "type": "object", - "properties": { - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTables": { - "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", - "default": ["public"], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTypesAndProcedures": { - "description": "The types and procedures in these schemas will be returned unqualified.", - "default": ["public", "pg_catalog", "tiger"], - "type": "array", - "items": { - "type": "string" - } - }, - "comparisonOperatorMapping": { - "description": "The mapping of comparison operator names to apply when updating the configuration", - "default": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "type": "array", - "items": { - "$ref": "#/definitions/ComparisonOperatorMapping" - } - }, - "introspectPrefixFunctionComparisonOperators": { - "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", - "default": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "typeRepresentations": { - "description": "The type representations to pick for base scalar types.", - "default": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - }, - "allOf": [ - { - "$ref": "#/definitions/TypeRepresentations" - } - ] - } - } - }, - "ComparisonOperatorMapping": { - "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", - "type": "object", - "required": ["exposedName", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "description": "The name of the operator as defined by the database", - "type": "string" - }, - "exposedName": { - "description": "The name the operator will appear under in the exposed API", - "type": "string" - }, - "operatorKind": { - "description": "Equal, In or Custom.", - "allOf": [ - { - "$ref": "#/definitions/OperatorKind" - } - ] - } - } - }, - "TypeRepresentations": { - "description": "The type representations that guide introspection.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TypeRepresentation" - } - }, - "MutationsVersion": { - "description": "Which version of the generated mutations will be included in the schema", - "type": "string", - "enum": ["v1", "v2"] - } - } -} diff --git a/static/cockroach/v4-chinook-ndc-metadata/schema.json b/static/cockroach/v4-chinook-ndc-metadata/schema.json deleted file mode 100644 index 787e63813..000000000 --- a/static/cockroach/v4-chinook-ndc-metadata/schema.json +++ /dev/null @@ -1,1387 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ParsedConfiguration", - "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", - "type": "object", - "required": ["version"], - "properties": { - "version": { - "$ref": "#/definitions/Version" - }, - "$schema": { - "description": "Jsonschema of the configuration format.", - "type": ["string", "null"] - }, - "connectionSettings": { - "description": "Database connection settings.", - "default": { - "connectionUri": { - "variable": "CONNECTION_URI" - }, - "poolSettings": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "isolationLevel": "ReadCommitted" - }, - "allOf": [ - { - "$ref": "#/definitions/DatabaseConnectionSettings" - } - ] - }, - "metadata": { - "description": "Connector metadata.", - "default": { - "tables": {}, - "scalarTypes": {}, - "compositeTypes": {}, - "nativeQueries": {} - }, - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, - "introspectionOptions": { - "description": "Database introspection options.", - "default": { - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "unqualifiedSchemasForTables": ["public"], - "unqualifiedSchemasForTypesAndProcedures": [ - "public", - "pg_catalog", - "tiger" - ], - "comparisonOperatorMapping": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "introspectPrefixFunctionComparisonOperators": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "typeRepresentations": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - } - }, - "allOf": [ - { - "$ref": "#/definitions/IntrospectionOptions" - } - ] - }, - "mutationsVersion": { - "description": "Which version of the generated mutation procedures to include in the schema response", - "anyOf": [ - { - "$ref": "#/definitions/MutationsVersion" - }, - { - "type": "null" - } - ] - } - }, - "definitions": { - "Version": { - "type": "string", - "enum": ["4"] - }, - "DatabaseConnectionSettings": { - "description": "Database connection settings.", - "type": "object", - "required": ["connectionUri"], - "properties": { - "connectionUri": { - "description": "Connection string for a Postgres-compatible database.", - "allOf": [ - { - "$ref": "#/definitions/ConnectionUri" - } - ] - }, - "poolSettings": { - "description": "Connection pool settings.", - "default": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "allOf": [ - { - "$ref": "#/definitions/PoolSettings" - } - ] - }, - "isolationLevel": { - "description": "Query isolation level.", - "default": "ReadCommitted", - "allOf": [ - { - "$ref": "#/definitions/IsolationLevel" - } - ] - } - } - }, - "ConnectionUri": { - "$ref": "#/definitions/Secret" - }, - "Secret": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": ["variable"], - "properties": { - "variable": { - "$ref": "#/definitions/Variable" - } - } - } - ] - }, - "Variable": { - "description": "The name of an an environment variable.", - "type": "string" - }, - "PoolSettings": { - "description": "Settings for the PostgreSQL connection pool", - "type": "object", - "properties": { - "maxConnections": { - "description": "maximum number of pool connections", - "default": 50, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "poolTimeout": { - "description": "timeout for acquiring a connection from the pool (seconds)", - "default": 30, - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "idleTimeout": { - "description": "idle timeout for releasing a connection from the pool (seconds)", - "default": 180, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "checkConnectionAfterIdle": { - "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", - "default": 60, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "connectionLifetime": { - "description": "maximum lifetime for an individual connection (seconds)", - "default": 600, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - } - } - }, - "IsolationLevel": { - "description": "The isolation level of the transaction in which a query is executed.", - "oneOf": [ - { - "description": "Prevents reading data from another uncommitted transaction.", - "type": "string", - "enum": ["ReadCommitted"] - }, - { - "description": "Reading the same data twice is guaranteed to return the same result.", - "type": "string", - "enum": ["RepeatableRead"] - }, - { - "description": "Concurrent transactions behave identically to serializing them one at a time.", - "type": "string", - "enum": ["Serializable"] - } - ] - }, - "Metadata": { - "description": "Metadata information.", - "type": "object", - "properties": { - "tables": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TablesInfo" - } - ] - }, - "scalarTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ScalarTypes" - } - ] - }, - "compositeTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/CompositeTypes" - } - ] - }, - "nativeQueries": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/NativeQueries" - } - ] - } - } - }, - "TablesInfo": { - "description": "Mapping from a \"table\" name to its information.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TableInfo" - } - }, - "TableInfo": { - "description": "Information about a database table (or any other kind of relation).", - "type": "object", - "required": ["columns", "schemaName", "tableName"], - "properties": { - "schemaName": { - "type": "string" - }, - "tableName": { - "type": "string" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ColumnInfo" - } - }, - "uniquenessConstraints": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/UniquenessConstraints" - } - ] - }, - "foreignRelations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ForeignRelations" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "ColumnInfo": { - "description": "Information about a database column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "hasDefault": { - "$ref": "#/definitions/HasDefault" - }, - "isIdentity": { - "$ref": "#/definitions/IsIdentity" - }, - "isGenerated": { - "$ref": "#/definitions/IsGenerated" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "Type": { - "description": "The type of values that a column, field, or argument may take.", - "oneOf": [ - { - "type": "object", - "required": ["scalarType"], - "properties": { - "scalarType": { - "$ref": "#/definitions/ScalarTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["compositeType"], - "properties": { - "compositeType": { - "$ref": "#/definitions/CompositeTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["arrayType"], - "properties": { - "arrayType": { - "$ref": "#/definitions/Type" - } - }, - "additionalProperties": false - } - ] - }, - "ScalarTypeName": { - "description": "A name of a Scalar Type, as it appears in the NDC scheme.", - "type": "string" - }, - "CompositeTypeName": { - "description": "The name of a Composite Type, as it appears in the NDC schema", - "type": "string" - }, - "Nullable": { - "description": "Can this column contain null values", - "type": "string", - "enum": ["nullable", "nonNullable"] - }, - "HasDefault": { - "description": "Does this column have a default value.", - "type": "string", - "enum": ["noDefault", "hasDefault"] - }, - "IsIdentity": { - "description": "Is this column an identity column.", - "type": "string", - "enum": ["notIdentity", "identityByDefault", "identityAlways"] - }, - "IsGenerated": { - "description": "Is this column a generated column.", - "type": "string", - "enum": ["notGenerated", "stored"] - }, - "UniquenessConstraints": { - "description": "A mapping from the name of a unique constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UniquenessConstraint" - } - }, - "UniquenessConstraint": { - "description": "The set of columns that make up a uniqueness constraint.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "ForeignRelations": { - "description": "A mapping from the name of a foreign key constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ForeignRelation" - } - }, - "ForeignRelation": { - "description": "A foreign key constraint.", - "type": "object", - "required": ["columnMapping", "foreignTable"], - "properties": { - "foreignSchema": { - "type": ["string", "null"] - }, - "foreignTable": { - "type": "string" - }, - "columnMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ScalarTypes": { - "description": "Map of all known/occurring scalar types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ScalarType" - } - }, - "ScalarType": { - "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", - "type": "object", - "required": [ - "aggregateFunctions", - "comparisonOperators", - "schemaName", - "typeName" - ], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "description": { - "type": ["string", "null"] - }, - "aggregateFunctions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AggregateFunction" - } - }, - "comparisonOperators": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ComparisonOperator" - } - }, - "typeRepresentation": { - "anyOf": [ - { - "$ref": "#/definitions/TypeRepresentation" - }, - { - "type": "null" - } - ] - } - } - }, - "AggregateFunction": { - "type": "object", - "required": ["returnType"], - "properties": { - "returnType": { - "$ref": "#/definitions/ScalarTypeName" - } - } - }, - "ComparisonOperator": { - "description": "Represents a postgres binary comparison operator", - "type": "object", - "required": ["argumentType", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "type": "string" - }, - "operatorKind": { - "$ref": "#/definitions/OperatorKind" - }, - "argumentType": { - "$ref": "#/definitions/ScalarTypeName" - }, - "isInfix": { - "default": true, - "type": "boolean" - } - } - }, - "OperatorKind": { - "description": "Is it a built-in operator, or a custom operator.", - "type": "string", - "enum": ["equal", "in", "custom"] - }, - "TypeRepresentation": { - "description": "Type representation of a scalar type.", - "oneOf": [ - { - "description": "JSON booleans", - "type": "string", - "enum": ["boolean"] - }, - { - "description": "Any JSON string", - "type": "string", - "enum": ["string"] - }, - { - "description": "float4", - "type": "string", - "enum": ["float32"] - }, - { - "description": "float8", - "type": "string", - "enum": ["float64"] - }, - { - "description": "int2", - "type": "string", - "enum": ["int16"] - }, - { - "description": "int4", - "type": "string", - "enum": ["int32"] - }, - { - "description": "int8 as integer", - "type": "string", - "enum": ["int64"] - }, - { - "description": "int8 as string", - "type": "string", - "enum": ["int64AsString"] - }, - { - "description": "numeric", - "type": "string", - "enum": ["bigDecimal"] - }, - { - "description": "numeric as string", - "type": "string", - "enum": ["bigDecimalAsString"] - }, - { - "description": "timestamp", - "type": "string", - "enum": ["timestamp"] - }, - { - "description": "timestamp with timezone", - "type": "string", - "enum": ["timestamptz"] - }, - { - "description": "time", - "type": "string", - "enum": ["time"] - }, - { - "description": "time with timezone", - "type": "string", - "enum": ["timetz"] - }, - { - "description": "date", - "type": "string", - "enum": ["date"] - }, - { - "description": "uuid", - "type": "string", - "enum": ["uUID"] - }, - { - "description": "geography", - "type": "string", - "enum": ["geography"] - }, - { - "description": "geometry", - "type": "string", - "enum": ["geometry"] - }, - { - "description": "Any JSON number", - "type": "string", - "enum": ["number"] - }, - { - "description": "Any JSON number, with no decimal part", - "type": "string", - "enum": ["integer"] - }, - { - "description": "An arbitrary json.", - "type": "string", - "enum": ["json"] - }, - { - "description": "One of the specified string values", - "type": "object", - "required": ["enum"], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - ] - }, - "CompositeTypes": { - "description": "Map of all known composite types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CompositeType" - } - }, - "CompositeType": { - "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", - "type": "object", - "required": ["fields", "schemaName", "typeName"], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/FieldInfo" - } - }, - "description": { - "type": ["string", "null"] - } - } - }, - "FieldInfo": { - "description": "Information about a composite type field.", - "type": "object", - "required": ["fieldName", "type"], - "properties": { - "fieldName": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "NativeQueries": { - "description": "Metadata information of native queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NativeQueryInfo" - } - }, - "NativeQueryInfo": { - "description": "Information about a Native Query", - "type": "object", - "required": ["columns", "sql"], - "properties": { - "sql": { - "description": "SQL expression to use for the Native Query. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", - "allOf": [ - { - "$ref": "#/definitions/NativeQuerySql" - } - ] - }, - "columns": { - "description": "Columns returned by the Native Query", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "arguments": { - "description": "Names and types of arguments that can be passed to this Native Query", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "description": { - "type": ["string", "null"] - }, - "isProcedure": { - "description": "True if this native query mutates the database", - "type": "boolean" - } - } - }, - "NativeQuerySql": { - "description": "Native Query SQL location.", - "anyOf": [ - { - "description": "Refer to an external Native Query SQL file.", - "type": "object", - "required": ["file"], - "properties": { - "file": { - "description": "Relative path to a sql file.", - "type": "string" - } - } - }, - { - "description": "Inline Native Query SQL string.", - "type": "object", - "required": ["inline"], - "properties": { - "inline": { - "description": "An inline Native Query SQL string.", - "allOf": [ - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - } - } - }, - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - }, - "InlineNativeQuerySql": { - "type": "string" - }, - "ReadOnlyColumnInfo": { - "description": "Information about a native query column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "IntrospectionOptions": { - "description": "Options which only influence how the configuration is updated.", - "type": "object", - "properties": { - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTables": { - "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", - "default": ["public"], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTypesAndProcedures": { - "description": "The types and procedures in these schemas will be returned unqualified.", - "default": ["public", "pg_catalog", "tiger"], - "type": "array", - "items": { - "type": "string" - } - }, - "comparisonOperatorMapping": { - "description": "The mapping of comparison operator names to apply when updating the configuration", - "default": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "type": "array", - "items": { - "$ref": "#/definitions/ComparisonOperatorMapping" - } - }, - "introspectPrefixFunctionComparisonOperators": { - "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", - "default": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "typeRepresentations": { - "description": "The type representations to pick for base scalar types.", - "default": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - }, - "allOf": [ - { - "$ref": "#/definitions/TypeRepresentations" - } - ] - } - } - }, - "ComparisonOperatorMapping": { - "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", - "type": "object", - "required": ["exposedName", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "description": "The name of the operator as defined by the database", - "type": "string" - }, - "exposedName": { - "description": "The name the operator will appear under in the exposed API", - "type": "string" - }, - "operatorKind": { - "description": "Equal, In or Custom.", - "allOf": [ - { - "$ref": "#/definitions/OperatorKind" - } - ] - } - } - }, - "TypeRepresentations": { - "description": "The type representations that guide introspection.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TypeRepresentation" - } - }, - "MutationsVersion": { - "description": "Which version of the generated mutations will be included in the schema", - "type": "string", - "enum": ["v1", "v2"] - } - } -} diff --git a/static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/configuration.json b/static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/configuration.json new file mode 100644 index 000000000..1e4f98063 --- /dev/null +++ b/static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/configuration.json @@ -0,0 +1,4043 @@ +{ + "version": "4", + "$schema": "../../schema.json", + "connectionSettings": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "metadata": { + "tables": { + "Album": { + "schemaName": "public", + "tableName": "Album", + "columns": { + "AlbumId": { + "name": "AlbumId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": "The identifier of an album" + }, + "ArtistId": { + "name": "ArtistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": "The id of the artist that authored the album" + }, + "Title": { + "name": "Title", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": "The title of an album" + } + }, + "uniquenessConstraints": { + "PK_Album": ["AlbumId"] + }, + "foreignRelations": { + "FK_AlbumArtistId": { + "foreignSchema": "public", + "foreignTable": "Artist", + "columnMapping": { + "ArtistId": "ArtistId" + } + } + }, + "description": "The record of all albums" + }, + "Artist": { + "schemaName": "public", + "tableName": "Artist", + "columns": { + "ArtistId": { + "name": "ArtistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": "The identifier of an artist" + }, + "Name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": "The name of an artist" + } + }, + "uniquenessConstraints": { + "PK_Artist": ["ArtistId"] + }, + "foreignRelations": {}, + "description": "The record of all artists" + }, + "Customer": { + "schemaName": "public", + "tableName": "Customer", + "columns": { + "Address": { + "name": "Address", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "City": { + "name": "City", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "Company": { + "name": "Company", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "Country": { + "name": "Country", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "CustomerId": { + "name": "CustomerId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": "The identifier of customer" + }, + "Email": { + "name": "Email", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "Fax": { + "name": "Fax", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "FirstName": { + "name": "FirstName", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": "The first name of a customer" + }, + "LastName": { + "name": "LastName", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": "The last name of a customer" + }, + "Phone": { + "name": "Phone", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "PostalCode": { + "name": "PostalCode", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "State": { + "name": "State", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "SupportRepId": { + "name": "SupportRepId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_Customer": ["CustomerId"] + }, + "foreignRelations": { + "FK_CustomerSupportRepId": { + "foreignSchema": "public", + "foreignTable": "Employee", + "columnMapping": { + "SupportRepId": "EmployeeId" + } + } + }, + "description": "The record of all customers" + }, + "Employee": { + "schemaName": "public", + "tableName": "Employee", + "columns": { + "Address": { + "name": "Address", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "BirthDate": { + "name": "BirthDate", + "type": { + "scalarType": "timestamp" + }, + "nullable": "nullable", + "description": null + }, + "City": { + "name": "City", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "Country": { + "name": "Country", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "Email": { + "name": "Email", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "EmployeeId": { + "name": "EmployeeId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "Fax": { + "name": "Fax", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "FirstName": { + "name": "FirstName", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "HireDate": { + "name": "HireDate", + "type": { + "scalarType": "timestamp" + }, + "nullable": "nullable", + "description": null + }, + "LastName": { + "name": "LastName", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "Phone": { + "name": "Phone", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "PostalCode": { + "name": "PostalCode", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "ReportsTo": { + "name": "ReportsTo", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "State": { + "name": "State", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "Title": { + "name": "Title", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_Employee": ["EmployeeId"] + }, + "foreignRelations": { + "FK_EmployeeReportsTo": { + "foreignSchema": "public", + "foreignTable": "Employee", + "columnMapping": { + "ReportsTo": "EmployeeId" + } + } + }, + "description": null + }, + "Genre": { + "schemaName": "public", + "tableName": "Genre", + "columns": { + "GenreId": { + "name": "GenreId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "Name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_Genre": ["GenreId"] + }, + "foreignRelations": {}, + "description": null + }, + "Invoice": { + "schemaName": "public", + "tableName": "Invoice", + "columns": { + "BillingAddress": { + "name": "BillingAddress", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "BillingCity": { + "name": "BillingCity", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "BillingCountry": { + "name": "BillingCountry", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "BillingPostalCode": { + "name": "BillingPostalCode", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "BillingState": { + "name": "BillingState", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "CustomerId": { + "name": "CustomerId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "InvoiceDate": { + "name": "InvoiceDate", + "type": { + "scalarType": "timestamp" + }, + "nullable": "nonNullable", + "description": null + }, + "InvoiceId": { + "name": "InvoiceId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "Total": { + "name": "Total", + "type": { + "scalarType": "numeric" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_Invoice": ["InvoiceId"] + }, + "foreignRelations": { + "FK_InvoiceCustomerId": { + "foreignSchema": "public", + "foreignTable": "Customer", + "columnMapping": { + "CustomerId": "CustomerId" + } + } + }, + "description": null + }, + "InvoiceLine": { + "schemaName": "public", + "tableName": "InvoiceLine", + "columns": { + "InvoiceId": { + "name": "InvoiceId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "InvoiceLineId": { + "name": "InvoiceLineId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "Quantity": { + "name": "Quantity", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "TrackId": { + "name": "TrackId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "UnitPrice": { + "name": "UnitPrice", + "type": { + "scalarType": "numeric" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_InvoiceLine": ["InvoiceLineId"] + }, + "foreignRelations": { + "FK_InvoiceLineInvoiceId": { + "foreignSchema": "public", + "foreignTable": "Invoice", + "columnMapping": { + "InvoiceId": "InvoiceId" + } + }, + "FK_InvoiceLineTrackId": { + "foreignSchema": "public", + "foreignTable": "Track", + "columnMapping": { + "TrackId": "TrackId" + } + } + }, + "description": null + }, + "MediaType": { + "schemaName": "public", + "tableName": "MediaType", + "columns": { + "MediaTypeId": { + "name": "MediaTypeId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "Name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_MediaType": ["MediaTypeId"] + }, + "foreignRelations": {}, + "description": null + }, + "Playlist": { + "schemaName": "public", + "tableName": "Playlist", + "columns": { + "Name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "PlaylistId": { + "name": "PlaylistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_Playlist": ["PlaylistId"] + }, + "foreignRelations": {}, + "description": null + }, + "PlaylistTrack": { + "schemaName": "public", + "tableName": "PlaylistTrack", + "columns": { + "PlaylistId": { + "name": "PlaylistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "TrackId": { + "name": "TrackId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_PlaylistTrack": ["PlaylistId", "TrackId"] + }, + "foreignRelations": { + "FK_PlaylistTrackPlaylistId": { + "foreignSchema": "public", + "foreignTable": "Playlist", + "columnMapping": { + "PlaylistId": "PlaylistId" + } + }, + "FK_PlaylistTrackTrackId": { + "foreignSchema": "public", + "foreignTable": "Track", + "columnMapping": { + "TrackId": "TrackId" + } + } + }, + "description": null + }, + "Track": { + "schemaName": "public", + "tableName": "Track", + "columns": { + "AlbumId": { + "name": "AlbumId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "Bytes": { + "name": "Bytes", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "Composer": { + "name": "Composer", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "GenreId": { + "name": "GenreId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "MediaTypeId": { + "name": "MediaTypeId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "Milliseconds": { + "name": "Milliseconds", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "Name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "TrackId": { + "name": "TrackId", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "UnitPrice": { + "name": "UnitPrice", + "type": { + "scalarType": "numeric" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "PK_Track": ["TrackId"] + }, + "foreignRelations": { + "FK_TrackAlbumId": { + "foreignSchema": "public", + "foreignTable": "Album", + "columnMapping": { + "AlbumId": "AlbumId" + } + }, + "FK_TrackGenreId": { + "foreignSchema": "public", + "foreignTable": "Genre", + "columnMapping": { + "GenreId": "GenreId" + } + }, + "FK_TrackMediaTypeId": { + "foreignSchema": "public", + "foreignTable": "MediaType", + "columnMapping": { + "MediaTypeId": "MediaTypeId" + } + } + }, + "description": null + }, + "custom_defaults": { + "schemaName": "custom", + "tableName": "defaults", + "columns": { + "birthday": { + "name": "birthday", + "type": { + "scalarType": "date" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "height_cm": { + "name": "height_cm", + "type": { + "scalarType": "numeric" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "height_in": { + "name": "height_in", + "type": { + "scalarType": "numeric" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "isGenerated": "stored", + "description": null + }, + "id": { + "name": "id", + "type": { + "scalarType": "int8" + }, + "nullable": "nonNullable", + "isIdentity": "identityAlways", + "description": null + }, + "name": { + "name": "name", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "defaults_pkey": ["id"] + }, + "foreignRelations": {}, + "description": null + }, + "custom_dog": { + "schemaName": "custom", + "tableName": "dog", + "columns": { + "adopter_name": { + "name": "adopter_name", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + }, + "birthday": { + "name": "birthday", + "type": { + "scalarType": "date" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "height_cm": { + "name": "height_cm", + "type": { + "scalarType": "numeric" + }, + "nullable": "nonNullable", + "description": null + }, + "height_in": { + "name": "height_in", + "type": { + "scalarType": "numeric" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "isGenerated": "stored", + "description": null + }, + "id": { + "name": "id", + "type": { + "scalarType": "int8" + }, + "nullable": "nonNullable", + "isIdentity": "identityAlways", + "description": null + }, + "name": { + "name": "name", + "type": { + "scalarType": "text" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "dog_pkey": ["id"] + }, + "foreignRelations": {}, + "description": null + }, + "deck_of_cards": { + "schemaName": "public", + "tableName": "deck_of_cards", + "columns": { + "pips": { + "name": "pips", + "type": { + "scalarType": "int2" + }, + "nullable": "nonNullable", + "description": null + }, + "suit": { + "name": "suit", + "type": { + "scalarType": "card_suit" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, + "discoverable_types_root_occurrence": { + "schemaName": "public", + "tableName": "discoverable_types_root_occurrence", + "columns": { + "col": { + "name": "col", + "type": { + "compositeType": "discoverable_types" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, + "even_numbers": { + "schemaName": "public", + "tableName": "even_numbers", + "columns": { + "the_number": { + "name": "the_number", + "type": { + "scalarType": "even_number" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, + "group_leader": { + "schemaName": "public", + "tableName": "group_leader", + "columns": { + "characters": { + "name": "characters", + "type": { + "compositeType": "characters" + }, + "nullable": "nullable", + "description": null + }, + "id": { + "name": "id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "name": { + "name": "name", + "type": { + "compositeType": "chara" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, + "phone_numbers": { + "schemaName": "public", + "tableName": "phone_numbers", + "columns": { + "the_number": { + "name": "the_number", + "type": { + "scalarType": "Phone" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, + "spatial_ref_sys": { + "schemaName": "public", + "tableName": "spatial_ref_sys", + "columns": { + "auth_name": { + "name": "auth_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "auth_srid": { + "name": "auth_srid", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "proj4text": { + "name": "proj4text", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "srid": { + "name": "srid", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "srtext": { + "name": "srtext", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "spatial_ref_sys_pkey": ["srid"] + }, + "foreignRelations": {}, + "description": null + }, + "topology_layer": { + "schemaName": "topology", + "tableName": "layer", + "columns": { + "child_id": { + "name": "child_id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "feature_column": { + "name": "feature_column", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "feature_type": { + "name": "feature_type", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "layer_id": { + "name": "layer_id", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + }, + "level": { + "name": "level", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "schema_name": { + "name": "schema_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "table_name": { + "name": "table_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "topology_id": { + "name": "topology_id", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "layer_pkey": ["layer_id", "topology_id"], + "layer_schema_name_table_name_feature_column_key": [ + "feature_column", + "schema_name", + "table_name" + ] + }, + "foreignRelations": { + "layer_topology_id_fkey": { + "foreignSchema": "topology", + "foreignTable": "topology", + "columnMapping": { + "topology_id": "id" + } + } + }, + "description": null + }, + "topology_topology": { + "schemaName": "topology", + "tableName": "topology", + "columns": { + "hasz": { + "name": "hasz", + "type": { + "scalarType": "bool" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "id": { + "name": "id", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "name": { + "name": "name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "precision": { + "name": "precision", + "type": { + "scalarType": "float8" + }, + "nullable": "nonNullable", + "description": null + }, + "srid": { + "name": "srid", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "topology_name_key": ["name"], + "topology_pkey": ["id"] + }, + "foreignRelations": {}, + "description": null + } + }, + "scalarTypes": { + "Phone": { + "typeName": "Phone", + "schemaName": "public", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "Phone", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "Phone", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": true + }, + "st_coveredby": { + "operatorName": "st_coveredby", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": false + }, + "st_covers": { + "operatorName": "st_covers", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": false + }, + "st_intersects": { + "operatorName": "st_intersects", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": false + }, + "st_relatematch": { + "operatorName": "st_relatematch", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": false + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "Phone", + "isInfix": false + } + }, + "typeRepresentation": "string" + }, + "bool": { + "typeName": "bool", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "bool_and": { + "returnType": "bool" + }, + "bool_or": { + "returnType": "bool" + }, + "every": { + "returnType": "bool" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "bool", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "bool", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + } + }, + "typeRepresentation": "boolean" + }, + "card_suit": { + "typeName": "card_suit", + "schemaName": "public", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "card_suit" + }, + "min": { + "returnType": "card_suit" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "card_suit", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "card_suit", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "card_suit", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "card_suit", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "card_suit", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "card_suit", + "isInfix": true + }, + "_neq": { + "operatorName": "!=", + "operatorKind": "custom", + "argumentType": "card_suit", + "isInfix": true + } + }, + "typeRepresentation": { + "enum": ["hearts", "clubs", "diamonds", "spades"] + } + }, + "char": { + "typeName": "char", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "char", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "char", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": true + }, + "st_coveredby": { + "operatorName": "st_coveredby", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": false + }, + "st_covers": { + "operatorName": "st_covers", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": false + }, + "st_intersects": { + "operatorName": "st_intersects", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": false + }, + "st_relatematch": { + "operatorName": "st_relatematch", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": false + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "char", + "isInfix": false + } + }, + "typeRepresentation": "string" + }, + "date": { + "typeName": "date", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "date" + }, + "min": { + "returnType": "date" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "date", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "date", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + } + }, + "typeRepresentation": "date" + }, + "even_number": { + "typeName": "even_number", + "schemaName": "public", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int4" + }, + "bit_or": { + "returnType": "int4" + }, + "bit_xor": { + "returnType": "int4" + }, + "max": { + "returnType": "int4" + }, + "min": { + "returnType": "int4" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "int8" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "even_number", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "even_number", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "even_number", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "even_number", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "even_number", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "even_number", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "even_number", + "isInfix": true + } + }, + "typeRepresentation": "int32" + }, + "float4": { + "typeName": "float4", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "float8" + }, + "max": { + "returnType": "float4" + }, + "min": { + "returnType": "float4" + }, + "stddev": { + "returnType": "float8" + }, + "stddev_pop": { + "returnType": "float8" + }, + "stddev_samp": { + "returnType": "float8" + }, + "sum": { + "returnType": "float4" + }, + "var_pop": { + "returnType": "float8" + }, + "var_samp": { + "returnType": "float8" + }, + "variance": { + "returnType": "float8" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "float4", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "float4", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "float4", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "float4", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "float4", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "float4", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "float4", + "isInfix": true + } + }, + "typeRepresentation": "float32" + }, + "float8": { + "typeName": "float8", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "float8" + }, + "max": { + "returnType": "float8" + }, + "min": { + "returnType": "float8" + }, + "stddev": { + "returnType": "float8" + }, + "stddev_pop": { + "returnType": "float8" + }, + "stddev_samp": { + "returnType": "float8" + }, + "sum": { + "returnType": "float8" + }, + "var_pop": { + "returnType": "float8" + }, + "var_samp": { + "returnType": "float8" + }, + "variance": { + "returnType": "float8" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "float8", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "float8", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "float8", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "float8", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "float8", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "float8", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "float8", + "isInfix": true + } + }, + "typeRepresentation": "float64" + }, + "int2": { + "typeName": "int2", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int2" + }, + "bit_or": { + "returnType": "int2" + }, + "bit_xor": { + "returnType": "int2" + }, + "max": { + "returnType": "int2" + }, + "min": { + "returnType": "int2" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "int8" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int2", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int2", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int2", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int2", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int2", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int2", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int2", + "isInfix": true + } + }, + "typeRepresentation": "int16" + }, + "int4": { + "typeName": "int4", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int4" + }, + "bit_or": { + "returnType": "int4" + }, + "bit_xor": { + "returnType": "int4" + }, + "max": { + "returnType": "int4" + }, + "min": { + "returnType": "int4" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "int8" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int4", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int4", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + } + }, + "typeRepresentation": "int32" + }, + "int8": { + "typeName": "int8", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int8" + }, + "bit_or": { + "returnType": "int8" + }, + "bit_xor": { + "returnType": "int8" + }, + "max": { + "returnType": "int8" + }, + "min": { + "returnType": "int8" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int8", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int8", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + } + }, + "typeRepresentation": "int64AsString" + }, + "interval": { + "typeName": "interval", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "interval" + }, + "max": { + "returnType": "interval" + }, + "min": { + "returnType": "interval" + }, + "sum": { + "returnType": "interval" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "interval", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "interval", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + } + }, + "typeRepresentation": null + }, + "numeric": { + "typeName": "numeric", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "max": { + "returnType": "numeric" + }, + "min": { + "returnType": "numeric" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "numeric", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "numeric", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + } + }, + "typeRepresentation": "bigDecimalAsString" + }, + "text": { + "typeName": "text", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "text", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "text", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "st_coveredby": { + "operatorName": "st_coveredby", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "st_covers": { + "operatorName": "st_covers", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "st_intersects": { + "operatorName": "st_intersects", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "st_relatematch": { + "operatorName": "st_relatematch", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + } + }, + "typeRepresentation": "string" + }, + "time": { + "typeName": "time", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "interval" + }, + "max": { + "returnType": "time" + }, + "min": { + "returnType": "time" + }, + "sum": { + "returnType": "interval" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "time", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "time", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + } + }, + "typeRepresentation": "time" + }, + "timestamp": { + "typeName": "timestamp", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "timestamp" + }, + "min": { + "returnType": "timestamp" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "timestamp", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "timestamp", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + } + }, + "typeRepresentation": "timestamp" + }, + "timestamptz": { + "typeName": "timestamptz", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "timestamptz" + }, + "min": { + "returnType": "timestamptz" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "timestamptz", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "timestamptz", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "timestamptz", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "timestamptz", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "timestamptz", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "timestamptz", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "timestamptz", + "isInfix": true + } + }, + "typeRepresentation": "timestamptz" + }, + "timetz": { + "typeName": "timetz", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "timetz" + }, + "min": { + "returnType": "timetz" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "timetz", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "timetz", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "timetz", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "timetz", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "timetz", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "timetz", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "timetz", + "isInfix": true + } + }, + "typeRepresentation": "timetz" + }, + "uuid": { + "typeName": "uuid", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": {}, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "uuid", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "uuid", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "uuid", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "uuid", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "uuid", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "uuid", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "uuid", + "isInfix": true + } + }, + "typeRepresentation": "uUID" + }, + "varchar": { + "typeName": "varchar", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "varchar", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "varchar", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "st_coveredby": { + "operatorName": "st_coveredby", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "st_covers": { + "operatorName": "st_covers", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "st_intersects": { + "operatorName": "st_intersects", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "st_relatematch": { + "operatorName": "st_relatematch", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + } + }, + "typeRepresentation": "string" + } + }, + "compositeTypes": { + "chara": { + "typeName": "chara", + "schemaName": "public", + "fields": { + "name": { + "fieldName": "name", + "type": { + "scalarType": "text" + }, + "description": null + }, + "popularity": { + "fieldName": "popularity", + "type": { + "scalarType": "int8" + }, + "description": null + } + }, + "description": null + }, + "characters": { + "typeName": "characters", + "schemaName": "public", + "fields": { + "members": { + "fieldName": "members", + "type": { + "arrayType": { + "compositeType": "chara" + } + }, + "description": null + }, + "name": { + "fieldName": "name", + "type": { + "scalarType": "text" + }, + "description": null + } + }, + "description": null + }, + "committee": { + "typeName": "committee", + "schemaName": "public", + "fields": { + "members": { + "fieldName": "members", + "type": { + "arrayType": { + "compositeType": "person_name" + } + }, + "description": null + }, + "name": { + "fieldName": "name", + "type": { + "scalarType": "text" + }, + "description": null + } + }, + "description": null + }, + "discoverable_types": { + "typeName": "discoverable_types", + "schemaName": "public", + "fields": { + "only_occurring_here1": { + "fieldName": "only_occurring_here1", + "type": { + "scalarType": "int8" + }, + "description": null + } + }, + "description": null + }, + "organization": { + "typeName": "organization", + "schemaName": "public", + "fields": { + "committees": { + "fieldName": "committees", + "type": { + "arrayType": { + "compositeType": "committee" + } + }, + "description": null + }, + "name": { + "fieldName": "name", + "type": { + "scalarType": "text" + }, + "description": null + } + }, + "description": null + }, + "person": { + "typeName": "person", + "schemaName": "public", + "fields": { + "address": { + "fieldName": "address", + "type": { + "compositeType": "person_address" + }, + "description": null + }, + "name": { + "fieldName": "name", + "type": { + "compositeType": "person_name" + }, + "description": null + } + }, + "description": null + }, + "person_address": { + "typeName": "person_address", + "schemaName": "public", + "fields": { + "address_line_1": { + "fieldName": "address_line_1", + "type": { + "scalarType": "text" + }, + "description": "Address line No 1" + }, + "address_line_2": { + "fieldName": "address_line_2", + "type": { + "scalarType": "text" + }, + "description": "Address line No 2" + } + }, + "description": "The address of a person, obviously" + }, + "person_name": { + "typeName": "person_name", + "schemaName": "public", + "fields": { + "first_name": { + "fieldName": "first_name", + "type": { + "scalarType": "text" + }, + "description": "The first name of a person" + }, + "last_name": { + "fieldName": "last_name", + "type": { + "scalarType": "text" + }, + "description": "The last name of a person" + } + }, + "description": "The name of a person, obviously" + } + }, + "nativeQueries": { + "address_identity_function": { + "sql": { + "inline": "SELECT {{address}} as result" + }, + "columns": { + "result": { + "name": "result", + "type": { + "compositeType": "person_address" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "address": { + "name": "address", + "type": { + "compositeType": "person_address" + }, + "nullable": "nullable", + "description": null + } + }, + "description": "A native query used to test support for composite types" + }, + "album_by_title": { + "sql": { + "inline": "SELECT * FROM public.\"Album\" WHERE \"Title\" LIKE {{title}} AND \"AlbumId\" < {{id}}" + }, + "columns": { + "AlbumId": { + "name": "AlbumId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "ArtistId": { + "name": "ArtistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "Title": { + "name": "Title", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "id": { + "name": "id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "title": { + "name": "title", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "description": null + }, + "array_reverse": { + "sql": { + "inline": "SELECT array_agg(t.x) as reversed FROM (SELECT x FROM unnest({{array}}) WITH ORDINALITY AS t(x,ix) ORDER BY t.ix DESC) as t(x)" + }, + "columns": { + "reversed": { + "name": "reversed", + "type": { + "arrayType": { + "scalarType": "varchar" + } + }, + "nullable": "nullable", + "description": "The reversed array" + } + }, + "arguments": { + "array": { + "name": "array", + "type": { + "arrayType": { + "scalarType": "varchar" + } + }, + "nullable": "nonNullable", + "description": "The array to reverse. This is necessarily of a monomorphic type." + } + }, + "description": "A native query used to test support for arrays as inputs" + }, + "array_series": { + "sql": { + "inline": "SELECT 3 as three, array_agg(arr.series) AS series FROM (SELECT generate_series({{from}},{{to}}) AS series) AS arr" + }, + "columns": { + "series": { + "name": "series", + "type": { + "arrayType": { + "scalarType": "int4" + } + }, + "nullable": "nullable", + "description": null + }, + "three": { + "name": "three", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "from": { + "name": "from", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "to": { + "name": "to", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + } + }, + "description": "A native query used to test support for arrays" + }, + "artist": { + "sql": { + "inline": "SELECT * FROM public.\"Artist\"" + }, + "columns": { + "ArtistId": { + "name": "ArtistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "Name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": {}, + "description": null + }, + "artist_below_id": { + "sql": { + "inline": "SELECT * FROM public.\"Artist\" WHERE \"ArtistId\" < {{id}}" + }, + "columns": { + "id": { + "name": "ArtistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "id": { + "name": "id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + } + }, + "description": null + }, + "count_elements": { + "sql": { + "inline": "SELECT array_length({{array_argument}}, 1) as result" + }, + "columns": { + "result": { + "name": "result", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "array_argument": { + "name": "array_argument", + "type": { + "arrayType": { + "scalarType": "text" + } + }, + "nullable": "nullable", + "description": null + } + }, + "description": "A native query used to test support array-valued variables" + }, + "delete_playlist_track": { + "sql": { + "inline": "DELETE FROM public.\"PlaylistTrack\" WHERE \"TrackId\" = {{track_id}} RETURNING *" + }, + "columns": { + "PlaylistId": { + "name": "PlaylistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "TrackId": { + "name": "TrackId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "track_id": { + "name": "track_id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + } + }, + "description": null, + "isProcedure": true + }, + "insert_album": { + "sql": { + "inline": "INSERT INTO public.\"Album\" VALUES({{id}}, {{title}}, {{artist_id}}) RETURNING *" + }, + "columns": { + "AlbumId": { + "name": "AlbumId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "ArtistId": { + "name": "ArtistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "Title": { + "name": "Title", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "artist_id": { + "name": "artist_id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "id": { + "name": "id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "title": { + "name": "title", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "description": null, + "isProcedure": true + }, + "insert_artist": { + "sql": { + "inline": "INSERT INTO public.\"Artist\" VALUES ({{id}}, {{name}}) RETURNING *" + }, + "columns": { + "ArtistId": { + "name": "ArtistId", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "Name": { + "name": "Name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "id": { + "name": "id", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "name": { + "name": "name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "description": null, + "isProcedure": true + }, + "make_person": { + "sql": { + "inline": "SELECT ROW({{name}}, {{address}})::person as result" + }, + "columns": { + "result": { + "name": "result", + "type": { + "compositeType": "person" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "address": { + "name": "address", + "type": { + "compositeType": "person_address" + }, + "nullable": "nullable", + "description": null + }, + "name": { + "name": "name", + "type": { + "compositeType": "person_name" + }, + "nullable": "nullable", + "description": null + } + }, + "description": "A native query used to test support for composite types" + }, + "organization_identity_function": { + "sql": { + "inline": "SELECT {{organization}} as result_the_column" + }, + "columns": { + "result_the_field": { + "name": "result_the_column", + "type": { + "compositeType": "organization" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "organization": { + "name": "organization", + "type": { + "compositeType": "organization" + }, + "nullable": "nullable", + "description": null + } + }, + "description": "A native query used to test support for composite types" + }, + "summarize_organizations": { + "sql": { + "file": "./native_queries/summarize_organizations.sql" + }, + "columns": { + "result": { + "name": "result", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "organizations": { + "name": "organizations", + "type": { + "arrayType": { + "compositeType": "organization" + } + }, + "nullable": "nullable", + "description": null + } + }, + "description": "A native query used to test support array-valued variables" + }, + "value_types": { + "sql": { + "inline": "SELECT {{bool}} as bool, {{int4}} as int4, {{int2}} as int2, {{int8}} as int8, {{float4}} as float4, {{float8}} as \"float8\", {{numeric}} as numeric, {{char}} as char, {{varchar}} as \"varchar\", {{text}} as text, {{date}} as date, {{time}} as time, {{timetz}} as timetz, {{timestamp}} as timestamp, {{timestamptz}} as timestamptz, {{uuid}} as uuid" + }, + "columns": { + "bool": { + "name": "bool", + "type": { + "scalarType": "bool" + }, + "nullable": "nullable", + "description": null + }, + "char": { + "name": "char", + "type": { + "scalarType": "char" + }, + "nullable": "nullable", + "description": null + }, + "date": { + "name": "date", + "type": { + "scalarType": "date" + }, + "nullable": "nullable", + "description": null + }, + "float4": { + "name": "float4", + "type": { + "scalarType": "float4" + }, + "nullable": "nullable", + "description": null + }, + "float8": { + "name": "float8", + "type": { + "scalarType": "float8" + }, + "nullable": "nullable", + "description": null + }, + "int2": { + "name": "int2", + "type": { + "scalarType": "int2" + }, + "nullable": "nullable", + "description": null + }, + "int4": { + "name": "int4", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "int8": { + "name": "int8", + "type": { + "scalarType": "int8" + }, + "nullable": "nullable", + "description": null + }, + "numeric": { + "name": "numeric", + "type": { + "scalarType": "numeric" + }, + "nullable": "nullable", + "description": null + }, + "text": { + "name": "text", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + }, + "time": { + "name": "time", + "type": { + "scalarType": "time" + }, + "nullable": "nullable", + "description": null + }, + "timestamp": { + "name": "timestamp", + "type": { + "scalarType": "timestamp" + }, + "nullable": "nullable", + "description": null + }, + "timestamptz": { + "name": "timestamptz", + "type": { + "scalarType": "timestamptz" + }, + "nullable": "nullable", + "description": null + }, + "timetz": { + "name": "timetz", + "type": { + "scalarType": "timetz" + }, + "nullable": "nullable", + "description": null + }, + "uuid": { + "name": "uuid", + "type": { + "scalarType": "uuid" + }, + "nullable": "nullable", + "description": null + }, + "varchar": { + "name": "varchar", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "arguments": { + "bool": { + "name": "bool", + "type": { + "scalarType": "bool" + }, + "nullable": "nullable", + "description": null + }, + "char": { + "name": "char", + "type": { + "scalarType": "char" + }, + "nullable": "nullable", + "description": null + }, + "date": { + "name": "date", + "type": { + "scalarType": "date" + }, + "nullable": "nullable", + "description": null + }, + "float4": { + "name": "float4", + "type": { + "scalarType": "float4" + }, + "nullable": "nullable", + "description": null + }, + "float8": { + "name": "float8", + "type": { + "scalarType": "float8" + }, + "nullable": "nullable", + "description": null + }, + "int2": { + "name": "int2", + "type": { + "scalarType": "int2" + }, + "nullable": "nullable", + "description": null + }, + "int4": { + "name": "int4", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "int8": { + "name": "int8", + "type": { + "scalarType": "int8" + }, + "nullable": "nullable", + "description": null + }, + "numeric": { + "name": "numeric", + "type": { + "scalarType": "numeric" + }, + "nullable": "nullable", + "description": null + }, + "text": { + "name": "text", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + }, + "time": { + "name": "time", + "type": { + "scalarType": "time" + }, + "nullable": "nullable", + "description": null + }, + "timestamp": { + "name": "timestamp", + "type": { + "scalarType": "timestamp" + }, + "nullable": "nullable", + "description": null + }, + "timestamptz": { + "name": "timestamptz", + "type": { + "scalarType": "timestamptz" + }, + "nullable": "nullable", + "description": null + }, + "timetz": { + "name": "timetz", + "type": { + "scalarType": "timetz" + }, + "nullable": "nullable", + "description": null + }, + "uuid": { + "name": "uuid", + "type": { + "scalarType": "uuid" + }, + "nullable": "nullable", + "description": null + }, + "varchar": { + "name": "varchar", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "description": null + } + } + }, + "introspectionOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": ["public"], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_sup", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "mutationsVersion": "v2" +} diff --git a/static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/native_queries/summarize_organizations.sql b/static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/native_queries/summarize_organizations.sql new file mode 100644 index 000000000..58c5e163d --- /dev/null +++ b/static/ndc-metadata-snapshots/d81c5868fdfa4e040ee0b642455a965d74e7e9c013b85a278897cb8119aa4dba/native_queries/summarize_organizations.sql @@ -0,0 +1,22 @@ +SELECT + 'The organization ' || org.name || ' has ' || no_committees :: text || ' committees, ' || 'the largest of which has ' || max_members || ' members.' AS result +FROM + ( + SELECT + orgs.* + FROM + unnest({{organizations}}) AS orgs + ) AS org + JOIN LATERAL ( + SELECT + count(committee.*) AS no_committees, + max(members_agg.no_members) AS max_members + FROM + unnest(org.committees) AS committee + JOIN LATERAL ( + SELECT + count(*) AS no_members + FROM + unnest(committee.members) AS members + ) AS members_agg ON TRUE + ) AS coms ON TRUE diff --git a/static/postgres/v4-chinook-ndc-metadata/schema.json b/static/postgres/v4-chinook-ndc-metadata/schema.json deleted file mode 100644 index 787e63813..000000000 --- a/static/postgres/v4-chinook-ndc-metadata/schema.json +++ /dev/null @@ -1,1387 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ParsedConfiguration", - "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", - "type": "object", - "required": ["version"], - "properties": { - "version": { - "$ref": "#/definitions/Version" - }, - "$schema": { - "description": "Jsonschema of the configuration format.", - "type": ["string", "null"] - }, - "connectionSettings": { - "description": "Database connection settings.", - "default": { - "connectionUri": { - "variable": "CONNECTION_URI" - }, - "poolSettings": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "isolationLevel": "ReadCommitted" - }, - "allOf": [ - { - "$ref": "#/definitions/DatabaseConnectionSettings" - } - ] - }, - "metadata": { - "description": "Connector metadata.", - "default": { - "tables": {}, - "scalarTypes": {}, - "compositeTypes": {}, - "nativeQueries": {} - }, - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, - "introspectionOptions": { - "description": "Database introspection options.", - "default": { - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "unqualifiedSchemasForTables": ["public"], - "unqualifiedSchemasForTypesAndProcedures": [ - "public", - "pg_catalog", - "tiger" - ], - "comparisonOperatorMapping": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "introspectPrefixFunctionComparisonOperators": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "typeRepresentations": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - } - }, - "allOf": [ - { - "$ref": "#/definitions/IntrospectionOptions" - } - ] - }, - "mutationsVersion": { - "description": "Which version of the generated mutation procedures to include in the schema response", - "anyOf": [ - { - "$ref": "#/definitions/MutationsVersion" - }, - { - "type": "null" - } - ] - } - }, - "definitions": { - "Version": { - "type": "string", - "enum": ["4"] - }, - "DatabaseConnectionSettings": { - "description": "Database connection settings.", - "type": "object", - "required": ["connectionUri"], - "properties": { - "connectionUri": { - "description": "Connection string for a Postgres-compatible database.", - "allOf": [ - { - "$ref": "#/definitions/ConnectionUri" - } - ] - }, - "poolSettings": { - "description": "Connection pool settings.", - "default": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "allOf": [ - { - "$ref": "#/definitions/PoolSettings" - } - ] - }, - "isolationLevel": { - "description": "Query isolation level.", - "default": "ReadCommitted", - "allOf": [ - { - "$ref": "#/definitions/IsolationLevel" - } - ] - } - } - }, - "ConnectionUri": { - "$ref": "#/definitions/Secret" - }, - "Secret": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": ["variable"], - "properties": { - "variable": { - "$ref": "#/definitions/Variable" - } - } - } - ] - }, - "Variable": { - "description": "The name of an an environment variable.", - "type": "string" - }, - "PoolSettings": { - "description": "Settings for the PostgreSQL connection pool", - "type": "object", - "properties": { - "maxConnections": { - "description": "maximum number of pool connections", - "default": 50, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "poolTimeout": { - "description": "timeout for acquiring a connection from the pool (seconds)", - "default": 30, - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "idleTimeout": { - "description": "idle timeout for releasing a connection from the pool (seconds)", - "default": 180, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "checkConnectionAfterIdle": { - "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", - "default": 60, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "connectionLifetime": { - "description": "maximum lifetime for an individual connection (seconds)", - "default": 600, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - } - } - }, - "IsolationLevel": { - "description": "The isolation level of the transaction in which a query is executed.", - "oneOf": [ - { - "description": "Prevents reading data from another uncommitted transaction.", - "type": "string", - "enum": ["ReadCommitted"] - }, - { - "description": "Reading the same data twice is guaranteed to return the same result.", - "type": "string", - "enum": ["RepeatableRead"] - }, - { - "description": "Concurrent transactions behave identically to serializing them one at a time.", - "type": "string", - "enum": ["Serializable"] - } - ] - }, - "Metadata": { - "description": "Metadata information.", - "type": "object", - "properties": { - "tables": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TablesInfo" - } - ] - }, - "scalarTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ScalarTypes" - } - ] - }, - "compositeTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/CompositeTypes" - } - ] - }, - "nativeQueries": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/NativeQueries" - } - ] - } - } - }, - "TablesInfo": { - "description": "Mapping from a \"table\" name to its information.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TableInfo" - } - }, - "TableInfo": { - "description": "Information about a database table (or any other kind of relation).", - "type": "object", - "required": ["columns", "schemaName", "tableName"], - "properties": { - "schemaName": { - "type": "string" - }, - "tableName": { - "type": "string" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ColumnInfo" - } - }, - "uniquenessConstraints": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/UniquenessConstraints" - } - ] - }, - "foreignRelations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ForeignRelations" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "ColumnInfo": { - "description": "Information about a database column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "hasDefault": { - "$ref": "#/definitions/HasDefault" - }, - "isIdentity": { - "$ref": "#/definitions/IsIdentity" - }, - "isGenerated": { - "$ref": "#/definitions/IsGenerated" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "Type": { - "description": "The type of values that a column, field, or argument may take.", - "oneOf": [ - { - "type": "object", - "required": ["scalarType"], - "properties": { - "scalarType": { - "$ref": "#/definitions/ScalarTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["compositeType"], - "properties": { - "compositeType": { - "$ref": "#/definitions/CompositeTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["arrayType"], - "properties": { - "arrayType": { - "$ref": "#/definitions/Type" - } - }, - "additionalProperties": false - } - ] - }, - "ScalarTypeName": { - "description": "A name of a Scalar Type, as it appears in the NDC scheme.", - "type": "string" - }, - "CompositeTypeName": { - "description": "The name of a Composite Type, as it appears in the NDC schema", - "type": "string" - }, - "Nullable": { - "description": "Can this column contain null values", - "type": "string", - "enum": ["nullable", "nonNullable"] - }, - "HasDefault": { - "description": "Does this column have a default value.", - "type": "string", - "enum": ["noDefault", "hasDefault"] - }, - "IsIdentity": { - "description": "Is this column an identity column.", - "type": "string", - "enum": ["notIdentity", "identityByDefault", "identityAlways"] - }, - "IsGenerated": { - "description": "Is this column a generated column.", - "type": "string", - "enum": ["notGenerated", "stored"] - }, - "UniquenessConstraints": { - "description": "A mapping from the name of a unique constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UniquenessConstraint" - } - }, - "UniquenessConstraint": { - "description": "The set of columns that make up a uniqueness constraint.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "ForeignRelations": { - "description": "A mapping from the name of a foreign key constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ForeignRelation" - } - }, - "ForeignRelation": { - "description": "A foreign key constraint.", - "type": "object", - "required": ["columnMapping", "foreignTable"], - "properties": { - "foreignSchema": { - "type": ["string", "null"] - }, - "foreignTable": { - "type": "string" - }, - "columnMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ScalarTypes": { - "description": "Map of all known/occurring scalar types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ScalarType" - } - }, - "ScalarType": { - "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", - "type": "object", - "required": [ - "aggregateFunctions", - "comparisonOperators", - "schemaName", - "typeName" - ], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "description": { - "type": ["string", "null"] - }, - "aggregateFunctions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AggregateFunction" - } - }, - "comparisonOperators": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ComparisonOperator" - } - }, - "typeRepresentation": { - "anyOf": [ - { - "$ref": "#/definitions/TypeRepresentation" - }, - { - "type": "null" - } - ] - } - } - }, - "AggregateFunction": { - "type": "object", - "required": ["returnType"], - "properties": { - "returnType": { - "$ref": "#/definitions/ScalarTypeName" - } - } - }, - "ComparisonOperator": { - "description": "Represents a postgres binary comparison operator", - "type": "object", - "required": ["argumentType", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "type": "string" - }, - "operatorKind": { - "$ref": "#/definitions/OperatorKind" - }, - "argumentType": { - "$ref": "#/definitions/ScalarTypeName" - }, - "isInfix": { - "default": true, - "type": "boolean" - } - } - }, - "OperatorKind": { - "description": "Is it a built-in operator, or a custom operator.", - "type": "string", - "enum": ["equal", "in", "custom"] - }, - "TypeRepresentation": { - "description": "Type representation of a scalar type.", - "oneOf": [ - { - "description": "JSON booleans", - "type": "string", - "enum": ["boolean"] - }, - { - "description": "Any JSON string", - "type": "string", - "enum": ["string"] - }, - { - "description": "float4", - "type": "string", - "enum": ["float32"] - }, - { - "description": "float8", - "type": "string", - "enum": ["float64"] - }, - { - "description": "int2", - "type": "string", - "enum": ["int16"] - }, - { - "description": "int4", - "type": "string", - "enum": ["int32"] - }, - { - "description": "int8 as integer", - "type": "string", - "enum": ["int64"] - }, - { - "description": "int8 as string", - "type": "string", - "enum": ["int64AsString"] - }, - { - "description": "numeric", - "type": "string", - "enum": ["bigDecimal"] - }, - { - "description": "numeric as string", - "type": "string", - "enum": ["bigDecimalAsString"] - }, - { - "description": "timestamp", - "type": "string", - "enum": ["timestamp"] - }, - { - "description": "timestamp with timezone", - "type": "string", - "enum": ["timestamptz"] - }, - { - "description": "time", - "type": "string", - "enum": ["time"] - }, - { - "description": "time with timezone", - "type": "string", - "enum": ["timetz"] - }, - { - "description": "date", - "type": "string", - "enum": ["date"] - }, - { - "description": "uuid", - "type": "string", - "enum": ["uUID"] - }, - { - "description": "geography", - "type": "string", - "enum": ["geography"] - }, - { - "description": "geometry", - "type": "string", - "enum": ["geometry"] - }, - { - "description": "Any JSON number", - "type": "string", - "enum": ["number"] - }, - { - "description": "Any JSON number, with no decimal part", - "type": "string", - "enum": ["integer"] - }, - { - "description": "An arbitrary json.", - "type": "string", - "enum": ["json"] - }, - { - "description": "One of the specified string values", - "type": "object", - "required": ["enum"], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - ] - }, - "CompositeTypes": { - "description": "Map of all known composite types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CompositeType" - } - }, - "CompositeType": { - "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", - "type": "object", - "required": ["fields", "schemaName", "typeName"], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/FieldInfo" - } - }, - "description": { - "type": ["string", "null"] - } - } - }, - "FieldInfo": { - "description": "Information about a composite type field.", - "type": "object", - "required": ["fieldName", "type"], - "properties": { - "fieldName": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "NativeQueries": { - "description": "Metadata information of native queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NativeQueryInfo" - } - }, - "NativeQueryInfo": { - "description": "Information about a Native Query", - "type": "object", - "required": ["columns", "sql"], - "properties": { - "sql": { - "description": "SQL expression to use for the Native Query. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", - "allOf": [ - { - "$ref": "#/definitions/NativeQuerySql" - } - ] - }, - "columns": { - "description": "Columns returned by the Native Query", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "arguments": { - "description": "Names and types of arguments that can be passed to this Native Query", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "description": { - "type": ["string", "null"] - }, - "isProcedure": { - "description": "True if this native query mutates the database", - "type": "boolean" - } - } - }, - "NativeQuerySql": { - "description": "Native Query SQL location.", - "anyOf": [ - { - "description": "Refer to an external Native Query SQL file.", - "type": "object", - "required": ["file"], - "properties": { - "file": { - "description": "Relative path to a sql file.", - "type": "string" - } - } - }, - { - "description": "Inline Native Query SQL string.", - "type": "object", - "required": ["inline"], - "properties": { - "inline": { - "description": "An inline Native Query SQL string.", - "allOf": [ - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - } - } - }, - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - }, - "InlineNativeQuerySql": { - "type": "string" - }, - "ReadOnlyColumnInfo": { - "description": "Information about a native query column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "IntrospectionOptions": { - "description": "Options which only influence how the configuration is updated.", - "type": "object", - "properties": { - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTables": { - "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", - "default": ["public"], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTypesAndProcedures": { - "description": "The types and procedures in these schemas will be returned unqualified.", - "default": ["public", "pg_catalog", "tiger"], - "type": "array", - "items": { - "type": "string" - } - }, - "comparisonOperatorMapping": { - "description": "The mapping of comparison operator names to apply when updating the configuration", - "default": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "type": "array", - "items": { - "$ref": "#/definitions/ComparisonOperatorMapping" - } - }, - "introspectPrefixFunctionComparisonOperators": { - "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", - "default": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "typeRepresentations": { - "description": "The type representations to pick for base scalar types.", - "default": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - }, - "allOf": [ - { - "$ref": "#/definitions/TypeRepresentations" - } - ] - } - } - }, - "ComparisonOperatorMapping": { - "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", - "type": "object", - "required": ["exposedName", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "description": "The name of the operator as defined by the database", - "type": "string" - }, - "exposedName": { - "description": "The name the operator will appear under in the exposed API", - "type": "string" - }, - "operatorKind": { - "description": "Equal, In or Custom.", - "allOf": [ - { - "$ref": "#/definitions/OperatorKind" - } - ] - } - } - }, - "TypeRepresentations": { - "description": "The type representations that guide introspection.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TypeRepresentation" - } - }, - "MutationsVersion": { - "description": "Which version of the generated mutations will be included in the schema", - "type": "string", - "enum": ["v1", "v2"] - } - } -} diff --git a/static/schema.json b/static/schema.json index 787e63813..e30671d16 100644 --- a/static/schema.json +++ b/static/schema.json @@ -10,6 +10,7 @@ }, "$schema": { "description": "Jsonschema of the configuration format.", + "default": null, "type": ["string", "null"] }, "connectionSettings": { @@ -323,6 +324,7 @@ }, "mutationsVersion": { "description": "Which version of the generated mutation procedures to include in the schema response", + "default": null, "anyOf": [ { "$ref": "#/definitions/MutationsVersion" @@ -540,6 +542,7 @@ ] }, "description": { + "default": null, "type": ["string", "null"] } } @@ -573,6 +576,7 @@ "$ref": "#/definitions/IsGenerated" }, "description": { + "default": null, "type": ["string", "null"] } } @@ -914,6 +918,7 @@ } }, "description": { + "default": null, "type": ["string", "null"] } } @@ -930,6 +935,7 @@ "$ref": "#/definitions/Type" }, "description": { + "default": null, "type": ["string", "null"] } } @@ -970,6 +976,7 @@ } }, "description": { + "default": null, "type": ["string", "null"] }, "isProcedure": { @@ -1035,6 +1042,7 @@ ] }, "description": { + "default": null, "type": ["string", "null"] } } diff --git a/static/yugabyte/v4-chinook-ndc-metadata/schema.json b/static/yugabyte/v4-chinook-ndc-metadata/schema.json deleted file mode 100644 index 787e63813..000000000 --- a/static/yugabyte/v4-chinook-ndc-metadata/schema.json +++ /dev/null @@ -1,1387 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ParsedConfiguration", - "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", - "type": "object", - "required": ["version"], - "properties": { - "version": { - "$ref": "#/definitions/Version" - }, - "$schema": { - "description": "Jsonschema of the configuration format.", - "type": ["string", "null"] - }, - "connectionSettings": { - "description": "Database connection settings.", - "default": { - "connectionUri": { - "variable": "CONNECTION_URI" - }, - "poolSettings": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "isolationLevel": "ReadCommitted" - }, - "allOf": [ - { - "$ref": "#/definitions/DatabaseConnectionSettings" - } - ] - }, - "metadata": { - "description": "Connector metadata.", - "default": { - "tables": {}, - "scalarTypes": {}, - "compositeTypes": {}, - "nativeQueries": {} - }, - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, - "introspectionOptions": { - "description": "Database introspection options.", - "default": { - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "unqualifiedSchemasForTables": ["public"], - "unqualifiedSchemasForTypesAndProcedures": [ - "public", - "pg_catalog", - "tiger" - ], - "comparisonOperatorMapping": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "introspectPrefixFunctionComparisonOperators": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "typeRepresentations": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - } - }, - "allOf": [ - { - "$ref": "#/definitions/IntrospectionOptions" - } - ] - }, - "mutationsVersion": { - "description": "Which version of the generated mutation procedures to include in the schema response", - "anyOf": [ - { - "$ref": "#/definitions/MutationsVersion" - }, - { - "type": "null" - } - ] - } - }, - "definitions": { - "Version": { - "type": "string", - "enum": ["4"] - }, - "DatabaseConnectionSettings": { - "description": "Database connection settings.", - "type": "object", - "required": ["connectionUri"], - "properties": { - "connectionUri": { - "description": "Connection string for a Postgres-compatible database.", - "allOf": [ - { - "$ref": "#/definitions/ConnectionUri" - } - ] - }, - "poolSettings": { - "description": "Connection pool settings.", - "default": { - "maxConnections": 50, - "poolTimeout": 30, - "idleTimeout": 180, - "checkConnectionAfterIdle": 60, - "connectionLifetime": 600 - }, - "allOf": [ - { - "$ref": "#/definitions/PoolSettings" - } - ] - }, - "isolationLevel": { - "description": "Query isolation level.", - "default": "ReadCommitted", - "allOf": [ - { - "$ref": "#/definitions/IsolationLevel" - } - ] - } - } - }, - "ConnectionUri": { - "$ref": "#/definitions/Secret" - }, - "Secret": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": ["variable"], - "properties": { - "variable": { - "$ref": "#/definitions/Variable" - } - } - } - ] - }, - "Variable": { - "description": "The name of an an environment variable.", - "type": "string" - }, - "PoolSettings": { - "description": "Settings for the PostgreSQL connection pool", - "type": "object", - "properties": { - "maxConnections": { - "description": "maximum number of pool connections", - "default": 50, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "poolTimeout": { - "description": "timeout for acquiring a connection from the pool (seconds)", - "default": 30, - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "idleTimeout": { - "description": "idle timeout for releasing a connection from the pool (seconds)", - "default": 180, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "checkConnectionAfterIdle": { - "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", - "default": 60, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - }, - "connectionLifetime": { - "description": "maximum lifetime for an individual connection (seconds)", - "default": 600, - "type": ["integer", "null"], - "format": "uint64", - "minimum": 0.0 - } - } - }, - "IsolationLevel": { - "description": "The isolation level of the transaction in which a query is executed.", - "oneOf": [ - { - "description": "Prevents reading data from another uncommitted transaction.", - "type": "string", - "enum": ["ReadCommitted"] - }, - { - "description": "Reading the same data twice is guaranteed to return the same result.", - "type": "string", - "enum": ["RepeatableRead"] - }, - { - "description": "Concurrent transactions behave identically to serializing them one at a time.", - "type": "string", - "enum": ["Serializable"] - } - ] - }, - "Metadata": { - "description": "Metadata information.", - "type": "object", - "properties": { - "tables": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/TablesInfo" - } - ] - }, - "scalarTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ScalarTypes" - } - ] - }, - "compositeTypes": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/CompositeTypes" - } - ] - }, - "nativeQueries": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/NativeQueries" - } - ] - } - } - }, - "TablesInfo": { - "description": "Mapping from a \"table\" name to its information.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TableInfo" - } - }, - "TableInfo": { - "description": "Information about a database table (or any other kind of relation).", - "type": "object", - "required": ["columns", "schemaName", "tableName"], - "properties": { - "schemaName": { - "type": "string" - }, - "tableName": { - "type": "string" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ColumnInfo" - } - }, - "uniquenessConstraints": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/UniquenessConstraints" - } - ] - }, - "foreignRelations": { - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/ForeignRelations" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "ColumnInfo": { - "description": "Information about a database column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "hasDefault": { - "$ref": "#/definitions/HasDefault" - }, - "isIdentity": { - "$ref": "#/definitions/IsIdentity" - }, - "isGenerated": { - "$ref": "#/definitions/IsGenerated" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "Type": { - "description": "The type of values that a column, field, or argument may take.", - "oneOf": [ - { - "type": "object", - "required": ["scalarType"], - "properties": { - "scalarType": { - "$ref": "#/definitions/ScalarTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["compositeType"], - "properties": { - "compositeType": { - "$ref": "#/definitions/CompositeTypeName" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["arrayType"], - "properties": { - "arrayType": { - "$ref": "#/definitions/Type" - } - }, - "additionalProperties": false - } - ] - }, - "ScalarTypeName": { - "description": "A name of a Scalar Type, as it appears in the NDC scheme.", - "type": "string" - }, - "CompositeTypeName": { - "description": "The name of a Composite Type, as it appears in the NDC schema", - "type": "string" - }, - "Nullable": { - "description": "Can this column contain null values", - "type": "string", - "enum": ["nullable", "nonNullable"] - }, - "HasDefault": { - "description": "Does this column have a default value.", - "type": "string", - "enum": ["noDefault", "hasDefault"] - }, - "IsIdentity": { - "description": "Is this column an identity column.", - "type": "string", - "enum": ["notIdentity", "identityByDefault", "identityAlways"] - }, - "IsGenerated": { - "description": "Is this column a generated column.", - "type": "string", - "enum": ["notGenerated", "stored"] - }, - "UniquenessConstraints": { - "description": "A mapping from the name of a unique constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UniquenessConstraint" - } - }, - "UniquenessConstraint": { - "description": "The set of columns that make up a uniqueness constraint.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "ForeignRelations": { - "description": "A mapping from the name of a foreign key constraint to its value.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ForeignRelation" - } - }, - "ForeignRelation": { - "description": "A foreign key constraint.", - "type": "object", - "required": ["columnMapping", "foreignTable"], - "properties": { - "foreignSchema": { - "type": ["string", "null"] - }, - "foreignTable": { - "type": "string" - }, - "columnMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ScalarTypes": { - "description": "Map of all known/occurring scalar types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ScalarType" - } - }, - "ScalarType": { - "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", - "type": "object", - "required": [ - "aggregateFunctions", - "comparisonOperators", - "schemaName", - "typeName" - ], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "description": { - "type": ["string", "null"] - }, - "aggregateFunctions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AggregateFunction" - } - }, - "comparisonOperators": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ComparisonOperator" - } - }, - "typeRepresentation": { - "anyOf": [ - { - "$ref": "#/definitions/TypeRepresentation" - }, - { - "type": "null" - } - ] - } - } - }, - "AggregateFunction": { - "type": "object", - "required": ["returnType"], - "properties": { - "returnType": { - "$ref": "#/definitions/ScalarTypeName" - } - } - }, - "ComparisonOperator": { - "description": "Represents a postgres binary comparison operator", - "type": "object", - "required": ["argumentType", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "type": "string" - }, - "operatorKind": { - "$ref": "#/definitions/OperatorKind" - }, - "argumentType": { - "$ref": "#/definitions/ScalarTypeName" - }, - "isInfix": { - "default": true, - "type": "boolean" - } - } - }, - "OperatorKind": { - "description": "Is it a built-in operator, or a custom operator.", - "type": "string", - "enum": ["equal", "in", "custom"] - }, - "TypeRepresentation": { - "description": "Type representation of a scalar type.", - "oneOf": [ - { - "description": "JSON booleans", - "type": "string", - "enum": ["boolean"] - }, - { - "description": "Any JSON string", - "type": "string", - "enum": ["string"] - }, - { - "description": "float4", - "type": "string", - "enum": ["float32"] - }, - { - "description": "float8", - "type": "string", - "enum": ["float64"] - }, - { - "description": "int2", - "type": "string", - "enum": ["int16"] - }, - { - "description": "int4", - "type": "string", - "enum": ["int32"] - }, - { - "description": "int8 as integer", - "type": "string", - "enum": ["int64"] - }, - { - "description": "int8 as string", - "type": "string", - "enum": ["int64AsString"] - }, - { - "description": "numeric", - "type": "string", - "enum": ["bigDecimal"] - }, - { - "description": "numeric as string", - "type": "string", - "enum": ["bigDecimalAsString"] - }, - { - "description": "timestamp", - "type": "string", - "enum": ["timestamp"] - }, - { - "description": "timestamp with timezone", - "type": "string", - "enum": ["timestamptz"] - }, - { - "description": "time", - "type": "string", - "enum": ["time"] - }, - { - "description": "time with timezone", - "type": "string", - "enum": ["timetz"] - }, - { - "description": "date", - "type": "string", - "enum": ["date"] - }, - { - "description": "uuid", - "type": "string", - "enum": ["uUID"] - }, - { - "description": "geography", - "type": "string", - "enum": ["geography"] - }, - { - "description": "geometry", - "type": "string", - "enum": ["geometry"] - }, - { - "description": "Any JSON number", - "type": "string", - "enum": ["number"] - }, - { - "description": "Any JSON number, with no decimal part", - "type": "string", - "enum": ["integer"] - }, - { - "description": "An arbitrary json.", - "type": "string", - "enum": ["json"] - }, - { - "description": "One of the specified string values", - "type": "object", - "required": ["enum"], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - ] - }, - "CompositeTypes": { - "description": "Map of all known composite types.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CompositeType" - } - }, - "CompositeType": { - "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", - "type": "object", - "required": ["fields", "schemaName", "typeName"], - "properties": { - "typeName": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/FieldInfo" - } - }, - "description": { - "type": ["string", "null"] - } - } - }, - "FieldInfo": { - "description": "Information about a composite type field.", - "type": "object", - "required": ["fieldName", "type"], - "properties": { - "fieldName": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "description": { - "type": ["string", "null"] - } - } - }, - "NativeQueries": { - "description": "Metadata information of native queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NativeQueryInfo" - } - }, - "NativeQueryInfo": { - "description": "Information about a Native Query", - "type": "object", - "required": ["columns", "sql"], - "properties": { - "sql": { - "description": "SQL expression to use for the Native Query. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", - "allOf": [ - { - "$ref": "#/definitions/NativeQuerySql" - } - ] - }, - "columns": { - "description": "Columns returned by the Native Query", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "arguments": { - "description": "Names and types of arguments that can be passed to this Native Query", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ReadOnlyColumnInfo" - } - }, - "description": { - "type": ["string", "null"] - }, - "isProcedure": { - "description": "True if this native query mutates the database", - "type": "boolean" - } - } - }, - "NativeQuerySql": { - "description": "Native Query SQL location.", - "anyOf": [ - { - "description": "Refer to an external Native Query SQL file.", - "type": "object", - "required": ["file"], - "properties": { - "file": { - "description": "Relative path to a sql file.", - "type": "string" - } - } - }, - { - "description": "Inline Native Query SQL string.", - "type": "object", - "required": ["inline"], - "properties": { - "inline": { - "description": "An inline Native Query SQL string.", - "allOf": [ - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - } - } - }, - { - "$ref": "#/definitions/InlineNativeQuerySql" - } - ] - }, - "InlineNativeQuerySql": { - "type": "string" - }, - "ReadOnlyColumnInfo": { - "description": "Information about a native query column.", - "type": "object", - "required": ["name", "type"], - "properties": { - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Type" - }, - "nullable": { - "default": "nullable", - "allOf": [ - { - "$ref": "#/definitions/Nullable" - } - ] - }, - "description": { - "type": ["string", "null"] - } - } - }, - "IntrospectionOptions": { - "description": "Options which only influence how the configuration is updated.", - "type": "object", - "properties": { - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTables": { - "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", - "default": ["public"], - "type": "array", - "items": { - "type": "string" - } - }, - "unqualifiedSchemasForTypesAndProcedures": { - "description": "The types and procedures in these schemas will be returned unqualified.", - "default": ["public", "pg_catalog", "tiger"], - "type": "array", - "items": { - "type": "string" - } - }, - "comparisonOperatorMapping": { - "description": "The mapping of comparison operator names to apply when updating the configuration", - "default": [ - { - "operatorName": "=", - "exposedName": "_eq", - "operatorKind": "equal" - }, - { - "operatorName": "<=", - "exposedName": "_lte", - "operatorKind": "custom" - }, - { - "operatorName": ">", - "exposedName": "_gt", - "operatorKind": "custom" - }, - { - "operatorName": ">=", - "exposedName": "_gte", - "operatorKind": "custom" - }, - { - "operatorName": "<", - "exposedName": "_lt", - "operatorKind": "custom" - }, - { - "operatorName": "!=", - "exposedName": "_neq", - "operatorKind": "custom" - }, - { - "operatorName": "LIKE", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "NOT LIKE", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "ILIKE", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "NOT ILIKE", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "SIMILAR TO", - "exposedName": "_similar", - "operatorKind": "custom" - }, - { - "operatorName": "NOT SIMILAR TO", - "exposedName": "_nsimilar", - "operatorKind": "custom" - }, - { - "operatorName": "~~", - "exposedName": "_like", - "operatorKind": "custom" - }, - { - "operatorName": "!~~", - "exposedName": "_nlike", - "operatorKind": "custom" - }, - { - "operatorName": "~~*", - "exposedName": "_ilike", - "operatorKind": "custom" - }, - { - "operatorName": "!~~*", - "exposedName": "_nilike", - "operatorKind": "custom" - }, - { - "operatorName": "~", - "exposedName": "_regex", - "operatorKind": "custom" - }, - { - "operatorName": "!~", - "exposedName": "_nregex", - "operatorKind": "custom" - }, - { - "operatorName": "~*", - "exposedName": "_iregex", - "operatorKind": "custom" - }, - { - "operatorName": "!~*", - "exposedName": "_niregex", - "operatorKind": "custom" - } - ], - "type": "array", - "items": { - "$ref": "#/definitions/ComparisonOperatorMapping" - } - }, - "introspectPrefixFunctionComparisonOperators": { - "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", - "default": [ - "box_above", - "box_below", - "box_contain", - "box_contain_pt", - "box_contained", - "box_left", - "box_overabove", - "box_overbelow", - "box_overlap", - "box_overleft", - "box_overright", - "box_right", - "box_same", - "circle_above", - "circle_below", - "circle_contain", - "circle_contain_pt", - "circle_contained", - "circle_left", - "circle_overabove", - "circle_overbelow", - "circle_overlap", - "circle_overleft", - "circle_overright", - "circle_right", - "circle_same", - "contains_2d", - "equals", - "geography_overlaps", - "geometry_above", - "geometry_below", - "geometry_contained_3d", - "geometry_contains", - "geometry_contains_3d", - "geometry_contains_nd", - "geometry_left", - "geometry_overabove", - "geometry_overbelow", - "geometry_overlaps", - "geometry_overlaps_3d", - "geometry_overlaps_nd", - "geometry_overleft", - "geometry_overright", - "geometry_right", - "geometry_same", - "geometry_same_3d", - "geometry_same_nd", - "geometry_within", - "geometry_within_nd", - "inet_same_family", - "inter_lb", - "inter_sb", - "inter_sl", - "is_contained_2d", - "ishorizontal", - "isparallel", - "isperp", - "isvertical", - "jsonb_contained", - "jsonb_contains", - "jsonb_exists", - "jsonb_path_exists_opr", - "jsonb_path_match_opr", - "line_intersect", - "line_parallel", - "line_perp", - "lseg_intersect", - "lseg_parallel", - "lseg_perp", - "network_overlap", - "network_sub", - "network_sup", - "on_pb", - "on_pl", - "on_ppath", - "on_ps", - "on_sb", - "on_sl", - "overlaps_2d", - "path_contain_pt", - "path_inter", - "point_above", - "point_below", - "point_horiz", - "point_left", - "point_right", - "point_vert", - "poly_above", - "poly_below", - "poly_contain", - "poly_contain_pt", - "poly_contained", - "poly_left", - "poly_overabove", - "poly_overbelow", - "poly_overlap", - "poly_overleft", - "poly_overright", - "poly_right", - "poly_same", - "pt_contained_poly", - "st_3dintersects", - "st_contains", - "st_containsproperly", - "st_coveredby", - "st_covers", - "st_crosses", - "st_disjoint", - "st_equals", - "st_intersects", - "st_isvalid", - "st_orderingequals", - "st_overlaps", - "st_relatematch", - "st_touches", - "st_within", - "starts_with", - "ts_match_qv", - "ts_match_tq", - "ts_match_tt", - "ts_match_vq", - "tsq_mcontained", - "tsq_mcontains", - "xmlexists", - "xmlvalidate", - "xpath_exists" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "typeRepresentations": { - "description": "The type representations to pick for base scalar types.", - "default": { - "bit": "string", - "bool": "boolean", - "bpchar": "string", - "char": "string", - "date": "date", - "float4": "float32", - "float8": "float64", - "int2": "int16", - "int4": "int32", - "int8": "int64AsString", - "numeric": "bigDecimalAsString", - "text": "string", - "time": "time", - "timestamp": "timestamp", - "timestamptz": "timestamptz", - "timetz": "timetz", - "uuid": "uUID", - "varchar": "string" - }, - "allOf": [ - { - "$ref": "#/definitions/TypeRepresentations" - } - ] - } - } - }, - "ComparisonOperatorMapping": { - "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", - "type": "object", - "required": ["exposedName", "operatorKind", "operatorName"], - "properties": { - "operatorName": { - "description": "The name of the operator as defined by the database", - "type": "string" - }, - "exposedName": { - "description": "The name the operator will appear under in the exposed API", - "type": "string" - }, - "operatorKind": { - "description": "Equal, In or Custom.", - "allOf": [ - { - "$ref": "#/definitions/OperatorKind" - } - ] - } - } - }, - "TypeRepresentations": { - "description": "The type representations that guide introspection.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TypeRepresentation" - } - }, - "MutationsVersion": { - "description": "Which version of the generated mutations will be included in the schema", - "type": "string", - "enum": ["v1", "v2"] - } - } -}