From 94571d7ef435ebec190e47bd73baa9fd49b5c97f Mon Sep 17 00:00:00 2001 From: Gil Mizrahi Date: Fri, 19 Jul 2024 17:12:59 +0300 Subject: [PATCH 1/4] introspect for more operator names --- .../src/postgres/query_tests.rs | 6 + ..._predicates__where_cidr_network_supeq.snap | 14 + ...schema_tests__schema_test__get_schema.snap | 369 ++++++++++++++++++ .../goldenfiles/where_cidr_network_supeq.json | 32 ++ justfile | 4 +- static/custom-tables.sql | 3 + 6 files changed, 426 insertions(+), 2 deletions(-) create mode 100644 crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__query_tests__predicates__where_cidr_network_supeq.snap create mode 100644 crates/tests/tests-common/goldenfiles/where_cidr_network_supeq.json diff --git a/crates/tests/databases-tests/src/postgres/query_tests.rs b/crates/tests/databases-tests/src/postgres/query_tests.rs index 720438fec..09d9ca6f9 100644 --- a/crates/tests/databases-tests/src/postgres/query_tests.rs +++ b/crates/tests/databases-tests/src/postgres/query_tests.rs @@ -255,6 +255,12 @@ mod predicates { insta::assert_json_snapshot!(result); } + #[tokio::test] + async fn where_cidr_network_supeq() { + let result = run_query(create_router().await, "where_cidr_network_supeq").await; + insta::assert_json_snapshot!(result); + } + #[tokio::test] async fn select_where_or() { let result = run_query(create_router().await, "select_where_or").await; diff --git a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__query_tests__predicates__where_cidr_network_supeq.snap b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__query_tests__predicates__where_cidr_network_supeq.snap new file mode 100644 index 000000000..719496604 --- /dev/null +++ b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__query_tests__predicates__where_cidr_network_supeq.snap @@ -0,0 +1,14 @@ +--- +source: crates/tests/databases-tests/src/postgres/query_tests.rs +expression: result +--- +[ + { + "rows": [ + { + "ip": "64.6.64.0/24", + "service": "my_service" + } + ] + } +] diff --git a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap index 1fbd32dbf..ed9a022a5 100644 --- a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap +++ b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap @@ -161,6 +161,20 @@ expression: result "name": "Phone" } }, + "text_pattern_ge": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "Phone" + } + }, + "text_pattern_gt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "Phone" + } + }, "ts_match_tt": { "type": "custom", "argument_type": { @@ -478,6 +492,20 @@ expression: result "name": "char" } }, + "text_pattern_ge": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "char" + } + }, + "text_pattern_gt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "char" + } + }, "ts_match_tt": { "type": "custom", "argument_type": { @@ -487,6 +515,113 @@ expression: result } } }, + "cidr": { + "aggregate_functions": { + "max": { + "result_type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "inet" + } + } + }, + "min": { + "result_type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "inet" + } + } + } + }, + "comparison_operators": { + "_eq": { + "type": "equal" + }, + "_gt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "_gte": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "_in": { + "type": "in" + }, + "_lt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "_lte": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "_neq": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "inet_same_family": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "network_overlap": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "network_sub": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "network_subeq": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "network_sup": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + }, + "network_supeq": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "cidr" + } + } + } + }, "date": { "representation": { "type": "date" @@ -1002,6 +1137,113 @@ expression: result } } }, + "inet": { + "aggregate_functions": { + "max": { + "result_type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "inet" + } + } + }, + "min": { + "result_type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "inet" + } + } + } + }, + "comparison_operators": { + "_eq": { + "type": "equal" + }, + "_gt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "_gte": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "_in": { + "type": "in" + }, + "_lt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "_lte": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "_neq": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "inet_same_family": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "network_overlap": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "network_sub": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "network_subeq": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "network_sup": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + }, + "network_supeq": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "inet" + } + } + } + }, "int2": { "representation": { "type": "int16" @@ -1883,6 +2125,20 @@ expression: result "name": "text" } }, + "text_pattern_ge": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "text" + } + }, + "text_pattern_gt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "text" + } + }, "ts_match_tt": { "type": "custom", "argument_type": { @@ -2388,6 +2644,20 @@ expression: result "name": "varchar" } }, + "text_pattern_ge": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "varchar" + } + }, + "text_pattern_gt": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "varchar" + } + }, "ts_match_tt": { "type": "custom", "argument_type": { @@ -3227,6 +3497,28 @@ expression: result } } }, + "custom_test_cidr": { + "fields": { + "ip": { + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "cidr" + } + } + }, + "service": { + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "text" + } + } + } + } + }, "deck_of_cards": { "fields": { "pips": { @@ -6184,6 +6476,50 @@ expression: result } } }, + "v2_insert_custom_test_cidr_object": { + "fields": { + "ip": { + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "cidr" + } + } + }, + "service": { + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "text" + } + } + } + } + }, + "v2_insert_custom_test_cidr_response": { + "description": "Responses from the 'v2_insert_custom_test_cidr' procedure", + "fields": { + "affected_rows": { + "description": "The number of rows affected by the mutation", + "type": { + "type": "named", + "name": "int4" + } + }, + "returning": { + "description": "Data from rows affected by the mutation", + "type": { + "type": "array", + "element_type": { + "type": "named", + "name": "custom_test_cidr" + } + } + } + } + }, "v2_insert_deck_of_cards_object": { "fields": { "pips": { @@ -8486,6 +8822,13 @@ expression: result }, "foreign_keys": {} }, + { + "name": "custom_test_cidr", + "arguments": {}, + "type": "custom_test_cidr", + "uniqueness_constraints": {}, + "foreign_keys": {} + }, { "name": "deck_of_cards", "arguments": {}, @@ -9796,6 +10139,32 @@ expression: result "name": "v2_insert_custom_dog_response" } }, + { + "name": "v2_insert_custom_test_cidr", + "description": "Insert into the custom_test_cidr table", + "arguments": { + "objects": { + "type": { + "type": "array", + "element_type": { + "type": "named", + "name": "v2_insert_custom_test_cidr_object" + } + } + }, + "post_check": { + "description": "Insert permission predicate over the 'custom_test_cidr' collection", + "type": { + "type": "predicate", + "object_type_name": "custom_test_cidr" + } + } + }, + "result_type": { + "type": "named", + "name": "v2_insert_custom_test_cidr_response" + } + }, { "name": "v2_insert_deck_of_cards", "description": "Insert into the deck_of_cards table", diff --git a/crates/tests/tests-common/goldenfiles/where_cidr_network_supeq.json b/crates/tests/tests-common/goldenfiles/where_cidr_network_supeq.json new file mode 100644 index 000000000..2e8f10941 --- /dev/null +++ b/crates/tests/tests-common/goldenfiles/where_cidr_network_supeq.json @@ -0,0 +1,32 @@ +{ + "collection": "custom_test_cidr", + "query": { + "fields": { + "ip": { + "type": "column", + "column": "ip", + "arguments": {} + }, + "service": { + "type": "column", + "column": "service", + "arguments": {} + } + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ip", + "path": [] + }, + "operator": "network_supeq", + "value": { + "type": "scalar", + "value": "64.6.64.11" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} diff --git a/justfile b/justfile index 672167aea..db10e4376 100644 --- a/justfile +++ b/justfile @@ -247,9 +247,9 @@ open-prometheus: start-metrics open http://localhost:9090 # start a postgres docker image and connect to it using psql -repl-postgres: +repl-postgres *args: @docker compose up --wait postgres - psql {{POSTGRESQL_CONNECTION_URI}} + psql {{POSTGRESQL_CONNECTION_URI}} $@ # start a cockroach docker image and connect to it using psql repl-cockroach: diff --git a/static/custom-tables.sql b/static/custom-tables.sql index 3eef445df..cf79d13a7 100644 --- a/static/custom-tables.sql +++ b/static/custom-tables.sql @@ -19,3 +19,6 @@ create table custom.defaults ( height_cm numeric not null default 200, height_in numeric GENERATED ALWAYS AS (height_cm / 2.54) STORED ); + +create table custom.test_cidr (ip CIDR, service text); +insert into custom.test_cidr values('64.6.64.0/24', 'my_service'); From 18ed6c65c723c28922cfa363ceeaa5d29685bfb4 Mon Sep 17 00:00:00 2001 From: Gil Mizrahi Date: Tue, 23 Jul 2024 11:10:55 +0300 Subject: [PATCH 2/4] don't introspect, add to defaults --- crates/configuration/src/version5/options.rs | 2 ++ static/citus/v5-configuration/configuration.json | 2 ++ static/cockroach/v5-configuration/configuration.json | 2 ++ static/postgres/v5-configuration/configuration.json | 2 ++ static/schema.json | 4 ++++ static/yugabyte/v5-configuration/configuration.json | 2 ++ 6 files changed, 14 insertions(+) diff --git a/crates/configuration/src/version5/options.rs b/crates/configuration/src/version5/options.rs index 958ae8902..43829f900 100644 --- a/crates/configuration/src/version5/options.rs +++ b/crates/configuration/src/version5/options.rs @@ -155,7 +155,9 @@ fn default_introspect_prefix_function_comparison_operators() -> Vec { "lseg_perp".to_string(), "network_overlap".to_string(), "network_sub".to_string(), + "network_subeq".to_string(), "network_sup".to_string(), + "network_supeq".to_string(), "on_pb".to_string(), "on_pl".to_string(), "on_ppath".to_string(), diff --git a/static/citus/v5-configuration/configuration.json b/static/citus/v5-configuration/configuration.json index 3b400549b..746e9b597 100644 --- a/static/citus/v5-configuration/configuration.json +++ b/static/citus/v5-configuration/configuration.json @@ -3556,7 +3556,9 @@ "lseg_perp", "network_overlap", "network_sub", + "network_subeq", "network_sup", + "network_supeq", "on_pb", "on_pl", "on_ppath", diff --git a/static/cockroach/v5-configuration/configuration.json b/static/cockroach/v5-configuration/configuration.json index 23f5485b7..a04c79407 100644 --- a/static/cockroach/v5-configuration/configuration.json +++ b/static/cockroach/v5-configuration/configuration.json @@ -3109,7 +3109,9 @@ "lseg_perp", "network_overlap", "network_sub", + "network_subeq", "network_sup", + "network_supeq", "on_pb", "on_pl", "on_ppath", diff --git a/static/postgres/v5-configuration/configuration.json b/static/postgres/v5-configuration/configuration.json index a84062557..4a0017ebd 100644 --- a/static/postgres/v5-configuration/configuration.json +++ b/static/postgres/v5-configuration/configuration.json @@ -3965,7 +3965,9 @@ "lseg_perp", "network_overlap", "network_sub", + "network_subeq", "network_sup", + "network_supeq", "on_pb", "on_pl", "on_ppath", diff --git a/static/schema.json b/static/schema.json index 36e2baaaa..1f6d5f6f6 100644 --- a/static/schema.json +++ b/static/schema.json @@ -249,7 +249,9 @@ "lseg_perp", "network_overlap", "network_sub", + "network_subeq", "network_sup", + "network_supeq", "on_pb", "on_pl", "on_ppath", @@ -1309,7 +1311,9 @@ "lseg_perp", "network_overlap", "network_sub", + "network_subeq", "network_sup", + "network_supeq", "on_pb", "on_pl", "on_ppath", diff --git a/static/yugabyte/v5-configuration/configuration.json b/static/yugabyte/v5-configuration/configuration.json index e56328d21..6702f0824 100644 --- a/static/yugabyte/v5-configuration/configuration.json +++ b/static/yugabyte/v5-configuration/configuration.json @@ -3544,7 +3544,9 @@ "lseg_perp", "network_overlap", "network_sub", + "network_subeq", "network_sup", + "network_supeq", "on_pb", "on_pl", "on_ppath", From fb1b0c656a64e3e95f54585c988a27cc49b7fd74 Mon Sep 17 00:00:00 2001 From: Gil Mizrahi Date: Tue, 23 Jul 2024 13:54:35 +0300 Subject: [PATCH 3/4] config --- .../configuration.json | 4048 +++++++++++++++++ .../summarize_organizations.sql | 22 + .../v5-configuration/configuration.json | 213 + 3 files changed, 4283 insertions(+) create mode 100644 static/ndc-metadata-snapshots/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/configuration.json create mode 100644 static/ndc-metadata-snapshots/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/native_queries/summarize_organizations.sql diff --git a/static/ndc-metadata-snapshots/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/configuration.json b/static/ndc-metadata-snapshots/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/configuration.json new file mode 100644 index 000000000..4a0017ebd --- /dev/null +++ b/static/ndc-metadata-snapshots/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/configuration.json @@ -0,0 +1,4048 @@ +{ + "version": "5", + "$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 + } + }, + "types": { + "scalar": { + "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" + } + }, + "composite": { + "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" + } + } + }, + "nativeOperations": { + "queries": { + "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" + }, + "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 + } + }, + "mutations": { + "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 + }, + "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 + }, + "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 + } + } + } + }, + "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": "!=", + "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_subeq", + "network_sup", + "network_supeq", + "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/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/native_queries/summarize_organizations.sql b/static/ndc-metadata-snapshots/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/native_queries/summarize_organizations.sql new file mode 100644 index 000000000..58c5e163d --- /dev/null +++ b/static/ndc-metadata-snapshots/b14877413e92123446a8bef798c122120c567e9717134a2bfb9b3a87fd8436c2/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/v5-configuration/configuration.json b/static/postgres/v5-configuration/configuration.json index 4a0017ebd..61372d7ba 100644 --- a/static/postgres/v5-configuration/configuration.json +++ b/static/postgres/v5-configuration/configuration.json @@ -852,6 +852,31 @@ "foreignRelations": {}, "description": null }, + "custom_test_cidr": { + "schemaName": "custom", + "tableName": "test_cidr", + "columns": { + "ip": { + "name": "ip", + "type": { + "scalarType": "cidr" + }, + "nullable": "nullable", + "description": null + }, + "service": { + "name": "service", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, "deck_of_cards": { "schemaName": "public", "tableName": "deck_of_cards", @@ -1563,6 +1588,100 @@ }, "typeRepresentation": "string" }, + "cidr": { + "typeName": "cidr", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "inet" + }, + "min": { + "returnType": "inet" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "cidr", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "cidr", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "inet_same_family": { + "operatorName": "inet_same_family", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_overlap": { + "operatorName": "network_overlap", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sub": { + "operatorName": "network_sub", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_subeq": { + "operatorName": "network_subeq", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sup": { + "operatorName": "network_sup", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_supeq": { + "operatorName": "network_supeq", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + } + }, + "typeRepresentation": null + }, "date": { "typeName": "date", "schemaName": "pg_catalog", @@ -1876,6 +1995,100 @@ }, "typeRepresentation": "float64" }, + "inet": { + "typeName": "inet", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "inet" + }, + "min": { + "returnType": "inet" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "inet", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "inet", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "inet_same_family": { + "operatorName": "inet_same_family", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_overlap": { + "operatorName": "network_overlap", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_sub": { + "operatorName": "network_sub", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_subeq": { + "operatorName": "network_subeq", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_sup": { + "operatorName": "network_sup", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_supeq": { + "operatorName": "network_supeq", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + } + }, + "typeRepresentation": null + }, "int2": { "typeName": "int2", "schemaName": "pg_catalog", From dc02181a5659f1c9ee4490124377027f9bfef42c Mon Sep 17 00:00:00 2001 From: Gil Mizrahi Date: Tue, 23 Jul 2024 13:59:11 +0300 Subject: [PATCH 4/4] fix tests --- ...re_initial_configuration_is_unchanged.snap | 101 ++++++++ ...re_initial_configuration_is_unchanged.snap | 189 +++++++++++++++ ...re_initial_configuration_is_unchanged.snap | 215 ++++++++++++++++++ ...schema_tests__schema_test__get_schema.snap | 56 ----- 4 files changed, 505 insertions(+), 56 deletions(-) diff --git a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version3_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version3_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap index c90188443..882db1f56 100644 --- a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version3_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap +++ b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version3_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap @@ -883,6 +883,31 @@ expression: default_configuration "foreignRelations": {}, "description": null }, + "custom_test_cidr": { + "schemaName": "custom", + "tableName": "test_cidr", + "columns": { + "ip": { + "name": "ip", + "type": { + "scalarType": "cidr" + }, + "nullable": "nullable", + "description": null + }, + "service": { + "name": "service", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, "deck_of_cards": { "schemaName": "public", "tableName": "deck_of_cards", @@ -1282,6 +1307,14 @@ expression: default_configuration "returnType": "card_suit" } }, + "cidr": { + "max": { + "returnType": "inet" + }, + "min": { + "returnType": "inet" + } + }, "date": { "max": { "returnType": "date" @@ -1760,6 +1793,74 @@ expression: default_configuration "isInfix": true } }, + "cidr": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "cidr", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "cidr", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "inet_same_family": { + "operatorName": "inet_same_family", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_overlap": { + "operatorName": "network_overlap", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sub": { + "operatorName": "network_sub", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sup": { + "operatorName": "network_sup", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + } + }, "date": { "_eq": { "operatorName": "=", diff --git a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version4_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version4_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap index da62e92b5..01142d324 100644 --- a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version4_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap +++ b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version4_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap @@ -883,6 +883,31 @@ expression: default_configuration "foreignRelations": {}, "description": null }, + "custom_test_cidr": { + "schemaName": "custom", + "tableName": "test_cidr", + "columns": { + "ip": { + "name": "ip", + "type": { + "scalarType": "cidr" + }, + "nullable": "nullable", + "description": null + }, + "service": { + "name": "service", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, "deck_of_cards": { "schemaName": "public", "tableName": "deck_of_cards", @@ -1465,6 +1490,88 @@ expression: default_configuration ] } }, + "cidr": { + "typeName": "cidr", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "inet" + }, + "min": { + "returnType": "inet" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "cidr", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "cidr", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "inet_same_family": { + "operatorName": "inet_same_family", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_overlap": { + "operatorName": "network_overlap", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sub": { + "operatorName": "network_sub", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sup": { + "operatorName": "network_sup", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + } + }, + "typeRepresentation": null + }, "date": { "typeName": "date", "schemaName": "pg_catalog", @@ -1696,6 +1803,88 @@ expression: default_configuration }, "typeRepresentation": "float64" }, + "inet": { + "typeName": "inet", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "inet" + }, + "min": { + "returnType": "inet" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "inet", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "inet", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "inet_same_family": { + "operatorName": "inet_same_family", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_overlap": { + "operatorName": "network_overlap", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_sub": { + "operatorName": "network_sub", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_sup": { + "operatorName": "network_sup", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + } + }, + "typeRepresentation": null + }, "int2": { "typeName": "int2", "schemaName": "pg_catalog", diff --git a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version5_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version5_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap index 687805106..738f6b5b6 100644 --- a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version5_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap +++ b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version5_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap @@ -883,6 +883,31 @@ expression: default_configuration "foreignRelations": {}, "description": null }, + "custom_test_cidr": { + "schemaName": "custom", + "tableName": "test_cidr", + "columns": { + "ip": { + "name": "ip", + "type": { + "scalarType": "cidr" + }, + "nullable": "nullable", + "description": null + }, + "service": { + "name": "service", + "type": { + "scalarType": "text" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, "deck_of_cards": { "schemaName": "public", "tableName": "deck_of_cards", @@ -1466,6 +1491,100 @@ expression: default_configuration ] } }, + "cidr": { + "typeName": "cidr", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "inet" + }, + "min": { + "returnType": "inet" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "cidr", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "cidr", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": true + }, + "inet_same_family": { + "operatorName": "inet_same_family", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_overlap": { + "operatorName": "network_overlap", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sub": { + "operatorName": "network_sub", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_subeq": { + "operatorName": "network_subeq", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_sup": { + "operatorName": "network_sup", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + }, + "network_supeq": { + "operatorName": "network_supeq", + "operatorKind": "custom", + "argumentType": "cidr", + "isInfix": false + } + }, + "typeRepresentation": null + }, "date": { "typeName": "date", "schemaName": "pg_catalog", @@ -1697,6 +1816,100 @@ expression: default_configuration }, "typeRepresentation": "float64" }, + "inet": { + "typeName": "inet", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "inet" + }, + "min": { + "returnType": "inet" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "inet", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "inet", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": true + }, + "inet_same_family": { + "operatorName": "inet_same_family", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_overlap": { + "operatorName": "network_overlap", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_sub": { + "operatorName": "network_sub", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_subeq": { + "operatorName": "network_subeq", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_sup": { + "operatorName": "network_sup", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + }, + "network_supeq": { + "operatorName": "network_supeq", + "operatorKind": "custom", + "argumentType": "inet", + "isInfix": false + } + }, + "typeRepresentation": null + }, "int2": { "typeName": "int2", "schemaName": "pg_catalog", @@ -2657,7 +2870,9 @@ expression: default_configuration "lseg_perp", "network_overlap", "network_sub", + "network_subeq", "network_sup", + "network_supeq", "on_pb", "on_pl", "on_ppath", diff --git a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap index ed9a022a5..bf658091b 100644 --- a/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap +++ b/crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap @@ -161,20 +161,6 @@ expression: result "name": "Phone" } }, - "text_pattern_ge": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "Phone" - } - }, - "text_pattern_gt": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "Phone" - } - }, "ts_match_tt": { "type": "custom", "argument_type": { @@ -492,20 +478,6 @@ expression: result "name": "char" } }, - "text_pattern_ge": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "char" - } - }, - "text_pattern_gt": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "char" - } - }, "ts_match_tt": { "type": "custom", "argument_type": { @@ -2125,20 +2097,6 @@ expression: result "name": "text" } }, - "text_pattern_ge": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "text" - } - }, - "text_pattern_gt": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "text" - } - }, "ts_match_tt": { "type": "custom", "argument_type": { @@ -2644,20 +2602,6 @@ expression: result "name": "varchar" } }, - "text_pattern_ge": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "varchar" - } - }, - "text_pattern_gt": { - "type": "custom", - "argument_type": { - "type": "named", - "name": "varchar" - } - }, "ts_match_tt": { "type": "custom", "argument_type": {