diff --git a/README.md b/README.md index d0646dd9..1f292d88 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,22 @@ # Extract Schema from Postgres Database -This will read various metadata from your postgres database and return a js object. -This module is being used by [Kanel](https://github.com/kristiandupont/kanel) to generate Typescript types and [Schemalint](https://github.com/kristiandupont/schemalint) to provide linting of database schemas. +Reads various metadata from your postgres database and return a Javascript object. +This package is used by [Kanel](https://github.com/kristiandupont/kanel) to generate Typescript types and [Schemalint](https://github.com/kristiandupont/schemalint) to provide linting of database schemas. -You hand it a [postgres connection config object](https://node-postgres.com/api/client) and the name of the schema you want to read. +View the documentation [here](kristiandupont.github.io/extract-pg-schema) ## Installation -``` +```bash npm i extract-pg-schema ``` ## Usage +You give it a [postgres connection config object](https://node-postgres.com/api/client) and some options and it will connect to your database and generate + ```javascript -const { extractSchema } = require('extract-pg-schema'); +const { extractSchemas } = require('extract-pg-schema'); async function run() { const connection = { @@ -24,260 +26,22 @@ async function run() { password: 'postgres', }; - const { tables, views, types } = await extractSchema('public', connection); + const result = await extractSchemas(connection); - console.log('Tables:'); - console.log(tables); - console.log('Views:'); - console.log(views); - console.log('Types:'); - console.log(types); + console.log(result); } run(); ``` -## Reference - -This module exposes one function: - -``` -async extractSchema(schemaName, connectionConfig, resolveViews, tables) -``` - -It returns an object that has three properties: `tables`, `views` and `types`. All arrays. - -### Table - -The `tables` array consists of objects that correspond to the tables in the schema. It could look like this: - -```javascript -{ - "name": "member", - "comment": "Members of an organization", - "tags": {}, - "columns": [ - { - "name": "id", - "tags": {}, - "indices": [ - { - "name": "person_pkey", - "isPrimary": true - } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('person_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "comment": null, - "rawInfo": {...}, - }, - { - "name": "createdAt", - "tags": {}, - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamptz", - "comment": null - }, - { - "name": "displayName", - "tags": {}, - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "text", - "comment": "Name that will be displayed in the UI", - "rawInfo": {...}, - }, - { - "name": "organizationId", - "tags": {}, - "reference": { - "schema": "public", - "table": "organization", - "column": "id", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION" - } - "indices": [ - { - "name": "member_organizationId_index", - "isPrimary": false - } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "comment": null, - "rawInfo": {...}, - } - ] -} -``` - -Basically, a table has four properties: `name` which is the name of the table, `comment` which is the postgres table comment, `tags` which is a map of tags parsed out of the comment, and `columns` which represents the columns. -You can set the comment for a table with the following SQL: - -```SQL -COMMENT ON TABLE "member" IS 'Members of an organization'; -``` - -The tags feature uses the @-symbol, so you if you write a comment like this: `'Members of an organization @cached @alias:person'`, you will get - -- a `comment` with the value `'Members of an organization'`, and -- a `tags` value of `{ cached: true, alias: 'person' }` - -You can use tags for any sort of metadata that you want to store for further processing. - -### Column - -The `columns` array on a `table` has the following properties: - -- `name` which is the column name, -- `reference`, an object containing schema, table and column names of a foreign key reference. Also has `onUpdate` and `onDelete` fields specifying update actions. -- `indices`, an array describing the indices that apply. These have two properties: `name` and `isPrimary`. -- `maxLength`, which specifies the max string length the column has if that applies. -- `nullable` which indicates if the column is nullable, -- `defaultValue` which states the possible default value for the column, -- `isIdentity` which states whether this is an identity column, -- `generated` representing the enum `ALWAYS`, `BY DEFAULT` or `NEVER` as to whether the column is generated -- `isUpdatable` specifying whether the column (in an updatable view in particular) can be updated -- `type` which specifies the [datatype](https://www.postgresql.org/docs/9.5/datatype.html) of the column -- `comment` which specifies the column comment. -- `tags` which is a map of tags parsed from the column comment -- `rawInfo` which contains all the column information that is extracted from postgres. - -You can set the comment for a column with the following SQL: - -```SQL -COMMENT ON COLUMN "member"."displayName" IS 'Name that will be displayed in the UI'; -``` - -### View - -Views have exactly the same shape as tables. - -### Type - -The second property in the result is the `types` array. This contains the user-specified types, currently only postgres [enum](https://www.postgresql.org/docs/9.2/datatype-enum.html) types and [composite](https://www.postgresql.org/docs/9.2/rowtypes.html). -An enum type could look like this: - -```javascript -{ - "type": "enum", - "name": "AccountState", - "comment": "Determines the state of an account", - "tags": {}, - "values": [ - "active", - "pending", - "closed" - ] -} -``` - -This would be the output if you had created the type with the following: - -```SQL -CREATE TYPE "AccountState" AS ENUM ('active', 'pending', 'closed'); - -COMMENT ON TYPE "AccountState" IS 'Determines the state of an account'; -``` - -A composite type could look like this: - -```javascript -{ - "type": "composite", - "name": "AccountData", - "comment": "Commonly used data for an account", - "tags": {}, - "attributes": [ - { - "name": "id", - "maxLength": null, - "nullable": true, - "defaultValue": null, - "type": "uuid", - "tags": {}, - "rawInfo": {...} - }, - { - "name": "name", - "maxLength": null, - "nullable": true, - "defaultValue": null, - "type": "text", - "tags": {}, - "rawInfo": {...} - }, - { - "name": "status", - "maxLength": null, - "nullable": true, - "defaultValue": null, - "type": "AccountState", - "tags": {}, - "rawInfo": {...} - }, - { - "name": "address", - "maxLength": null, - "nullable": true, - "defaultValue": null, - "type": "jsonb", - "tags": {}, - "rawInfo": {...} - } - ] -} -``` - -This would be the output if you had created the type with the following: - -```SQL -CREATE TYPE "AccountData" AS ( - id UUID, - name TEXT, - status "AccountState", - address JSONB -); - -COMMENT ON TYPE "AccountData" IS 'Commonly used data for an account'; -``` - -### Attributes +For an example of a generated object, take a look at [dvdrental.json](./dvdrental.json) file which is generated from the [sample Database](https://www.postgresqltutorial.com/postgresql-sample-database/) from [PostgreSQLTutorial.com](https://www.postgresqltutorial.com). -The `attributes` array on a `type=composite` has the following properties: +--- -- `name` which is the attribute name, -- `maxLength`, which specifies the max string length the attribute has if that applies. -- `nullable` which indicates if the attribute is nullable, -- `defaultValue` which states the possible default value for the attribute, -- `type` which specifies the [datatype](https://www.postgresql.org/docs/9.5/datatype.html) of the attribute -- `comment` which specifies the attribute comment. -- `tags` which is a map of tags parsed from the attribute comment -- `rawInfo` which contains all the attribute information that is extracted from postgres. +## Contributors -Type attribute comments work the same way as table column comments. + + + -For an example of a generated object, take a look at [dvdrental.json](./dvdrental.json) file which is generated from the [sample Database](https://www.postgresqltutorial.com/postgresql-sample-database/) from www.postgresqltutorial.com. +Made with [contrib.rocks](https://contrib.rocks). diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 00000000..6a36d1ed --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,376 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/build/index.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": false + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportFolder": "/docs/" + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": false + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for an "alpha" release. + * This file will include only declarations that are marked as "@public", "@beta", or "@alpha". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "alphaTrimmedFilePath": "/dist/-alpha.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning" + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + } + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + }, + + "ae-missing-release-tag": { + "logLevel": "none", + "addToApiReportFile": false + } + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } +} diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js new file mode 100644 index 00000000..2a547467 --- /dev/null +++ b/docs/.vitepress/config.js @@ -0,0 +1,26 @@ +export default { + title: 'extract-pg-schema', + description: 'Extract Schema from Postgres Database', + base: '/extract-pg-schema/', + themeConfig: { + sidebar: [ + { + text: 'Guide', + items: [ + { text: 'API', link: '/api/' }, + { + text: 'extractSchemas', + link: '/api/extract-pg-schema.extractschemas.html', + }, + { text: 'Output', link: '/api/extract-pg-schema.schema.html' }, + ], + }, + ], + socialLinks: [ + { + icon: 'github', + link: 'https://github.com/kristiandupont/extract-pg-schema', + }, + ], + }, +}; diff --git a/docs/api/extract-pg-schema.attributetype.md b/docs/api/extract-pg-schema.attributetype.md new file mode 100644 index 00000000..e5b8cb01 --- /dev/null +++ b/docs/api/extract-pg-schema.attributetype.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [AttributeType](./extract-pg-schema.attributetype.md) + +## AttributeType type + +Signature: + +```typescript +export declare type AttributeType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; +``` diff --git a/docs/api/extract-pg-schema.columnreference.md b/docs/api/extract-pg-schema.columnreference.md new file mode 100644 index 00000000..e5f1d287 --- /dev/null +++ b/docs/api/extract-pg-schema.columnreference.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ColumnReference](./extract-pg-schema.columnreference.md) + +## ColumnReference type + +Signature: + +```typescript +export declare type ColumnReference = { + schemaName: string; + tableName: string; + columnName: string; + onDelete: UpdateAction; + onUpdate: UpdateAction; +}; +``` +References: [UpdateAction](./extract-pg-schema.updateaction.md) + diff --git a/docs/api/extract-pg-schema.compositetypeattribute.comment.md b/docs/api/extract-pg-schema.compositetypeattribute.comment.md new file mode 100644 index 00000000..0961b5e7 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.comment.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [comment](./extract-pg-schema.compositetypeattribute.comment.md) + +## CompositeTypeAttribute.comment property + +Signature: + +```typescript +comment: string | null; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.defaultvalue.md b/docs/api/extract-pg-schema.compositetypeattribute.defaultvalue.md new file mode 100644 index 00000000..40272e4e --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.defaultvalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [defaultValue](./extract-pg-schema.compositetypeattribute.defaultvalue.md) + +## CompositeTypeAttribute.defaultValue property + +Signature: + +```typescript +defaultValue: any; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.expandedtype.md b/docs/api/extract-pg-schema.compositetypeattribute.expandedtype.md new file mode 100644 index 00000000..6a35d731 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.expandedtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [expandedType](./extract-pg-schema.compositetypeattribute.expandedtype.md) + +## CompositeTypeAttribute.expandedType property + +Signature: + +```typescript +expandedType: string; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.fakeinformationschemavalue.md b/docs/api/extract-pg-schema.compositetypeattribute.fakeinformationschemavalue.md new file mode 100644 index 00000000..59579ec8 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.fakeinformationschemavalue.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [fakeInformationSchemaValue](./extract-pg-schema.compositetypeattribute.fakeinformationschemavalue.md) + +## CompositeTypeAttribute.fakeInformationSchemaValue property + +The Postgres information\_schema views do not contain info about materialized views. This value is the result of a query that matches the one for regular views. Use with caution, not all fields are guaranteed to be meaningful and/or accurate. + +Signature: + +```typescript +fakeInformationSchemaValue: InformationSchemaColumn; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.generated.md b/docs/api/extract-pg-schema.compositetypeattribute.generated.md new file mode 100644 index 00000000..4f0e4bb4 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.generated.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [generated](./extract-pg-schema.compositetypeattribute.generated.md) + +## CompositeTypeAttribute.generated property + +Signature: + +```typescript +generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.isarray.md b/docs/api/extract-pg-schema.compositetypeattribute.isarray.md new file mode 100644 index 00000000..2db68a27 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.isarray.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [isArray](./extract-pg-schema.compositetypeattribute.isarray.md) + +## CompositeTypeAttribute.isArray property + +Signature: + +```typescript +isArray: boolean; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.isidentity.md b/docs/api/extract-pg-schema.compositetypeattribute.isidentity.md new file mode 100644 index 00000000..36201001 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.isidentity.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [isIdentity](./extract-pg-schema.compositetypeattribute.isidentity.md) + +## CompositeTypeAttribute.isIdentity property + +Signature: + +```typescript +isIdentity: boolean; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.isnullable.md b/docs/api/extract-pg-schema.compositetypeattribute.isnullable.md new file mode 100644 index 00000000..a5ecc055 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.isnullable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [isNullable](./extract-pg-schema.compositetypeattribute.isnullable.md) + +## CompositeTypeAttribute.isNullable property + +Signature: + +```typescript +isNullable: boolean; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.isupdatable.md b/docs/api/extract-pg-schema.compositetypeattribute.isupdatable.md new file mode 100644 index 00000000..2858927e --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.isupdatable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [isUpdatable](./extract-pg-schema.compositetypeattribute.isupdatable.md) + +## CompositeTypeAttribute.isUpdatable property + +Signature: + +```typescript +isUpdatable: boolean; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.maxlength.md b/docs/api/extract-pg-schema.compositetypeattribute.maxlength.md new file mode 100644 index 00000000..1d1c1362 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.maxlength.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [maxLength](./extract-pg-schema.compositetypeattribute.maxlength.md) + +## CompositeTypeAttribute.maxLength property + +Signature: + +```typescript +maxLength: number | null; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.md b/docs/api/extract-pg-schema.compositetypeattribute.md new file mode 100644 index 00000000..8b4c566f --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.md @@ -0,0 +1,30 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) + +## CompositeTypeAttribute interface + +Signature: + +```typescript +export interface CompositeTypeAttribute +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [comment](./extract-pg-schema.compositetypeattribute.comment.md) | | string \| null | | +| [defaultValue](./extract-pg-schema.compositetypeattribute.defaultvalue.md) | | any | | +| [expandedType](./extract-pg-schema.compositetypeattribute.expandedtype.md) | | string | | +| [fakeInformationSchemaValue](./extract-pg-schema.compositetypeattribute.fakeinformationschemavalue.md) | | InformationSchemaColumn | The Postgres information\_schema views do not contain info about materialized views. This value is the result of a query that matches the one for regular views. Use with caution, not all fields are guaranteed to be meaningful and/or accurate. | +| [generated](./extract-pg-schema.compositetypeattribute.generated.md) | | 'ALWAYS' \| 'NEVER' \| 'BY DEFAULT' | | +| [isArray](./extract-pg-schema.compositetypeattribute.isarray.md) | | boolean | | +| [isIdentity](./extract-pg-schema.compositetypeattribute.isidentity.md) | | boolean | | +| [isNullable](./extract-pg-schema.compositetypeattribute.isnullable.md) | | boolean | | +| [isUpdatable](./extract-pg-schema.compositetypeattribute.isupdatable.md) | | boolean | | +| [maxLength](./extract-pg-schema.compositetypeattribute.maxlength.md) | | number \| null | | +| [name](./extract-pg-schema.compositetypeattribute.name.md) | | string | | +| [ordinalPosition](./extract-pg-schema.compositetypeattribute.ordinalposition.md) | | number | | +| [type](./extract-pg-schema.compositetypeattribute.type.md) | | [AttributeType](./extract-pg-schema.attributetype.md) | | + diff --git a/docs/api/extract-pg-schema.compositetypeattribute.name.md b/docs/api/extract-pg-schema.compositetypeattribute.name.md new file mode 100644 index 00000000..8fe72b9e --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.name.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [name](./extract-pg-schema.compositetypeattribute.name.md) + +## CompositeTypeAttribute.name property + +Signature: + +```typescript +name: string; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.ordinalposition.md b/docs/api/extract-pg-schema.compositetypeattribute.ordinalposition.md new file mode 100644 index 00000000..a766511e --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.ordinalposition.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [ordinalPosition](./extract-pg-schema.compositetypeattribute.ordinalposition.md) + +## CompositeTypeAttribute.ordinalPosition property + +Signature: + +```typescript +ordinalPosition: number; +``` diff --git a/docs/api/extract-pg-schema.compositetypeattribute.type.md b/docs/api/extract-pg-schema.compositetypeattribute.type.md new file mode 100644 index 00000000..986d983a --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypeattribute.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) > [type](./extract-pg-schema.compositetypeattribute.type.md) + +## CompositeTypeAttribute.type property + +Signature: + +```typescript +type: AttributeType; +``` diff --git a/docs/api/extract-pg-schema.compositetypedetails.attributes.md b/docs/api/extract-pg-schema.compositetypedetails.attributes.md new file mode 100644 index 00000000..dec32798 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypedetails.attributes.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeDetails](./extract-pg-schema.compositetypedetails.md) > [attributes](./extract-pg-schema.compositetypedetails.attributes.md) + +## CompositeTypeDetails.attributes property + +Signature: + +```typescript +attributes: CompositeTypeAttribute[]; +``` diff --git a/docs/api/extract-pg-schema.compositetypedetails.md b/docs/api/extract-pg-schema.compositetypedetails.md new file mode 100644 index 00000000..1eae6d79 --- /dev/null +++ b/docs/api/extract-pg-schema.compositetypedetails.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [CompositeTypeDetails](./extract-pg-schema.compositetypedetails.md) + +## CompositeTypeDetails interface + +Signature: + +```typescript +export interface CompositeTypeDetails extends PgType<'compositeType'> +``` +Extends: PgType + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [attributes](./extract-pg-schema.compositetypedetails.attributes.md) | | [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md)\[\] | | + diff --git a/docs/api/extract-pg-schema.domaindetails.informationschemavalue.md b/docs/api/extract-pg-schema.domaindetails.informationschemavalue.md new file mode 100644 index 00000000..4499c15b --- /dev/null +++ b/docs/api/extract-pg-schema.domaindetails.informationschemavalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [DomainDetails](./extract-pg-schema.domaindetails.md) > [informationSchemaValue](./extract-pg-schema.domaindetails.informationschemavalue.md) + +## DomainDetails.informationSchemaValue property + +Signature: + +```typescript +informationSchemaValue: InformationSchemaDomain; +``` diff --git a/docs/api/extract-pg-schema.domaindetails.innertype.md b/docs/api/extract-pg-schema.domaindetails.innertype.md new file mode 100644 index 00000000..88bad9ac --- /dev/null +++ b/docs/api/extract-pg-schema.domaindetails.innertype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [DomainDetails](./extract-pg-schema.domaindetails.md) > [innerType](./extract-pg-schema.domaindetails.innertype.md) + +## DomainDetails.innerType property + +Signature: + +```typescript +innerType: string; +``` diff --git a/docs/api/extract-pg-schema.domaindetails.md b/docs/api/extract-pg-schema.domaindetails.md new file mode 100644 index 00000000..d93a3a07 --- /dev/null +++ b/docs/api/extract-pg-schema.domaindetails.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [DomainDetails](./extract-pg-schema.domaindetails.md) + +## DomainDetails interface + +Signature: + +```typescript +export interface DomainDetails extends PgType<'domain'> +``` +Extends: PgType + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [informationSchemaValue](./extract-pg-schema.domaindetails.informationschemavalue.md) | | InformationSchemaDomain | | +| [innerType](./extract-pg-schema.domaindetails.innertype.md) | | string | | + diff --git a/docs/api/extract-pg-schema.enumdetails.md b/docs/api/extract-pg-schema.enumdetails.md new file mode 100644 index 00000000..ef97c9e2 --- /dev/null +++ b/docs/api/extract-pg-schema.enumdetails.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [EnumDetails](./extract-pg-schema.enumdetails.md) + +## EnumDetails interface + +Signature: + +```typescript +export interface EnumDetails extends PgType<'enum'> +``` +Extends: PgType + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [values](./extract-pg-schema.enumdetails.values.md) | | string\[\] | | + diff --git a/docs/api/extract-pg-schema.enumdetails.values.md b/docs/api/extract-pg-schema.enumdetails.values.md new file mode 100644 index 00000000..1d2c8415 --- /dev/null +++ b/docs/api/extract-pg-schema.enumdetails.values.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [EnumDetails](./extract-pg-schema.enumdetails.md) > [values](./extract-pg-schema.enumdetails.values.md) + +## EnumDetails.values property + +Signature: + +```typescript +values: string[]; +``` diff --git a/docs/api/extract-pg-schema.extractschema.md b/docs/api/extract-pg-schema.extractschema.md new file mode 100644 index 00000000..6d3130c2 --- /dev/null +++ b/docs/api/extract-pg-schema.extractschema.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [extractSchema](./extract-pg-schema.extractschema.md) + +## extractSchema variable + +> Warning: This API is now obsolete. +> +> - use extractSchemas instead +> + +Signature: + +```typescript +extractSchema: (schemaName: string, connectionConfig: string | ConnectionConfig, resolveViews: boolean, tables?: string[]) => Promise<{ + tables: any[]; + views: any[]; + types: any[]; +}> +``` diff --git a/docs/api/extract-pg-schema.extractschemaoptions.md b/docs/api/extract-pg-schema.extractschemaoptions.md new file mode 100644 index 00000000..39fb697c --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemaoptions.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) + +## ExtractSchemaOptions interface + +This is the options object that can be passed to `extractSchemas`. + +Signature: + +```typescript +export interface ExtractSchemaOptions +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [onProgress?](./extract-pg-schema.extractschemaoptions.onprogress.md) | | () => void | (Optional) Called once for each type that is extracted. | +| [onProgressEnd?](./extract-pg-schema.extractschemaoptions.onprogressend.md) | | () => void | (Optional) Called when all types have been extracted. | +| [onProgressStart?](./extract-pg-schema.extractschemaoptions.onprogressstart.md) | | (total: number) => void | (Optional) Called with the number of types to extract. | +| [resolveViews?](./extract-pg-schema.extractschemaoptions.resolveviews.md) | | boolean | (Optional) extractShemas will always attempt to parse view definitions to discover the "source" of each column, i.e. the table or view that it is derived from. If this option is set to true, it will attempt to follow this source and copy values like indices, isNullable, etc. so that the view data is closer to what the database reflects. | +| [schemas?](./extract-pg-schema.extractschemaoptions.schemas.md) | | string\[\] | (Optional) Will contain an array of schema names to extract. If undefined, all non-system schemas will be extracted. | +| [typeFilter?](./extract-pg-schema.extractschemaoptions.typefilter.md) | | (pgType: PgType) => boolean | (Optional) Filter function that you can use if you want to exclude certain items from the schemas. | + diff --git a/docs/api/extract-pg-schema.extractschemaoptions.onprogress.md b/docs/api/extract-pg-schema.extractschemaoptions.onprogress.md new file mode 100644 index 00000000..ce9a880c --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemaoptions.onprogress.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) > [onProgress](./extract-pg-schema.extractschemaoptions.onprogress.md) + +## ExtractSchemaOptions.onProgress property + +Called once for each type that is extracted. + +Signature: + +```typescript +onProgress?: () => void; +``` diff --git a/docs/api/extract-pg-schema.extractschemaoptions.onprogressend.md b/docs/api/extract-pg-schema.extractschemaoptions.onprogressend.md new file mode 100644 index 00000000..a34c608e --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemaoptions.onprogressend.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) > [onProgressEnd](./extract-pg-schema.extractschemaoptions.onprogressend.md) + +## ExtractSchemaOptions.onProgressEnd property + +Called when all types have been extracted. + +Signature: + +```typescript +onProgressEnd?: () => void; +``` diff --git a/docs/api/extract-pg-schema.extractschemaoptions.onprogressstart.md b/docs/api/extract-pg-schema.extractschemaoptions.onprogressstart.md new file mode 100644 index 00000000..6d3488eb --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemaoptions.onprogressstart.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) > [onProgressStart](./extract-pg-schema.extractschemaoptions.onprogressstart.md) + +## ExtractSchemaOptions.onProgressStart property + +Called with the number of types to extract. + +Signature: + +```typescript +onProgressStart?: (total: number) => void; +``` diff --git a/docs/api/extract-pg-schema.extractschemaoptions.resolveviews.md b/docs/api/extract-pg-schema.extractschemaoptions.resolveviews.md new file mode 100644 index 00000000..b3321bfc --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemaoptions.resolveviews.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) > [resolveViews](./extract-pg-schema.extractschemaoptions.resolveviews.md) + +## ExtractSchemaOptions.resolveViews property + +extractShemas will always attempt to parse view definitions to discover the "source" of each column, i.e. the table or view that it is derived from. If this option is set to `true`, it will attempt to follow this source and copy values like indices, isNullable, etc. so that the view data is closer to what the database reflects. + +Signature: + +```typescript +resolveViews?: boolean; +``` diff --git a/docs/api/extract-pg-schema.extractschemaoptions.schemas.md b/docs/api/extract-pg-schema.extractschemaoptions.schemas.md new file mode 100644 index 00000000..139ccc07 --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemaoptions.schemas.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) > [schemas](./extract-pg-schema.extractschemaoptions.schemas.md) + +## ExtractSchemaOptions.schemas property + +Will contain an array of schema names to extract. If undefined, all non-system schemas will be extracted. + +Signature: + +```typescript +schemas?: string[]; +``` diff --git a/docs/api/extract-pg-schema.extractschemaoptions.typefilter.md b/docs/api/extract-pg-schema.extractschemaoptions.typefilter.md new file mode 100644 index 00000000..2737cf21 --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemaoptions.typefilter.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) > [typeFilter](./extract-pg-schema.extractschemaoptions.typefilter.md) + +## ExtractSchemaOptions.typeFilter property + +Filter function that you can use if you want to exclude certain items from the schemas. + +Signature: + +```typescript +typeFilter?: (pgType: PgType) => boolean; +``` diff --git a/docs/api/extract-pg-schema.extractschemas.md b/docs/api/extract-pg-schema.extractschemas.md new file mode 100644 index 00000000..a1a248d1 --- /dev/null +++ b/docs/api/extract-pg-schema.extractschemas.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [extractSchemas](./extract-pg-schema.extractschemas.md) + +## extractSchemas() function + +Perform the extraction + +Signature: + +```typescript +declare function extractSchemas(connectionConfig: string | ConnectionConfig, options?: ExtractSchemaOptions): Promise>; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| connectionConfig | string \| ConnectionConfig | Connection string or configuration object for Postgres connection | +| options | [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) | (Optional) Optional options | + +Returns: + +Promise<Record<string, [Schema](./extract-pg-schema.schema.md)>> + +A record of all the schemas extracted, indexed by schema name. + diff --git a/docs/api/extract-pg-schema.index.md b/docs/api/extract-pg-schema.index.md new file mode 100644 index 00000000..098ea4f7 --- /dev/null +++ b/docs/api/extract-pg-schema.index.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [Index](./extract-pg-schema.index.md) + +## Index type + +Signature: + +```typescript +export declare type Index = { + name: string; + isPrimary: boolean; +}; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.character_maximum_length.md b/docs/api/extract-pg-schema.informationschemacolumn.character_maximum_length.md new file mode 100644 index 00000000..a2bcce42 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.character_maximum_length.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [character\_maximum\_length](./extract-pg-schema.informationschemacolumn.character_maximum_length.md) + +## InformationSchemaColumn.character\_maximum\_length property + +If data\_type identifies a character or bit string type, the declared maximum length; null for all other data types or if no maximum length was declared. + +Signature: + +```typescript +character_maximum_length: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.character_octet_length.md b/docs/api/extract-pg-schema.informationschemacolumn.character_octet_length.md new file mode 100644 index 00000000..6b9cf333 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.character_octet_length.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [character\_octet\_length](./extract-pg-schema.informationschemacolumn.character_octet_length.md) + +## InformationSchemaColumn.character\_octet\_length property + +If data\_type identifies a character type, the maximum possible length in octets (bytes) of a datum; null for all other data types. The maximum octet length depends on the declared character maximum length (see above) and the server encoding. + +Signature: + +```typescript +character_octet_length: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.character_set_catalog.md b/docs/api/extract-pg-schema.informationschemacolumn.character_set_catalog.md new file mode 100644 index 00000000..0498040a --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.character_set_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [character\_set\_catalog](./extract-pg-schema.informationschemacolumn.character_set_catalog.md) + +## InformationSchemaColumn.character\_set\_catalog property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +character_set_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.character_set_name.md b/docs/api/extract-pg-schema.informationschemacolumn.character_set_name.md new file mode 100644 index 00000000..7ddb58f2 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.character_set_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [character\_set\_name](./extract-pg-schema.informationschemacolumn.character_set_name.md) + +## InformationSchemaColumn.character\_set\_name property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +character_set_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.character_set_schema.md b/docs/api/extract-pg-schema.informationschemacolumn.character_set_schema.md new file mode 100644 index 00000000..0c6138e8 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.character_set_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [character\_set\_schema](./extract-pg-schema.informationschemacolumn.character_set_schema.md) + +## InformationSchemaColumn.character\_set\_schema property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +character_set_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.collation_catalog.md b/docs/api/extract-pg-schema.informationschemacolumn.collation_catalog.md new file mode 100644 index 00000000..786feb64 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.collation_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [collation\_catalog](./extract-pg-schema.informationschemacolumn.collation_catalog.md) + +## InformationSchemaColumn.collation\_catalog property + +Name of the database containing the collation of the column (always the current database), null if default or the data type of the column is not collatable + +Signature: + +```typescript +collation_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.collation_name.md b/docs/api/extract-pg-schema.informationschemacolumn.collation_name.md new file mode 100644 index 00000000..8925c4ba --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.collation_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [collation\_name](./extract-pg-schema.informationschemacolumn.collation_name.md) + +## InformationSchemaColumn.collation\_name property + +Name of the collation of the column, null if default or the data type of the column is not collatable + +Signature: + +```typescript +collation_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.collation_schema.md b/docs/api/extract-pg-schema.informationschemacolumn.collation_schema.md new file mode 100644 index 00000000..bedf2347 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.collation_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [collation\_schema](./extract-pg-schema.informationschemacolumn.collation_schema.md) + +## InformationSchemaColumn.collation\_schema property + +Name of the schema containing the collation of the column, null if default or the data type of the column is not collatable + +Signature: + +```typescript +collation_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.column_default.md b/docs/api/extract-pg-schema.informationschemacolumn.column_default.md new file mode 100644 index 00000000..3629715a --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.column_default.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [column\_default](./extract-pg-schema.informationschemacolumn.column_default.md) + +## InformationSchemaColumn.column\_default property + +Default expression of the column + +Signature: + +```typescript +column_default: any; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.column_name.md b/docs/api/extract-pg-schema.informationschemacolumn.column_name.md new file mode 100644 index 00000000..4e63109b --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.column_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [column\_name](./extract-pg-schema.informationschemacolumn.column_name.md) + +## InformationSchemaColumn.column\_name property + +Name of the column + +Signature: + +```typescript +column_name: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.data_type.md b/docs/api/extract-pg-schema.informationschemacolumn.data_type.md new file mode 100644 index 00000000..ba2f8ce2 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.data_type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [data\_type](./extract-pg-schema.informationschemacolumn.data_type.md) + +## InformationSchemaColumn.data\_type property + +Data type of the column, if it is a built-in type, or ARRAY if it is some array (in that case, see the view element\_types), else USER-DEFINED (in that case, the type is identified in udt\_name and associated columns). If the column is based on a domain, this column refers to the type underlying the domain (and the domain is identified in domain\_name and associated columns). + +Signature: + +```typescript +data_type: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.datetime_precision.md b/docs/api/extract-pg-schema.informationschemacolumn.datetime_precision.md new file mode 100644 index 00000000..d9928e61 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.datetime_precision.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [datetime\_precision](./extract-pg-schema.informationschemacolumn.datetime_precision.md) + +## InformationSchemaColumn.datetime\_precision property + +If data\_type identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this column, that is, the number of decimal digits maintained following the decimal point in the seconds value. For all other data types, this column is null. + +Signature: + +```typescript +datetime_precision: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.domain_catalog.md b/docs/api/extract-pg-schema.informationschemacolumn.domain_catalog.md new file mode 100644 index 00000000..93945cc3 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.domain_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [domain\_catalog](./extract-pg-schema.informationschemacolumn.domain_catalog.md) + +## InformationSchemaColumn.domain\_catalog property + +If the column has a domain type, the name of the database that the domain is defined in (always the current database), else null. + +Signature: + +```typescript +domain_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.domain_name.md b/docs/api/extract-pg-schema.informationschemacolumn.domain_name.md new file mode 100644 index 00000000..b6ed7695 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.domain_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [domain\_name](./extract-pg-schema.informationschemacolumn.domain_name.md) + +## InformationSchemaColumn.domain\_name property + +If the column has a domain type, the name of the domain, else null. + +Signature: + +```typescript +domain_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.domain_schema.md b/docs/api/extract-pg-schema.informationschemacolumn.domain_schema.md new file mode 100644 index 00000000..3cf65196 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.domain_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [domain\_schema](./extract-pg-schema.informationschemacolumn.domain_schema.md) + +## InformationSchemaColumn.domain\_schema property + +If the column has a domain type, the name of the schema that the domain is defined in, else null. + +Signature: + +```typescript +domain_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.dtd_identifier.md b/docs/api/extract-pg-schema.informationschemacolumn.dtd_identifier.md new file mode 100644 index 00000000..20ab0ad3 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.dtd_identifier.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [dtd\_identifier](./extract-pg-schema.informationschemacolumn.dtd_identifier.md) + +## InformationSchemaColumn.dtd\_identifier property + +An identifier of the data type descriptor of the column, unique among the data type descriptors pertaining to the table. This is mainly useful for joining with other instances of such identifiers. (The specific format of the identifier is not defined and not guaranteed to remain the same in future versions.) + +Signature: + +```typescript +dtd_identifier: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.generation_expression.md b/docs/api/extract-pg-schema.informationschemacolumn.generation_expression.md new file mode 100644 index 00000000..4f8f16db --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.generation_expression.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [generation\_expression](./extract-pg-schema.informationschemacolumn.generation_expression.md) + +## InformationSchemaColumn.generation\_expression property + +If the column is a generated column, then the generation expression, else null. + +Signature: + +```typescript +generation_expression: any; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.identity_cycle.md b/docs/api/extract-pg-schema.informationschemacolumn.identity_cycle.md new file mode 100644 index 00000000..bd4c9eae --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.identity_cycle.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [identity\_cycle](./extract-pg-schema.informationschemacolumn.identity_cycle.md) + +## InformationSchemaColumn.identity\_cycle property + +If the column is an identity column, then YES if the internal sequence cycles or NO if it does not; otherwise null. + +Signature: + +```typescript +identity_cycle: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.identity_generation.md b/docs/api/extract-pg-schema.informationschemacolumn.identity_generation.md new file mode 100644 index 00000000..2bb6c6fe --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.identity_generation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [identity\_generation](./extract-pg-schema.informationschemacolumn.identity_generation.md) + +## InformationSchemaColumn.identity\_generation property + +If the column is an identity column, then ALWAYS or BY DEFAULT, reflecting the definition of the column. + +Signature: + +```typescript +identity_generation: 'ALWAYS' | 'BY DEFAULT' | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.identity_increment.md b/docs/api/extract-pg-schema.informationschemacolumn.identity_increment.md new file mode 100644 index 00000000..3049408d --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.identity_increment.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [identity\_increment](./extract-pg-schema.informationschemacolumn.identity_increment.md) + +## InformationSchemaColumn.identity\_increment property + +If the column is an identity column, then the increment of the internal sequence, else null. + +Signature: + +```typescript +identity_increment: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.identity_maximum.md b/docs/api/extract-pg-schema.informationschemacolumn.identity_maximum.md new file mode 100644 index 00000000..86b1aee3 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.identity_maximum.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [identity\_maximum](./extract-pg-schema.informationschemacolumn.identity_maximum.md) + +## InformationSchemaColumn.identity\_maximum property + +If the column is an identity column, then the maximum value of the internal sequence, else null. + +Signature: + +```typescript +identity_maximum: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.identity_minimum.md b/docs/api/extract-pg-schema.informationschemacolumn.identity_minimum.md new file mode 100644 index 00000000..db50fb5a --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.identity_minimum.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [identity\_minimum](./extract-pg-schema.informationschemacolumn.identity_minimum.md) + +## InformationSchemaColumn.identity\_minimum property + +If the column is an identity column, then the minimum value of the internal sequence, else null. + +Signature: + +```typescript +identity_minimum: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.identity_start.md b/docs/api/extract-pg-schema.informationschemacolumn.identity_start.md new file mode 100644 index 00000000..40bf5abe --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.identity_start.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [identity\_start](./extract-pg-schema.informationschemacolumn.identity_start.md) + +## InformationSchemaColumn.identity\_start property + +If the column is an identity column, then the start value of the internal sequence, else null. + +Signature: + +```typescript +identity_start: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.interval_precision.md b/docs/api/extract-pg-schema.informationschemacolumn.interval_precision.md new file mode 100644 index 00000000..15da6b2a --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.interval_precision.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [interval\_precision](./extract-pg-schema.informationschemacolumn.interval_precision.md) + +## InformationSchemaColumn.interval\_precision property + +Applies to a feature not available in PostgreSQL (see datetime\_precision for the fractional seconds precision of interval type columns) + +Signature: + +```typescript +interval_precision: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.interval_type.md b/docs/api/extract-pg-schema.informationschemacolumn.interval_type.md new file mode 100644 index 00000000..ad3be4a7 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.interval_type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [interval\_type](./extract-pg-schema.informationschemacolumn.interval_type.md) + +## InformationSchemaColumn.interval\_type property + +If data\_type identifies an interval type, this column contains the specification which fields the intervals include for this column, e.g., YEAR TO MONTH, DAY TO SECOND, etc. If no field restrictions were specified (that is, the interval accepts all fields), and for all other data types, this field is null. + +Signature: + +```typescript +interval_type: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.is_generated.md b/docs/api/extract-pg-schema.informationschemacolumn.is_generated.md new file mode 100644 index 00000000..952083d6 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.is_generated.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [is\_generated](./extract-pg-schema.informationschemacolumn.is_generated.md) + +## InformationSchemaColumn.is\_generated property + +If the column is a generated column, then ALWAYS, else NEVER. + +Signature: + +```typescript +is_generated: 'ALWAYS' | 'NEVER'; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.is_identity.md b/docs/api/extract-pg-schema.informationschemacolumn.is_identity.md new file mode 100644 index 00000000..9ceb3980 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.is_identity.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [is\_identity](./extract-pg-schema.informationschemacolumn.is_identity.md) + +## InformationSchemaColumn.is\_identity property + +If the column is an identity column, then YES, else NO. + +Signature: + +```typescript +is_identity: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.is_nullable.md b/docs/api/extract-pg-schema.informationschemacolumn.is_nullable.md new file mode 100644 index 00000000..59fcef66 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.is_nullable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [is\_nullable](./extract-pg-schema.informationschemacolumn.is_nullable.md) + +## InformationSchemaColumn.is\_nullable property + +YES if the column is possibly nullable, NO if it is known not nullable. A not-null constraint is one way a column can be known not nullable, but there can be others. + +Signature: + +```typescript +is_nullable: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.is_self_referencing.md b/docs/api/extract-pg-schema.informationschemacolumn.is_self_referencing.md new file mode 100644 index 00000000..dcde70d7 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.is_self_referencing.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [is\_self\_referencing](./extract-pg-schema.informationschemacolumn.is_self_referencing.md) + +## InformationSchemaColumn.is\_self\_referencing property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +is_self_referencing: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.is_updatable.md b/docs/api/extract-pg-schema.informationschemacolumn.is_updatable.md new file mode 100644 index 00000000..b3db37c1 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.is_updatable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [is\_updatable](./extract-pg-schema.informationschemacolumn.is_updatable.md) + +## InformationSchemaColumn.is\_updatable property + +YES if the column is updatable, NO if not (Columns in base tables are always updatable, columns in views not necessarily) + +Signature: + +```typescript +is_updatable: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.maximum_cardinality.md b/docs/api/extract-pg-schema.informationschemacolumn.maximum_cardinality.md new file mode 100644 index 00000000..98f10739 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.maximum_cardinality.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [maximum\_cardinality](./extract-pg-schema.informationschemacolumn.maximum_cardinality.md) + +## InformationSchemaColumn.maximum\_cardinality property + +Always null, because arrays always have unlimited maximum cardinality in PostgreSQL + +Signature: + +```typescript +maximum_cardinality: null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.md b/docs/api/extract-pg-schema.informationschemacolumn.md new file mode 100644 index 00000000..9c053746 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.md @@ -0,0 +1,63 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) + +## InformationSchemaColumn interface + +The view columns contains information about all table columns (or view columns) in the database. System columns (ctid, etc.) are not included. Only those columns are shown that the current user has access to (by way of being the owner or having some privilege). + +Signature: + +```typescript +interface InformationSchemaColumn +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [character\_maximum\_length](./extract-pg-schema.informationschemacolumn.character_maximum_length.md) | | number \| null | If data\_type identifies a character or bit string type, the declared maximum length; null for all other data types or if no maximum length was declared. | +| [character\_octet\_length](./extract-pg-schema.informationschemacolumn.character_octet_length.md) | | number \| null | If data\_type identifies a character type, the maximum possible length in octets (bytes) of a datum; null for all other data types. The maximum octet length depends on the declared character maximum length (see above) and the server encoding. | +| [character\_set\_catalog](./extract-pg-schema.informationschemacolumn.character_set_catalog.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [character\_set\_name](./extract-pg-schema.informationschemacolumn.character_set_name.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [character\_set\_schema](./extract-pg-schema.informationschemacolumn.character_set_schema.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [collation\_catalog](./extract-pg-schema.informationschemacolumn.collation_catalog.md) | | string \| null | Name of the database containing the collation of the column (always the current database), null if default or the data type of the column is not collatable | +| [collation\_name](./extract-pg-schema.informationschemacolumn.collation_name.md) | | string \| null | Name of the collation of the column, null if default or the data type of the column is not collatable | +| [collation\_schema](./extract-pg-schema.informationschemacolumn.collation_schema.md) | | string \| null | Name of the schema containing the collation of the column, null if default or the data type of the column is not collatable | +| [column\_default](./extract-pg-schema.informationschemacolumn.column_default.md) | | any | Default expression of the column | +| [column\_name](./extract-pg-schema.informationschemacolumn.column_name.md) | | string | Name of the column | +| [data\_type](./extract-pg-schema.informationschemacolumn.data_type.md) | | string | Data type of the column, if it is a built-in type, or ARRAY if it is some array (in that case, see the view element\_types), else USER-DEFINED (in that case, the type is identified in udt\_name and associated columns). If the column is based on a domain, this column refers to the type underlying the domain (and the domain is identified in domain\_name and associated columns). | +| [datetime\_precision](./extract-pg-schema.informationschemacolumn.datetime_precision.md) | | number \| null | If data\_type identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this column, that is, the number of decimal digits maintained following the decimal point in the seconds value. For all other data types, this column is null. | +| [domain\_catalog](./extract-pg-schema.informationschemacolumn.domain_catalog.md) | | string \| null | If the column has a domain type, the name of the database that the domain is defined in (always the current database), else null. | +| [domain\_name](./extract-pg-schema.informationschemacolumn.domain_name.md) | | string \| null | If the column has a domain type, the name of the domain, else null. | +| [domain\_schema](./extract-pg-schema.informationschemacolumn.domain_schema.md) | | string \| null | If the column has a domain type, the name of the schema that the domain is defined in, else null. | +| [dtd\_identifier](./extract-pg-schema.informationschemacolumn.dtd_identifier.md) | | string | An identifier of the data type descriptor of the column, unique among the data type descriptors pertaining to the table. This is mainly useful for joining with other instances of such identifiers. (The specific format of the identifier is not defined and not guaranteed to remain the same in future versions.) | +| [generation\_expression](./extract-pg-schema.informationschemacolumn.generation_expression.md) | | any | If the column is a generated column, then the generation expression, else null. | +| [identity\_cycle](./extract-pg-schema.informationschemacolumn.identity_cycle.md) | | string | If the column is an identity column, then YES if the internal sequence cycles or NO if it does not; otherwise null. | +| [identity\_generation](./extract-pg-schema.informationschemacolumn.identity_generation.md) | | 'ALWAYS' \| 'BY DEFAULT' \| null | If the column is an identity column, then ALWAYS or BY DEFAULT, reflecting the definition of the column. | +| [identity\_increment](./extract-pg-schema.informationschemacolumn.identity_increment.md) | | string \| null | If the column is an identity column, then the increment of the internal sequence, else null. | +| [identity\_maximum](./extract-pg-schema.informationschemacolumn.identity_maximum.md) | | string \| null | If the column is an identity column, then the maximum value of the internal sequence, else null. | +| [identity\_minimum](./extract-pg-schema.informationschemacolumn.identity_minimum.md) | | string \| null | If the column is an identity column, then the minimum value of the internal sequence, else null. | +| [identity\_start](./extract-pg-schema.informationschemacolumn.identity_start.md) | | string \| null | If the column is an identity column, then the start value of the internal sequence, else null. | +| [interval\_precision](./extract-pg-schema.informationschemacolumn.interval_precision.md) | | number \| null | Applies to a feature not available in PostgreSQL (see datetime\_precision for the fractional seconds precision of interval type columns) | +| [interval\_type](./extract-pg-schema.informationschemacolumn.interval_type.md) | | string \| null | If data\_type identifies an interval type, this column contains the specification which fields the intervals include for this column, e.g., YEAR TO MONTH, DAY TO SECOND, etc. If no field restrictions were specified (that is, the interval accepts all fields), and for all other data types, this field is null. | +| [is\_generated](./extract-pg-schema.informationschemacolumn.is_generated.md) | | 'ALWAYS' \| 'NEVER' | If the column is a generated column, then ALWAYS, else NEVER. | +| [is\_identity](./extract-pg-schema.informationschemacolumn.is_identity.md) | | YesNo | If the column is an identity column, then YES, else NO. | +| [is\_nullable](./extract-pg-schema.informationschemacolumn.is_nullable.md) | | YesNo | YES if the column is possibly nullable, NO if it is known not nullable. A not-null constraint is one way a column can be known not nullable, but there can be others. | +| [is\_self\_referencing](./extract-pg-schema.informationschemacolumn.is_self_referencing.md) | | YesNo | Applies to a feature not available in PostgreSQL | +| [is\_updatable](./extract-pg-schema.informationschemacolumn.is_updatable.md) | | YesNo | YES if the column is updatable, NO if not (Columns in base tables are always updatable, columns in views not necessarily) | +| [maximum\_cardinality](./extract-pg-schema.informationschemacolumn.maximum_cardinality.md) | | null | Always null, because arrays always have unlimited maximum cardinality in PostgreSQL | +| [numeric\_precision\_radix](./extract-pg-schema.informationschemacolumn.numeric_precision_radix.md) | | number | If data\_type identifies a numeric type, this column indicates in which base the values in the columns numeric\_precision and numeric\_scale are expressed. The value is either 2 or 10. For all other data types, this column is null. | +| [numeric\_precision](./extract-pg-schema.informationschemacolumn.numeric_precision.md) | | number \| null | If data\_type identifies a numeric type, this column contains the (declared or implicit) precision of the type for this column. The precision indicates the number of significant digits. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. | +| [numeric\_scale](./extract-pg-schema.informationschemacolumn.numeric_scale.md) | | number \| null | If data\_type identifies an exact numeric type, this column contains the (declared or implicit) scale of the type for this column. The scale indicates the number of significant digits to the right of the decimal point. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. | +| [ordinal\_position](./extract-pg-schema.informationschemacolumn.ordinal_position.md) | | number | Ordinal position of the column within the table (count starts at 1) | +| [scope\_catalog](./extract-pg-schema.informationschemacolumn.scope_catalog.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [scope\_name](./extract-pg-schema.informationschemacolumn.scope_name.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [scope\_schema](./extract-pg-schema.informationschemacolumn.scope_schema.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [table\_catalog](./extract-pg-schema.informationschemacolumn.table_catalog.md) | | string | Name of the database containing the table (always the current database) | +| [table\_name](./extract-pg-schema.informationschemacolumn.table_name.md) | | string | Name of the table | +| [table\_schema](./extract-pg-schema.informationschemacolumn.table_schema.md) | | string | Name of the schema containing the table | +| [udt\_catalog](./extract-pg-schema.informationschemacolumn.udt_catalog.md) | | string | Name of the database that the column data type (the underlying type of the domain, if applicable) is defined in (always the current database) | +| [udt\_name](./extract-pg-schema.informationschemacolumn.udt_name.md) | | string | Name of the column data type (the underlying type of the domain, if applicable) | +| [udt\_schema](./extract-pg-schema.informationschemacolumn.udt_schema.md) | | string | Name of the schema that the column data type (the underlying type of the domain, if applicable) is defined in | + diff --git a/docs/api/extract-pg-schema.informationschemacolumn.numeric_precision.md b/docs/api/extract-pg-schema.informationschemacolumn.numeric_precision.md new file mode 100644 index 00000000..13451d61 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.numeric_precision.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [numeric\_precision](./extract-pg-schema.informationschemacolumn.numeric_precision.md) + +## InformationSchemaColumn.numeric\_precision property + +If data\_type identifies a numeric type, this column contains the (declared or implicit) precision of the type for this column. The precision indicates the number of significant digits. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. + +Signature: + +```typescript +numeric_precision: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.numeric_precision_radix.md b/docs/api/extract-pg-schema.informationschemacolumn.numeric_precision_radix.md new file mode 100644 index 00000000..4d27cc5d --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.numeric_precision_radix.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [numeric\_precision\_radix](./extract-pg-schema.informationschemacolumn.numeric_precision_radix.md) + +## InformationSchemaColumn.numeric\_precision\_radix property + +If data\_type identifies a numeric type, this column indicates in which base the values in the columns numeric\_precision and numeric\_scale are expressed. The value is either 2 or 10. For all other data types, this column is null. + +Signature: + +```typescript +numeric_precision_radix: number; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.numeric_scale.md b/docs/api/extract-pg-schema.informationschemacolumn.numeric_scale.md new file mode 100644 index 00000000..b640f599 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.numeric_scale.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [numeric\_scale](./extract-pg-schema.informationschemacolumn.numeric_scale.md) + +## InformationSchemaColumn.numeric\_scale property + +If data\_type identifies an exact numeric type, this column contains the (declared or implicit) scale of the type for this column. The scale indicates the number of significant digits to the right of the decimal point. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. + +Signature: + +```typescript +numeric_scale: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.ordinal_position.md b/docs/api/extract-pg-schema.informationschemacolumn.ordinal_position.md new file mode 100644 index 00000000..b376e947 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.ordinal_position.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [ordinal\_position](./extract-pg-schema.informationschemacolumn.ordinal_position.md) + +## InformationSchemaColumn.ordinal\_position property + +Ordinal position of the column within the table (count starts at 1) + +Signature: + +```typescript +ordinal_position: number; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.scope_catalog.md b/docs/api/extract-pg-schema.informationschemacolumn.scope_catalog.md new file mode 100644 index 00000000..48b7e892 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.scope_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [scope\_catalog](./extract-pg-schema.informationschemacolumn.scope_catalog.md) + +## InformationSchemaColumn.scope\_catalog property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +scope_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.scope_name.md b/docs/api/extract-pg-schema.informationschemacolumn.scope_name.md new file mode 100644 index 00000000..e3a22747 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.scope_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [scope\_name](./extract-pg-schema.informationschemacolumn.scope_name.md) + +## InformationSchemaColumn.scope\_name property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +scope_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.scope_schema.md b/docs/api/extract-pg-schema.informationschemacolumn.scope_schema.md new file mode 100644 index 00000000..2543fad1 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.scope_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [scope\_schema](./extract-pg-schema.informationschemacolumn.scope_schema.md) + +## InformationSchemaColumn.scope\_schema property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +scope_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.table_catalog.md b/docs/api/extract-pg-schema.informationschemacolumn.table_catalog.md new file mode 100644 index 00000000..b523772d --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.table_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [table\_catalog](./extract-pg-schema.informationschemacolumn.table_catalog.md) + +## InformationSchemaColumn.table\_catalog property + +Name of the database containing the table (always the current database) + +Signature: + +```typescript +table_catalog: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.table_name.md b/docs/api/extract-pg-schema.informationschemacolumn.table_name.md new file mode 100644 index 00000000..450c1aba --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.table_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [table\_name](./extract-pg-schema.informationschemacolumn.table_name.md) + +## InformationSchemaColumn.table\_name property + +Name of the table + +Signature: + +```typescript +table_name: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.table_schema.md b/docs/api/extract-pg-schema.informationschemacolumn.table_schema.md new file mode 100644 index 00000000..c9bc5e1f --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.table_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [table\_schema](./extract-pg-schema.informationschemacolumn.table_schema.md) + +## InformationSchemaColumn.table\_schema property + +Name of the schema containing the table + +Signature: + +```typescript +table_schema: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.udt_catalog.md b/docs/api/extract-pg-schema.informationschemacolumn.udt_catalog.md new file mode 100644 index 00000000..4f903053 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.udt_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [udt\_catalog](./extract-pg-schema.informationschemacolumn.udt_catalog.md) + +## InformationSchemaColumn.udt\_catalog property + +Name of the database that the column data type (the underlying type of the domain, if applicable) is defined in (always the current database) + +Signature: + +```typescript +udt_catalog: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.udt_name.md b/docs/api/extract-pg-schema.informationschemacolumn.udt_name.md new file mode 100644 index 00000000..30dd6a15 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.udt_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [udt\_name](./extract-pg-schema.informationschemacolumn.udt_name.md) + +## InformationSchemaColumn.udt\_name property + +Name of the column data type (the underlying type of the domain, if applicable) + +Signature: + +```typescript +udt_name: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemacolumn.udt_schema.md b/docs/api/extract-pg-schema.informationschemacolumn.udt_schema.md new file mode 100644 index 00000000..9e58c2f3 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemacolumn.udt_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) > [udt\_schema](./extract-pg-schema.informationschemacolumn.udt_schema.md) + +## InformationSchemaColumn.udt\_schema property + +Name of the schema that the column data type (the underlying type of the domain, if applicable) is defined in + +Signature: + +```typescript +udt_schema: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.character_maximum_length.md b/docs/api/extract-pg-schema.informationschemadomain.character_maximum_length.md new file mode 100644 index 00000000..15a180df --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.character_maximum_length.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [character\_maximum\_length](./extract-pg-schema.informationschemadomain.character_maximum_length.md) + +## InformationSchemaDomain.character\_maximum\_length property + +If the domain has a character or bit string type, the declared maximum length; null for all other data types or if no maximum length was declared. + +Signature: + +```typescript +character_maximum_length: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.character_octet_length.md b/docs/api/extract-pg-schema.informationschemadomain.character_octet_length.md new file mode 100644 index 00000000..575eccae --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.character_octet_length.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [character\_octet\_length](./extract-pg-schema.informationschemadomain.character_octet_length.md) + +## InformationSchemaDomain.character\_octet\_length property + +If the domain has a character type, the maximum possible length in octets (bytes) of a datum; null for all other data types. The maximum octet length depends on the declared character maximum length (see above) and the server encoding. + +Signature: + +```typescript +character_octet_length: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.character_set_catalog.md b/docs/api/extract-pg-schema.informationschemadomain.character_set_catalog.md new file mode 100644 index 00000000..3381cde6 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.character_set_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [character\_set\_catalog](./extract-pg-schema.informationschemadomain.character_set_catalog.md) + +## InformationSchemaDomain.character\_set\_catalog property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +character_set_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.character_set_name.md b/docs/api/extract-pg-schema.informationschemadomain.character_set_name.md new file mode 100644 index 00000000..7e596225 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.character_set_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [character\_set\_name](./extract-pg-schema.informationschemadomain.character_set_name.md) + +## InformationSchemaDomain.character\_set\_name property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +character_set_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.character_set_schema.md b/docs/api/extract-pg-schema.informationschemadomain.character_set_schema.md new file mode 100644 index 00000000..eccc2976 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.character_set_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [character\_set\_schema](./extract-pg-schema.informationschemadomain.character_set_schema.md) + +## InformationSchemaDomain.character\_set\_schema property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +character_set_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.collation_catalog.md b/docs/api/extract-pg-schema.informationschemadomain.collation_catalog.md new file mode 100644 index 00000000..34be740f --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.collation_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [collation\_catalog](./extract-pg-schema.informationschemadomain.collation_catalog.md) + +## InformationSchemaDomain.collation\_catalog property + +Name of the database containing the collation of the domain (always the current database), null if default or the data type of the domain is not collatable + +Signature: + +```typescript +collation_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.collation_name.md b/docs/api/extract-pg-schema.informationschemadomain.collation_name.md new file mode 100644 index 00000000..7133c1a6 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.collation_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [collation\_name](./extract-pg-schema.informationschemadomain.collation_name.md) + +## InformationSchemaDomain.collation\_name property + +Name of the collation of the domain, null if default or the data type of the domain is not collatable + +Signature: + +```typescript +collation_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.collation_schema.md b/docs/api/extract-pg-schema.informationschemadomain.collation_schema.md new file mode 100644 index 00000000..35d5caff --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.collation_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [collation\_schema](./extract-pg-schema.informationschemadomain.collation_schema.md) + +## InformationSchemaDomain.collation\_schema property + +Name of the schema containing the collation of the domain, null if default or the data type of the domain is not collatable + +Signature: + +```typescript +collation_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.data_type.md b/docs/api/extract-pg-schema.informationschemadomain.data_type.md new file mode 100644 index 00000000..42159f97 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.data_type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [data\_type](./extract-pg-schema.informationschemadomain.data_type.md) + +## InformationSchemaDomain.data\_type property + +Data type of the domain, if it is a built-in type, or ARRAY if it is some array (in that case, see the view element\_types), else USER-DEFINED (in that case, the type is identified in udt\_name and associated columns). + +Signature: + +```typescript +data_type: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.datetime_precision.md b/docs/api/extract-pg-schema.informationschemadomain.datetime_precision.md new file mode 100644 index 00000000..2781e733 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.datetime_precision.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [datetime\_precision](./extract-pg-schema.informationschemadomain.datetime_precision.md) + +## InformationSchemaDomain.datetime\_precision property + +If data\_type identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this domain, that is, the number of decimal digits maintained following the decimal point in the seconds value. For all other data types, this column is null. + +Signature: + +```typescript +datetime_precision: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.domain_catalog.md b/docs/api/extract-pg-schema.informationschemadomain.domain_catalog.md new file mode 100644 index 00000000..f7925f0e --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.domain_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [domain\_catalog](./extract-pg-schema.informationschemadomain.domain_catalog.md) + +## InformationSchemaDomain.domain\_catalog property + +Name of the database that contains the domain (always the current database) + +Signature: + +```typescript +domain_catalog: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.domain_default.md b/docs/api/extract-pg-schema.informationschemadomain.domain_default.md new file mode 100644 index 00000000..3c8586f6 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.domain_default.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [domain\_default](./extract-pg-schema.informationschemadomain.domain_default.md) + +## InformationSchemaDomain.domain\_default property + +Default expression of the domain + +Signature: + +```typescript +domain_default: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.domain_name.md b/docs/api/extract-pg-schema.informationschemadomain.domain_name.md new file mode 100644 index 00000000..d21f1a6a --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.domain_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [domain\_name](./extract-pg-schema.informationschemadomain.domain_name.md) + +## InformationSchemaDomain.domain\_name property + +Name of the domain + +Signature: + +```typescript +domain_name: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.domain_schema.md b/docs/api/extract-pg-schema.informationschemadomain.domain_schema.md new file mode 100644 index 00000000..867bae03 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.domain_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [domain\_schema](./extract-pg-schema.informationschemadomain.domain_schema.md) + +## InformationSchemaDomain.domain\_schema property + +Name of the schema that contains the domain + +Signature: + +```typescript +domain_schema: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.dtd_identifier.md b/docs/api/extract-pg-schema.informationschemadomain.dtd_identifier.md new file mode 100644 index 00000000..517b4b1d --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.dtd_identifier.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [dtd\_identifier](./extract-pg-schema.informationschemadomain.dtd_identifier.md) + +## InformationSchemaDomain.dtd\_identifier property + +An identifier of the data type descriptor of the domain, unique among the data type descriptors pertaining to the domain (which is trivial, because a domain only contains one data type descriptor). This is mainly useful for joining with other instances of such identifiers. (The specific format of the identifier is not defined and not guaranteed to remain the same in future versions.) + +Signature: + +```typescript +dtd_identifier: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.interval_precision.md b/docs/api/extract-pg-schema.informationschemadomain.interval_precision.md new file mode 100644 index 00000000..f7a0c45a --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.interval_precision.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [interval\_precision](./extract-pg-schema.informationschemadomain.interval_precision.md) + +## InformationSchemaDomain.interval\_precision property + +Applies to a feature not available in PostgreSQL (see datetime\_precision for the fractional seconds precision of interval type domains) + +Signature: + +```typescript +interval_precision: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.interval_type.md b/docs/api/extract-pg-schema.informationschemadomain.interval_type.md new file mode 100644 index 00000000..9646bd13 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.interval_type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [interval\_type](./extract-pg-schema.informationschemadomain.interval_type.md) + +## InformationSchemaDomain.interval\_type property + +If data\_type identifies an interval type, this column contains the specification which fields the intervals include for this domain, e.g., YEAR TO MONTH, DAY TO SECOND, etc. If no field restrictions were specified (that is, the interval accepts all fields), and for all other data types, this field is null. + +Signature: + +```typescript +interval_type: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.maximum_cardinality.md b/docs/api/extract-pg-schema.informationschemadomain.maximum_cardinality.md new file mode 100644 index 00000000..cdcb5964 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.maximum_cardinality.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [maximum\_cardinality](./extract-pg-schema.informationschemadomain.maximum_cardinality.md) + +## InformationSchemaDomain.maximum\_cardinality property + +Always null, because arrays always have unlimited maximum cardinality in PostgreSQL + +Signature: + +```typescript +maximum_cardinality: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.md b/docs/api/extract-pg-schema.informationschemadomain.md new file mode 100644 index 00000000..d794690d --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.md @@ -0,0 +1,46 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) + +## InformationSchemaDomain interface + +The view domains contains all domains defined in the current database. Only those domains are shown that the current user has access to (by way of being the owner or having some privilege). + +Signature: + +```typescript +interface InformationSchemaDomain +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [character\_maximum\_length](./extract-pg-schema.informationschemadomain.character_maximum_length.md) | | number \| null | If the domain has a character or bit string type, the declared maximum length; null for all other data types or if no maximum length was declared. | +| [character\_octet\_length](./extract-pg-schema.informationschemadomain.character_octet_length.md) | | number \| null | If the domain has a character type, the maximum possible length in octets (bytes) of a datum; null for all other data types. The maximum octet length depends on the declared character maximum length (see above) and the server encoding. | +| [character\_set\_catalog](./extract-pg-schema.informationschemadomain.character_set_catalog.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [character\_set\_name](./extract-pg-schema.informationschemadomain.character_set_name.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [character\_set\_schema](./extract-pg-schema.informationschemadomain.character_set_schema.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [collation\_catalog](./extract-pg-schema.informationschemadomain.collation_catalog.md) | | string \| null | Name of the database containing the collation of the domain (always the current database), null if default or the data type of the domain is not collatable | +| [collation\_name](./extract-pg-schema.informationschemadomain.collation_name.md) | | string \| null | Name of the collation of the domain, null if default or the data type of the domain is not collatable | +| [collation\_schema](./extract-pg-schema.informationschemadomain.collation_schema.md) | | string \| null | Name of the schema containing the collation of the domain, null if default or the data type of the domain is not collatable | +| [data\_type](./extract-pg-schema.informationschemadomain.data_type.md) | | string | Data type of the domain, if it is a built-in type, or ARRAY if it is some array (in that case, see the view element\_types), else USER-DEFINED (in that case, the type is identified in udt\_name and associated columns). | +| [datetime\_precision](./extract-pg-schema.informationschemadomain.datetime_precision.md) | | number \| null | If data\_type identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this domain, that is, the number of decimal digits maintained following the decimal point in the seconds value. For all other data types, this column is null. | +| [domain\_catalog](./extract-pg-schema.informationschemadomain.domain_catalog.md) | | string | Name of the database that contains the domain (always the current database) | +| [domain\_default](./extract-pg-schema.informationschemadomain.domain_default.md) | | string \| null | Default expression of the domain | +| [domain\_name](./extract-pg-schema.informationschemadomain.domain_name.md) | | string | Name of the domain | +| [domain\_schema](./extract-pg-schema.informationschemadomain.domain_schema.md) | | string | Name of the schema that contains the domain | +| [dtd\_identifier](./extract-pg-schema.informationschemadomain.dtd_identifier.md) | | string \| null | An identifier of the data type descriptor of the domain, unique among the data type descriptors pertaining to the domain (which is trivial, because a domain only contains one data type descriptor). This is mainly useful for joining with other instances of such identifiers. (The specific format of the identifier is not defined and not guaranteed to remain the same in future versions.) | +| [interval\_precision](./extract-pg-schema.informationschemadomain.interval_precision.md) | | number \| null | Applies to a feature not available in PostgreSQL (see datetime\_precision for the fractional seconds precision of interval type domains) | +| [interval\_type](./extract-pg-schema.informationschemadomain.interval_type.md) | | string \| null | If data\_type identifies an interval type, this column contains the specification which fields the intervals include for this domain, e.g., YEAR TO MONTH, DAY TO SECOND, etc. If no field restrictions were specified (that is, the interval accepts all fields), and for all other data types, this field is null. | +| [maximum\_cardinality](./extract-pg-schema.informationschemadomain.maximum_cardinality.md) | | number \| null | Always null, because arrays always have unlimited maximum cardinality in PostgreSQL | +| [numeric\_precision\_radix](./extract-pg-schema.informationschemadomain.numeric_precision_radix.md) | | number \| null | If the domain has a numeric type, this column indicates in which base the values in the columns numeric\_precision and numeric\_scale are expressed. The value is either 2 or 10. For all other data types, this column is null. | +| [numeric\_precision](./extract-pg-schema.informationschemadomain.numeric_precision.md) | | number \| null | If the domain has a numeric type, this column contains the (declared or implicit) precision of the type for this domain. The precision indicates the number of significant digits. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. | +| [numeric\_scale](./extract-pg-schema.informationschemadomain.numeric_scale.md) | | number \| null | If the domain has an exact numeric type, this column contains the (declared or implicit) scale of the type for this domain. The scale indicates the number of significant digits to the right of the decimal point. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. | +| [scope\_catalog](./extract-pg-schema.informationschemadomain.scope_catalog.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [scope\_name](./extract-pg-schema.informationschemadomain.scope_name.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [scope\_schema](./extract-pg-schema.informationschemadomain.scope_schema.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [udt\_catalog](./extract-pg-schema.informationschemadomain.udt_catalog.md) | | string \| null | Name of the database that the domain data type is defined in (always the current database) | +| [udt\_name](./extract-pg-schema.informationschemadomain.udt_name.md) | | string \| null | Name of the domain data type | +| [udt\_schema](./extract-pg-schema.informationschemadomain.udt_schema.md) | | string \| null | Name of the schema that the domain data type is defined in | + diff --git a/docs/api/extract-pg-schema.informationschemadomain.numeric_precision.md b/docs/api/extract-pg-schema.informationschemadomain.numeric_precision.md new file mode 100644 index 00000000..fa525271 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.numeric_precision.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [numeric\_precision](./extract-pg-schema.informationschemadomain.numeric_precision.md) + +## InformationSchemaDomain.numeric\_precision property + +If the domain has a numeric type, this column contains the (declared or implicit) precision of the type for this domain. The precision indicates the number of significant digits. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. + +Signature: + +```typescript +numeric_precision: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.numeric_precision_radix.md b/docs/api/extract-pg-schema.informationschemadomain.numeric_precision_radix.md new file mode 100644 index 00000000..9ac63dc0 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.numeric_precision_radix.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [numeric\_precision\_radix](./extract-pg-schema.informationschemadomain.numeric_precision_radix.md) + +## InformationSchemaDomain.numeric\_precision\_radix property + +If the domain has a numeric type, this column indicates in which base the values in the columns numeric\_precision and numeric\_scale are expressed. The value is either 2 or 10. For all other data types, this column is null. + +Signature: + +```typescript +numeric_precision_radix: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.numeric_scale.md b/docs/api/extract-pg-schema.informationschemadomain.numeric_scale.md new file mode 100644 index 00000000..27e35a2b --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.numeric_scale.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [numeric\_scale](./extract-pg-schema.informationschemadomain.numeric_scale.md) + +## InformationSchemaDomain.numeric\_scale property + +If the domain has an exact numeric type, this column contains the (declared or implicit) scale of the type for this domain. The scale indicates the number of significant digits to the right of the decimal point. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric\_precision\_radix. For all other data types, this column is null. + +Signature: + +```typescript +numeric_scale: number | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.scope_catalog.md b/docs/api/extract-pg-schema.informationschemadomain.scope_catalog.md new file mode 100644 index 00000000..9c962f1c --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.scope_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [scope\_catalog](./extract-pg-schema.informationschemadomain.scope_catalog.md) + +## InformationSchemaDomain.scope\_catalog property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +scope_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.scope_name.md b/docs/api/extract-pg-schema.informationschemadomain.scope_name.md new file mode 100644 index 00000000..100d87b2 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.scope_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [scope\_name](./extract-pg-schema.informationschemadomain.scope_name.md) + +## InformationSchemaDomain.scope\_name property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +scope_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.scope_schema.md b/docs/api/extract-pg-schema.informationschemadomain.scope_schema.md new file mode 100644 index 00000000..6a9861b0 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.scope_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [scope\_schema](./extract-pg-schema.informationschemadomain.scope_schema.md) + +## InformationSchemaDomain.scope\_schema property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +scope_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.udt_catalog.md b/docs/api/extract-pg-schema.informationschemadomain.udt_catalog.md new file mode 100644 index 00000000..92ad000e --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.udt_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [udt\_catalog](./extract-pg-schema.informationschemadomain.udt_catalog.md) + +## InformationSchemaDomain.udt\_catalog property + +Name of the database that the domain data type is defined in (always the current database) + +Signature: + +```typescript +udt_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.udt_name.md b/docs/api/extract-pg-schema.informationschemadomain.udt_name.md new file mode 100644 index 00000000..9cb20a1c --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.udt_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [udt\_name](./extract-pg-schema.informationschemadomain.udt_name.md) + +## InformationSchemaDomain.udt\_name property + +Name of the domain data type + +Signature: + +```typescript +udt_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemadomain.udt_schema.md b/docs/api/extract-pg-schema.informationschemadomain.udt_schema.md new file mode 100644 index 00000000..5095685a --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemadomain.udt_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) > [udt\_schema](./extract-pg-schema.informationschemadomain.udt_schema.md) + +## InformationSchemaDomain.udt\_schema property + +Name of the schema that the domain data type is defined in + +Signature: + +```typescript +udt_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.commit_action.md b/docs/api/extract-pg-schema.informationschematable.commit_action.md new file mode 100644 index 00000000..5e8983ef --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.commit_action.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [commit\_action](./extract-pg-schema.informationschematable.commit_action.md) + +## InformationSchemaTable.commit\_action property + +Not yet implemented + +Signature: + +```typescript +commit_action: any; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.is_insertable_into.md b/docs/api/extract-pg-schema.informationschematable.is_insertable_into.md new file mode 100644 index 00000000..f1a4e3a8 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.is_insertable_into.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [is\_insertable\_into](./extract-pg-schema.informationschematable.is_insertable_into.md) + +## InformationSchemaTable.is\_insertable\_into property + +YES if the table is insertable into, NO if not (Base tables are always insertable into, views not necessarily.) + +Signature: + +```typescript +is_insertable_into: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.is_typed.md b/docs/api/extract-pg-schema.informationschematable.is_typed.md new file mode 100644 index 00000000..8a625ef7 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.is_typed.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [is\_typed](./extract-pg-schema.informationschematable.is_typed.md) + +## InformationSchemaTable.is\_typed property + +YES if the table is a typed table, NO if not + +Signature: + +```typescript +is_typed: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.md b/docs/api/extract-pg-schema.informationschematable.md new file mode 100644 index 00000000..5107fbc1 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.md @@ -0,0 +1,31 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) + +## InformationSchemaTable interface + +The view tables contains all tables and views defined in the current database. Only those tables and views are shown that the current user has access to (by way of being the owner or having some privilege). + +Signature: + +```typescript +interface InformationSchemaTable +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [commit\_action](./extract-pg-schema.informationschematable.commit_action.md) | | any | Not yet implemented | +| [is\_insertable\_into](./extract-pg-schema.informationschematable.is_insertable_into.md) | | YesNo | YES if the table is insertable into, NO if not (Base tables are always insertable into, views not necessarily.) | +| [is\_typed](./extract-pg-schema.informationschematable.is_typed.md) | | YesNo | YES if the table is a typed table, NO if not | +| [reference\_generation](./extract-pg-schema.informationschematable.reference_generation.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [self\_referencing\_column\_name](./extract-pg-schema.informationschematable.self_referencing_column_name.md) | | string \| null | Applies to a feature not available in PostgreSQL | +| [table\_catalog](./extract-pg-schema.informationschematable.table_catalog.md) | | string | Name of the database that contains the table (always the current database) | +| [table\_name](./extract-pg-schema.informationschematable.table_name.md) | | string | Name of the table | +| [table\_schema](./extract-pg-schema.informationschematable.table_schema.md) | | string | Name of the schema that contains the table | +| [table\_type](./extract-pg-schema.informationschematable.table_type.md) | | 'BASE TABLE' \| 'VIEW' \| 'FOREIGN' \| 'LOCAL TEMPORARY' | Type of the table: BASE TABLE for a persistent base table (the normal table type), VIEW for a view, FOREIGN for a foreign table, or LOCAL TEMPORARY for a temporary table | +| [user\_defined\_type\_catalog](./extract-pg-schema.informationschematable.user_defined_type_catalog.md) | | string \| null | If the table is a typed table, the name of the database that contains the underlying data type (always the current database), else null. | +| [user\_defined\_type\_name](./extract-pg-schema.informationschematable.user_defined_type_name.md) | | string \| null | If the table is a typed table, the name of the underlying data type, else null. | +| [user\_defined\_type\_schema](./extract-pg-schema.informationschematable.user_defined_type_schema.md) | | string \| null | If the table is a typed table, the name of the schema that contains the underlying data type, else null. | + diff --git a/docs/api/extract-pg-schema.informationschematable.reference_generation.md b/docs/api/extract-pg-schema.informationschematable.reference_generation.md new file mode 100644 index 00000000..e5eb3904 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.reference_generation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [reference\_generation](./extract-pg-schema.informationschematable.reference_generation.md) + +## InformationSchemaTable.reference\_generation property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +reference_generation: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.self_referencing_column_name.md b/docs/api/extract-pg-schema.informationschematable.self_referencing_column_name.md new file mode 100644 index 00000000..98c1b964 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.self_referencing_column_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [self\_referencing\_column\_name](./extract-pg-schema.informationschematable.self_referencing_column_name.md) + +## InformationSchemaTable.self\_referencing\_column\_name property + +Applies to a feature not available in PostgreSQL + +Signature: + +```typescript +self_referencing_column_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.table_catalog.md b/docs/api/extract-pg-schema.informationschematable.table_catalog.md new file mode 100644 index 00000000..8ec35c64 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.table_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [table\_catalog](./extract-pg-schema.informationschematable.table_catalog.md) + +## InformationSchemaTable.table\_catalog property + +Name of the database that contains the table (always the current database) + +Signature: + +```typescript +table_catalog: string; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.table_name.md b/docs/api/extract-pg-schema.informationschematable.table_name.md new file mode 100644 index 00000000..5ff1f56c --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.table_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [table\_name](./extract-pg-schema.informationschematable.table_name.md) + +## InformationSchemaTable.table\_name property + +Name of the table + +Signature: + +```typescript +table_name: string; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.table_schema.md b/docs/api/extract-pg-schema.informationschematable.table_schema.md new file mode 100644 index 00000000..c9972293 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.table_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [table\_schema](./extract-pg-schema.informationschematable.table_schema.md) + +## InformationSchemaTable.table\_schema property + +Name of the schema that contains the table + +Signature: + +```typescript +table_schema: string; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.table_type.md b/docs/api/extract-pg-schema.informationschematable.table_type.md new file mode 100644 index 00000000..d7e49677 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.table_type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [table\_type](./extract-pg-schema.informationschematable.table_type.md) + +## InformationSchemaTable.table\_type property + +Type of the table: BASE TABLE for a persistent base table (the normal table type), VIEW for a view, FOREIGN for a foreign table, or LOCAL TEMPORARY for a temporary table + +Signature: + +```typescript +table_type: 'BASE TABLE' | 'VIEW' | 'FOREIGN' | 'LOCAL TEMPORARY'; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.user_defined_type_catalog.md b/docs/api/extract-pg-schema.informationschematable.user_defined_type_catalog.md new file mode 100644 index 00000000..3026d67d --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.user_defined_type_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [user\_defined\_type\_catalog](./extract-pg-schema.informationschematable.user_defined_type_catalog.md) + +## InformationSchemaTable.user\_defined\_type\_catalog property + +If the table is a typed table, the name of the database that contains the underlying data type (always the current database), else null. + +Signature: + +```typescript +user_defined_type_catalog: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.user_defined_type_name.md b/docs/api/extract-pg-schema.informationschematable.user_defined_type_name.md new file mode 100644 index 00000000..7b69fe1f --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.user_defined_type_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [user\_defined\_type\_name](./extract-pg-schema.informationschematable.user_defined_type_name.md) + +## InformationSchemaTable.user\_defined\_type\_name property + +If the table is a typed table, the name of the underlying data type, else null. + +Signature: + +```typescript +user_defined_type_name: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschematable.user_defined_type_schema.md b/docs/api/extract-pg-schema.informationschematable.user_defined_type_schema.md new file mode 100644 index 00000000..78adaeb2 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschematable.user_defined_type_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaTable](./extract-pg-schema.informationschematable.md) > [user\_defined\_type\_schema](./extract-pg-schema.informationschematable.user_defined_type_schema.md) + +## InformationSchemaTable.user\_defined\_type\_schema property + +If the table is a typed table, the name of the schema that contains the underlying data type, else null. + +Signature: + +```typescript +user_defined_type_schema: string | null; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.check_option.md b/docs/api/extract-pg-schema.informationschemaview.check_option.md new file mode 100644 index 00000000..c7bb0405 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.check_option.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [check\_option](./extract-pg-schema.informationschemaview.check_option.md) + +## InformationSchemaView.check\_option property + +CASCADED or LOCAL if the view has a CHECK OPTION defined on it, NONE if not + +Signature: + +```typescript +check_option: 'CASCADED' | 'LOCAL' | 'NONE'; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.is_insertable_into.md b/docs/api/extract-pg-schema.informationschemaview.is_insertable_into.md new file mode 100644 index 00000000..d7848b4d --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.is_insertable_into.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [is\_insertable\_into](./extract-pg-schema.informationschemaview.is_insertable_into.md) + +## InformationSchemaView.is\_insertable\_into property + +YES if the table is insertable into, NO if not (Base tables are always insertable into, views not necessarily.) + +Signature: + +```typescript +is_insertable_into: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.is_trigger_deletable.md b/docs/api/extract-pg-schema.informationschemaview.is_trigger_deletable.md new file mode 100644 index 00000000..ec9098aa --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.is_trigger_deletable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [is\_trigger\_deletable](./extract-pg-schema.informationschemaview.is_trigger_deletable.md) + +## InformationSchemaView.is\_trigger\_deletable property + +YES if the view has an INSTEAD OF DELETE trigger defined on it, NO if not + +Signature: + +```typescript +is_trigger_deletable: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.is_trigger_insertable_into.md b/docs/api/extract-pg-schema.informationschemaview.is_trigger_insertable_into.md new file mode 100644 index 00000000..a1e78dc4 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.is_trigger_insertable_into.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [is\_trigger\_insertable\_into](./extract-pg-schema.informationschemaview.is_trigger_insertable_into.md) + +## InformationSchemaView.is\_trigger\_insertable\_into property + +YES if the view has an INSTEAD OF INSERT trigger defined on it, NO if not + +Signature: + +```typescript +is_trigger_insertable_into: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.is_trigger_updatable.md b/docs/api/extract-pg-schema.informationschemaview.is_trigger_updatable.md new file mode 100644 index 00000000..fd056cd7 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.is_trigger_updatable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [is\_trigger\_updatable](./extract-pg-schema.informationschemaview.is_trigger_updatable.md) + +## InformationSchemaView.is\_trigger\_updatable property + +YES if the view has an INSTEAD OF UPDATE trigger defined on it, NO if not + +Signature: + +```typescript +is_trigger_updatable: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.is_updatable.md b/docs/api/extract-pg-schema.informationschemaview.is_updatable.md new file mode 100644 index 00000000..1c642e26 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.is_updatable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [is\_updatable](./extract-pg-schema.informationschemaview.is_updatable.md) + +## InformationSchemaView.is\_updatable property + +ES if the view is updatable (allows UPDATE and DELETE), NO if not + +Signature: + +```typescript +is_updatable: YesNo; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.md b/docs/api/extract-pg-schema.informationschemaview.md new file mode 100644 index 00000000..6335651f --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.md @@ -0,0 +1,29 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) + +## InformationSchemaView interface + +The view tables contains all tables and views defined in the current database. Only those tables and views are shown that the current user has access to (by way of being the owner or having some privilege). + +Signature: + +```typescript +interface InformationSchemaView +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [check\_option](./extract-pg-schema.informationschemaview.check_option.md) | | 'CASCADED' \| 'LOCAL' \| 'NONE' | CASCADED or LOCAL if the view has a CHECK OPTION defined on it, NONE if not | +| [is\_insertable\_into](./extract-pg-schema.informationschemaview.is_insertable_into.md) | | YesNo | YES if the table is insertable into, NO if not (Base tables are always insertable into, views not necessarily.) | +| [is\_trigger\_deletable](./extract-pg-schema.informationschemaview.is_trigger_deletable.md) | | YesNo | YES if the view has an INSTEAD OF DELETE trigger defined on it, NO if not | +| [is\_trigger\_insertable\_into](./extract-pg-schema.informationschemaview.is_trigger_insertable_into.md) | | YesNo | YES if the view has an INSTEAD OF INSERT trigger defined on it, NO if not | +| [is\_trigger\_updatable](./extract-pg-schema.informationschemaview.is_trigger_updatable.md) | | YesNo | YES if the view has an INSTEAD OF UPDATE trigger defined on it, NO if not | +| [is\_updatable](./extract-pg-schema.informationschemaview.is_updatable.md) | | YesNo | ES if the view is updatable (allows UPDATE and DELETE), NO if not | +| [table\_catalog](./extract-pg-schema.informationschemaview.table_catalog.md) | | string | Name of the database that contains the table (always the current database) | +| [table\_name](./extract-pg-schema.informationschemaview.table_name.md) | | string | Name of the table | +| [table\_schema](./extract-pg-schema.informationschemaview.table_schema.md) | | string | Name of the schema that contains the table | +| [view\_definition](./extract-pg-schema.informationschemaview.view_definition.md) | | string | Query expression defining the view (null if the view is not owned by a currently enabled role) | + diff --git a/docs/api/extract-pg-schema.informationschemaview.table_catalog.md b/docs/api/extract-pg-schema.informationschemaview.table_catalog.md new file mode 100644 index 00000000..14f2b1e3 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.table_catalog.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [table\_catalog](./extract-pg-schema.informationschemaview.table_catalog.md) + +## InformationSchemaView.table\_catalog property + +Name of the database that contains the table (always the current database) + +Signature: + +```typescript +table_catalog: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.table_name.md b/docs/api/extract-pg-schema.informationschemaview.table_name.md new file mode 100644 index 00000000..25970920 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.table_name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [table\_name](./extract-pg-schema.informationschemaview.table_name.md) + +## InformationSchemaView.table\_name property + +Name of the table + +Signature: + +```typescript +table_name: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.table_schema.md b/docs/api/extract-pg-schema.informationschemaview.table_schema.md new file mode 100644 index 00000000..219bcb09 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.table_schema.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [table\_schema](./extract-pg-schema.informationschemaview.table_schema.md) + +## InformationSchemaView.table\_schema property + +Name of the schema that contains the table + +Signature: + +```typescript +table_schema: string; +``` diff --git a/docs/api/extract-pg-schema.informationschemaview.view_definition.md b/docs/api/extract-pg-schema.informationschemaview.view_definition.md new file mode 100644 index 00000000..64b0c822 --- /dev/null +++ b/docs/api/extract-pg-schema.informationschemaview.view_definition.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [InformationSchemaView](./extract-pg-schema.informationschemaview.md) > [view\_definition](./extract-pg-schema.informationschemaview.view_definition.md) + +## InformationSchemaView.view\_definition property + +Query expression defining the view (null if the view is not owned by a currently enabled role) + +Signature: + +```typescript +view_definition: string; +``` diff --git a/docs/api/extract-pg-schema.kind.md b/docs/api/extract-pg-schema.kind.md new file mode 100644 index 00000000..f15a31fb --- /dev/null +++ b/docs/api/extract-pg-schema.kind.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [Kind](./extract-pg-schema.kind.md) + +## Kind type + +Signature: + +```typescript +export declare type Kind = TypeKind | ClassKind; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.comment.md b/docs/api/extract-pg-schema.materializedviewcolumn.comment.md new file mode 100644 index 00000000..706beb40 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.comment.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [comment](./extract-pg-schema.materializedviewcolumn.comment.md) + +## MaterializedViewColumn.comment property + +Signature: + +```typescript +comment: string | null; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.defaultvalue.md b/docs/api/extract-pg-schema.materializedviewcolumn.defaultvalue.md new file mode 100644 index 00000000..57da353c --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.defaultvalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [defaultValue](./extract-pg-schema.materializedviewcolumn.defaultvalue.md) + +## MaterializedViewColumn.defaultValue property + +Signature: + +```typescript +defaultValue: any; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.expandedtype.md b/docs/api/extract-pg-schema.materializedviewcolumn.expandedtype.md new file mode 100644 index 00000000..d98bac69 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.expandedtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [expandedType](./extract-pg-schema.materializedviewcolumn.expandedtype.md) + +## MaterializedViewColumn.expandedType property + +Signature: + +```typescript +expandedType: string; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.fakeinformationschemavalue.md b/docs/api/extract-pg-schema.materializedviewcolumn.fakeinformationschemavalue.md new file mode 100644 index 00000000..7905177c --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.fakeinformationschemavalue.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [fakeInformationSchemaValue](./extract-pg-schema.materializedviewcolumn.fakeinformationschemavalue.md) + +## MaterializedViewColumn.fakeInformationSchemaValue property + +The Postgres information\_schema views do not contain info about materialized views. This value is the result of a query that matches the one for regular views. Use with caution, not all fields are guaranteed to be meaningful and/or accurate. + +Signature: + +```typescript +fakeInformationSchemaValue: InformationSchemaColumn; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.generated.md b/docs/api/extract-pg-schema.materializedviewcolumn.generated.md new file mode 100644 index 00000000..c58d98ab --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.generated.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [generated](./extract-pg-schema.materializedviewcolumn.generated.md) + +## MaterializedViewColumn.generated property + +Signature: + +```typescript +generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.indices.md b/docs/api/extract-pg-schema.materializedviewcolumn.indices.md new file mode 100644 index 00000000..4916fa5c --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.indices.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [indices](./extract-pg-schema.materializedviewcolumn.indices.md) + +## MaterializedViewColumn.indices property + +Signature: + +```typescript +indices?: Index[]; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.isarray.md b/docs/api/extract-pg-schema.materializedviewcolumn.isarray.md new file mode 100644 index 00000000..f15e775f --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.isarray.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [isArray](./extract-pg-schema.materializedviewcolumn.isarray.md) + +## MaterializedViewColumn.isArray property + +Signature: + +```typescript +isArray: boolean; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.isidentity.md b/docs/api/extract-pg-schema.materializedviewcolumn.isidentity.md new file mode 100644 index 00000000..56e7501a --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.isidentity.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [isIdentity](./extract-pg-schema.materializedviewcolumn.isidentity.md) + +## MaterializedViewColumn.isIdentity property + +Signature: + +```typescript +isIdentity: boolean; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.isnullable.md b/docs/api/extract-pg-schema.materializedviewcolumn.isnullable.md new file mode 100644 index 00000000..6ab475d3 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.isnullable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [isNullable](./extract-pg-schema.materializedviewcolumn.isnullable.md) + +## MaterializedViewColumn.isNullable property + +Signature: + +```typescript +isNullable?: boolean; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.isprimarykey.md b/docs/api/extract-pg-schema.materializedviewcolumn.isprimarykey.md new file mode 100644 index 00000000..4a907893 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.isprimarykey.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [isPrimaryKey](./extract-pg-schema.materializedviewcolumn.isprimarykey.md) + +## MaterializedViewColumn.isPrimaryKey property + +Signature: + +```typescript +isPrimaryKey?: boolean; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.isupdatable.md b/docs/api/extract-pg-schema.materializedviewcolumn.isupdatable.md new file mode 100644 index 00000000..8a7544f5 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.isupdatable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [isUpdatable](./extract-pg-schema.materializedviewcolumn.isupdatable.md) + +## MaterializedViewColumn.isUpdatable property + +Signature: + +```typescript +isUpdatable: boolean; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.maxlength.md b/docs/api/extract-pg-schema.materializedviewcolumn.maxlength.md new file mode 100644 index 00000000..bb2e71eb --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.maxlength.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [maxLength](./extract-pg-schema.materializedviewcolumn.maxlength.md) + +## MaterializedViewColumn.maxLength property + +Signature: + +```typescript +maxLength: number | null; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.md b/docs/api/extract-pg-schema.materializedviewcolumn.md new file mode 100644 index 00000000..2cd6e210 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.md @@ -0,0 +1,34 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) + +## MaterializedViewColumn interface + +Signature: + +```typescript +export interface MaterializedViewColumn +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [comment](./extract-pg-schema.materializedviewcolumn.comment.md) | | string \| null | | +| [defaultValue](./extract-pg-schema.materializedviewcolumn.defaultvalue.md) | | any | | +| [expandedType](./extract-pg-schema.materializedviewcolumn.expandedtype.md) | | string | | +| [fakeInformationSchemaValue](./extract-pg-schema.materializedviewcolumn.fakeinformationschemavalue.md) | | InformationSchemaColumn | The Postgres information\_schema views do not contain info about materialized views. This value is the result of a query that matches the one for regular views. Use with caution, not all fields are guaranteed to be meaningful and/or accurate. | +| [generated](./extract-pg-schema.materializedviewcolumn.generated.md) | | 'ALWAYS' \| 'NEVER' \| 'BY DEFAULT' | | +| [indices?](./extract-pg-schema.materializedviewcolumn.indices.md) | | [Index](./extract-pg-schema.index.md)\[\] | (Optional) | +| [isArray](./extract-pg-schema.materializedviewcolumn.isarray.md) | | boolean | | +| [isIdentity](./extract-pg-schema.materializedviewcolumn.isidentity.md) | | boolean | | +| [isNullable?](./extract-pg-schema.materializedviewcolumn.isnullable.md) | | boolean | (Optional) | +| [isPrimaryKey?](./extract-pg-schema.materializedviewcolumn.isprimarykey.md) | | boolean | (Optional) | +| [isUpdatable](./extract-pg-schema.materializedviewcolumn.isupdatable.md) | | boolean | | +| [maxLength](./extract-pg-schema.materializedviewcolumn.maxlength.md) | | number \| null | | +| [name](./extract-pg-schema.materializedviewcolumn.name.md) | | string | | +| [ordinalPosition](./extract-pg-schema.materializedviewcolumn.ordinalposition.md) | | number | | +| [reference?](./extract-pg-schema.materializedviewcolumn.reference.md) | | [ColumnReference](./extract-pg-schema.columnreference.md) \| null | (Optional) If views are resolved, this will contain the reference from the source column in the table that this view references. Note that if the source is another view, that view in turn will be resolved if possible, leading us to a table in the end. | +| [source?](./extract-pg-schema.materializedviewcolumn.source.md) | | { schema: string; table: string; column: string; } | (Optional) This will contain a "link" to the source table or view and column, if it can be determined. | +| [type](./extract-pg-schema.materializedviewcolumn.type.md) | | [MaterializedViewColumnType](./extract-pg-schema.materializedviewcolumntype.md) | | + diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.name.md b/docs/api/extract-pg-schema.materializedviewcolumn.name.md new file mode 100644 index 00000000..80057899 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.name.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [name](./extract-pg-schema.materializedviewcolumn.name.md) + +## MaterializedViewColumn.name property + +Signature: + +```typescript +name: string; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.ordinalposition.md b/docs/api/extract-pg-schema.materializedviewcolumn.ordinalposition.md new file mode 100644 index 00000000..ce66e6de --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.ordinalposition.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [ordinalPosition](./extract-pg-schema.materializedviewcolumn.ordinalposition.md) + +## MaterializedViewColumn.ordinalPosition property + +Signature: + +```typescript +ordinalPosition: number; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.reference.md b/docs/api/extract-pg-schema.materializedviewcolumn.reference.md new file mode 100644 index 00000000..9babac26 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.reference.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [reference](./extract-pg-schema.materializedviewcolumn.reference.md) + +## MaterializedViewColumn.reference property + +If views are resolved, this will contain the reference from the source column in the table that this view references. Note that if the source is another view, that view in turn will be resolved if possible, leading us to a table in the end. + +Signature: + +```typescript +reference?: ColumnReference | null; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.source.md b/docs/api/extract-pg-schema.materializedviewcolumn.source.md new file mode 100644 index 00000000..a90fae24 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.source.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [source](./extract-pg-schema.materializedviewcolumn.source.md) + +## MaterializedViewColumn.source property + +This will contain a "link" to the source table or view and column, if it can be determined. + +Signature: + +```typescript +source?: { + schema: string; + table: string; + column: string; + }; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumn.type.md b/docs/api/extract-pg-schema.materializedviewcolumn.type.md new file mode 100644 index 00000000..61b04438 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumn.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) > [type](./extract-pg-schema.materializedviewcolumn.type.md) + +## MaterializedViewColumn.type property + +Signature: + +```typescript +type: MaterializedViewColumnType; +``` diff --git a/docs/api/extract-pg-schema.materializedviewcolumntype.md b/docs/api/extract-pg-schema.materializedviewcolumntype.md new file mode 100644 index 00000000..741da798 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewcolumntype.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewColumnType](./extract-pg-schema.materializedviewcolumntype.md) + +## MaterializedViewColumnType type + +Signature: + +```typescript +export declare type MaterializedViewColumnType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; +``` diff --git a/docs/api/extract-pg-schema.materializedviewdetails.columns.md b/docs/api/extract-pg-schema.materializedviewdetails.columns.md new file mode 100644 index 00000000..609c2f6f --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewdetails.columns.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewDetails](./extract-pg-schema.materializedviewdetails.md) > [columns](./extract-pg-schema.materializedviewdetails.columns.md) + +## MaterializedViewDetails.columns property + +Signature: + +```typescript +columns: MaterializedViewColumn[]; +``` diff --git a/docs/api/extract-pg-schema.materializedviewdetails.definition.md b/docs/api/extract-pg-schema.materializedviewdetails.definition.md new file mode 100644 index 00000000..1de55e90 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewdetails.definition.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewDetails](./extract-pg-schema.materializedviewdetails.md) > [definition](./extract-pg-schema.materializedviewdetails.definition.md) + +## MaterializedViewDetails.definition property + +Signature: + +```typescript +definition: string; +``` diff --git a/docs/api/extract-pg-schema.materializedviewdetails.fakeinformationschemavalue.md b/docs/api/extract-pg-schema.materializedviewdetails.fakeinformationschemavalue.md new file mode 100644 index 00000000..5f5c9402 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewdetails.fakeinformationschemavalue.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewDetails](./extract-pg-schema.materializedviewdetails.md) > [fakeInformationSchemaValue](./extract-pg-schema.materializedviewdetails.fakeinformationschemavalue.md) + +## MaterializedViewDetails.fakeInformationSchemaValue property + +The Postgres information\_schema views do not contain info about materialized views. This value is the result of a query that matches the one for regular views. Use with caution, not all fields are guaranteed to be meaningful and/or accurate. + +Signature: + +```typescript +fakeInformationSchemaValue: InformationSchemaView; +``` diff --git a/docs/api/extract-pg-schema.materializedviewdetails.md b/docs/api/extract-pg-schema.materializedviewdetails.md new file mode 100644 index 00000000..174c82c1 --- /dev/null +++ b/docs/api/extract-pg-schema.materializedviewdetails.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [MaterializedViewDetails](./extract-pg-schema.materializedviewdetails.md) + +## MaterializedViewDetails interface + +Signature: + +```typescript +export interface MaterializedViewDetails extends PgType<'materializedView'> +``` +Extends: PgType + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [columns](./extract-pg-schema.materializedviewdetails.columns.md) | | [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md)\[\] | | +| [definition](./extract-pg-schema.materializedviewdetails.definition.md) | | string | | +| [fakeInformationSchemaValue](./extract-pg-schema.materializedviewdetails.fakeinformationschemavalue.md) | | InformationSchemaView | The Postgres information\_schema views do not contain info about materialized views. This value is the result of a query that matches the one for regular views. Use with caution, not all fields are guaranteed to be meaningful and/or accurate. | + diff --git a/docs/api/extract-pg-schema.md b/docs/api/extract-pg-schema.md new file mode 100644 index 00000000..e6bb4b6a --- /dev/null +++ b/docs/api/extract-pg-schema.md @@ -0,0 +1,56 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) + +## extract-pg-schema package + +## Functions + +| Function | Description | +| --- | --- | +| [extractSchemas(connectionConfig, options)](./extract-pg-schema.extractschemas.md) | Perform the extraction | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [CompositeTypeAttribute](./extract-pg-schema.compositetypeattribute.md) | | +| [CompositeTypeDetails](./extract-pg-schema.compositetypedetails.md) | | +| [DomainDetails](./extract-pg-schema.domaindetails.md) | | +| [EnumDetails](./extract-pg-schema.enumdetails.md) | | +| [ExtractSchemaOptions](./extract-pg-schema.extractschemaoptions.md) | This is the options object that can be passed to extractSchemas. | +| [InformationSchemaColumn](./extract-pg-schema.informationschemacolumn.md) | The view columns contains information about all table columns (or view columns) in the database. System columns (ctid, etc.) are not included. Only those columns are shown that the current user has access to (by way of being the owner or having some privilege). | +| [InformationSchemaDomain](./extract-pg-schema.informationschemadomain.md) | The view domains contains all domains defined in the current database. Only those domains are shown that the current user has access to (by way of being the owner or having some privilege). | +| [InformationSchemaTable](./extract-pg-schema.informationschematable.md) | The view tables contains all tables and views defined in the current database. Only those tables and views are shown that the current user has access to (by way of being the owner or having some privilege). | +| [InformationSchemaView](./extract-pg-schema.informationschemaview.md) | The view tables contains all tables and views defined in the current database. Only those tables and views are shown that the current user has access to (by way of being the owner or having some privilege). | +| [MaterializedViewColumn](./extract-pg-schema.materializedviewcolumn.md) | | +| [MaterializedViewDetails](./extract-pg-schema.materializedviewdetails.md) | | +| [RangeDetails](./extract-pg-schema.rangedetails.md) | | +| [TableColumn](./extract-pg-schema.tablecolumn.md) | | +| [TableDetails](./extract-pg-schema.tabledetails.md) | | +| [ViewColumn](./extract-pg-schema.viewcolumn.md) | | +| [ViewDetails](./extract-pg-schema.viewdetails.md) | | + +## Variables + +| Variable | Description | +| --- | --- | +| [extractSchema](./extract-pg-schema.extractschema.md) | | +| [updateActionMap](./extract-pg-schema.updateactionmap.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [AttributeType](./extract-pg-schema.attributetype.md) | | +| [ColumnReference](./extract-pg-schema.columnreference.md) | | +| [Index](./extract-pg-schema.index.md) | | +| [Kind](./extract-pg-schema.kind.md) | | +| [MaterializedViewColumnType](./extract-pg-schema.materializedviewcolumntype.md) | | +| [PgType](./extract-pg-schema.pgtype.md) | | +| [Schema](./extract-pg-schema.schema.md) | extractSchemas generates a record of all the schemas extracted, indexed by schema name. The schemas are instances of this type. | +| [TableColumnType](./extract-pg-schema.tablecolumntype.md) | | +| [UpdateAction](./extract-pg-schema.updateaction.md) | | +| [ViewColumnType](./extract-pg-schema.viewcolumntype.md) | | +| [YesNo](./extract-pg-schema.yesno.md) | | + diff --git a/docs/api/extract-pg-schema.pgtype.md b/docs/api/extract-pg-schema.pgtype.md new file mode 100644 index 00000000..59e80ae0 --- /dev/null +++ b/docs/api/extract-pg-schema.pgtype.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [PgType](./extract-pg-schema.pgtype.md) + +## PgType type + +Signature: + +```typescript +declare type PgType = { + name: string; + schemaName: string; + kind: K; + comment: string | null; +}; +``` +References: [Kind](./extract-pg-schema.kind.md) + diff --git a/docs/api/extract-pg-schema.rangedetails.innertype.md b/docs/api/extract-pg-schema.rangedetails.innertype.md new file mode 100644 index 00000000..5c196b46 --- /dev/null +++ b/docs/api/extract-pg-schema.rangedetails.innertype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [RangeDetails](./extract-pg-schema.rangedetails.md) > [innerType](./extract-pg-schema.rangedetails.innertype.md) + +## RangeDetails.innerType property + +Signature: + +```typescript +innerType: string; +``` diff --git a/docs/api/extract-pg-schema.rangedetails.md b/docs/api/extract-pg-schema.rangedetails.md new file mode 100644 index 00000000..5191d812 --- /dev/null +++ b/docs/api/extract-pg-schema.rangedetails.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [RangeDetails](./extract-pg-schema.rangedetails.md) + +## RangeDetails interface + +Signature: + +```typescript +export interface RangeDetails extends PgType<'range'> +``` +Extends: PgType + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [innerType](./extract-pg-schema.rangedetails.innertype.md) | | string | | + diff --git a/docs/api/extract-pg-schema.schema.md b/docs/api/extract-pg-schema.schema.md new file mode 100644 index 00000000..8f2edd3a --- /dev/null +++ b/docs/api/extract-pg-schema.schema.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [Schema](./extract-pg-schema.schema.md) + +## Schema type + +extractSchemas generates a record of all the schemas extracted, indexed by schema name. The schemas are instances of this type. + +Signature: + +```typescript +export declare type Schema = { + name: string; + domains: DomainDetails[]; + enums: EnumDetails[]; + ranges: RangeDetails[]; + tables: TableDetails[]; + views: ViewDetails[]; + materializedViews: MaterializedViewDetails[]; + compositeTypes: CompositeTypeDetails[]; +}; +``` +References: [DomainDetails](./extract-pg-schema.domaindetails.md), [EnumDetails](./extract-pg-schema.enumdetails.md), [RangeDetails](./extract-pg-schema.rangedetails.md), [TableDetails](./extract-pg-schema.tabledetails.md), [ViewDetails](./extract-pg-schema.viewdetails.md), [MaterializedViewDetails](./extract-pg-schema.materializedviewdetails.md), [CompositeTypeDetails](./extract-pg-schema.compositetypedetails.md) + diff --git a/docs/api/extract-pg-schema.tablecolumn.comment.md b/docs/api/extract-pg-schema.tablecolumn.comment.md new file mode 100644 index 00000000..1b774ea2 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.comment.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [comment](./extract-pg-schema.tablecolumn.comment.md) + +## TableColumn.comment property + +Signature: + +```typescript +comment: string | null; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.defaultvalue.md b/docs/api/extract-pg-schema.tablecolumn.defaultvalue.md new file mode 100644 index 00000000..033077c4 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.defaultvalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [defaultValue](./extract-pg-schema.tablecolumn.defaultvalue.md) + +## TableColumn.defaultValue property + +Signature: + +```typescript +defaultValue: any; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.dimensions.md b/docs/api/extract-pg-schema.tablecolumn.dimensions.md new file mode 100644 index 00000000..c2b2f682 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.dimensions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [dimensions](./extract-pg-schema.tablecolumn.dimensions.md) + +## TableColumn.dimensions property + +Signature: + +```typescript +dimensions: number; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.expandedtype.md b/docs/api/extract-pg-schema.tablecolumn.expandedtype.md new file mode 100644 index 00000000..268d0891 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.expandedtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [expandedType](./extract-pg-schema.tablecolumn.expandedtype.md) + +## TableColumn.expandedType property + +Signature: + +```typescript +expandedType: string; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.generated.md b/docs/api/extract-pg-schema.tablecolumn.generated.md new file mode 100644 index 00000000..619d5bc0 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.generated.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [generated](./extract-pg-schema.tablecolumn.generated.md) + +## TableColumn.generated property + +Signature: + +```typescript +generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.indices.md b/docs/api/extract-pg-schema.tablecolumn.indices.md new file mode 100644 index 00000000..f6920784 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.indices.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [indices](./extract-pg-schema.tablecolumn.indices.md) + +## TableColumn.indices property + +Signature: + +```typescript +indices: Index[]; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.informationschemavalue.md b/docs/api/extract-pg-schema.tablecolumn.informationschemavalue.md new file mode 100644 index 00000000..0e842f1a --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.informationschemavalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [informationSchemaValue](./extract-pg-schema.tablecolumn.informationschemavalue.md) + +## TableColumn.informationSchemaValue property + +Signature: + +```typescript +informationSchemaValue: InformationSchemaColumn; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.isarray.md b/docs/api/extract-pg-schema.tablecolumn.isarray.md new file mode 100644 index 00000000..fa8b2f49 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.isarray.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [isArray](./extract-pg-schema.tablecolumn.isarray.md) + +## TableColumn.isArray property + +Signature: + +```typescript +isArray: boolean; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.isidentity.md b/docs/api/extract-pg-schema.tablecolumn.isidentity.md new file mode 100644 index 00000000..01c421d1 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.isidentity.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [isIdentity](./extract-pg-schema.tablecolumn.isidentity.md) + +## TableColumn.isIdentity property + +Signature: + +```typescript +isIdentity: boolean; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.isnullable.md b/docs/api/extract-pg-schema.tablecolumn.isnullable.md new file mode 100644 index 00000000..cf6afb96 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.isnullable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [isNullable](./extract-pg-schema.tablecolumn.isnullable.md) + +## TableColumn.isNullable property + +Signature: + +```typescript +isNullable: boolean; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.isprimarykey.md b/docs/api/extract-pg-schema.tablecolumn.isprimarykey.md new file mode 100644 index 00000000..49bae7fb --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.isprimarykey.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [isPrimaryKey](./extract-pg-schema.tablecolumn.isprimarykey.md) + +## TableColumn.isPrimaryKey property + +Signature: + +```typescript +isPrimaryKey: boolean; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.isupdatable.md b/docs/api/extract-pg-schema.tablecolumn.isupdatable.md new file mode 100644 index 00000000..d6ebecd6 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.isupdatable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [isUpdatable](./extract-pg-schema.tablecolumn.isupdatable.md) + +## TableColumn.isUpdatable property + +Signature: + +```typescript +isUpdatable: boolean; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.maxlength.md b/docs/api/extract-pg-schema.tablecolumn.maxlength.md new file mode 100644 index 00000000..c71101fe --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.maxlength.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [maxLength](./extract-pg-schema.tablecolumn.maxlength.md) + +## TableColumn.maxLength property + +Signature: + +```typescript +maxLength: number | null; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.md b/docs/api/extract-pg-schema.tablecolumn.md new file mode 100644 index 00000000..9539312c --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.md @@ -0,0 +1,34 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) + +## TableColumn interface + +Signature: + +```typescript +export interface TableColumn +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [comment](./extract-pg-schema.tablecolumn.comment.md) | | string \| null | | +| [defaultValue](./extract-pg-schema.tablecolumn.defaultvalue.md) | | any | | +| [dimensions](./extract-pg-schema.tablecolumn.dimensions.md) | | number | | +| [expandedType](./extract-pg-schema.tablecolumn.expandedtype.md) | | string | | +| [generated](./extract-pg-schema.tablecolumn.generated.md) | | 'ALWAYS' \| 'NEVER' \| 'BY DEFAULT' | | +| [indices](./extract-pg-schema.tablecolumn.indices.md) | | [Index](./extract-pg-schema.index.md)\[\] | | +| [informationSchemaValue](./extract-pg-schema.tablecolumn.informationschemavalue.md) | | InformationSchemaColumn | | +| [isArray](./extract-pg-schema.tablecolumn.isarray.md) | | boolean | | +| [isIdentity](./extract-pg-schema.tablecolumn.isidentity.md) | | boolean | | +| [isNullable](./extract-pg-schema.tablecolumn.isnullable.md) | | boolean | | +| [isPrimaryKey](./extract-pg-schema.tablecolumn.isprimarykey.md) | | boolean | | +| [isUpdatable](./extract-pg-schema.tablecolumn.isupdatable.md) | | boolean | | +| [maxLength](./extract-pg-schema.tablecolumn.maxlength.md) | | number \| null | | +| [name](./extract-pg-schema.tablecolumn.name.md) | | string | | +| [ordinalPosition](./extract-pg-schema.tablecolumn.ordinalposition.md) | | number | | +| [reference](./extract-pg-schema.tablecolumn.reference.md) | | [ColumnReference](./extract-pg-schema.columnreference.md) \| null | | +| [type](./extract-pg-schema.tablecolumn.type.md) | | [TableColumnType](./extract-pg-schema.tablecolumntype.md) | | + diff --git a/docs/api/extract-pg-schema.tablecolumn.name.md b/docs/api/extract-pg-schema.tablecolumn.name.md new file mode 100644 index 00000000..b4fec598 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.name.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [name](./extract-pg-schema.tablecolumn.name.md) + +## TableColumn.name property + +Signature: + +```typescript +name: string; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.ordinalposition.md b/docs/api/extract-pg-schema.tablecolumn.ordinalposition.md new file mode 100644 index 00000000..d78dd335 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.ordinalposition.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [ordinalPosition](./extract-pg-schema.tablecolumn.ordinalposition.md) + +## TableColumn.ordinalPosition property + +Signature: + +```typescript +ordinalPosition: number; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.reference.md b/docs/api/extract-pg-schema.tablecolumn.reference.md new file mode 100644 index 00000000..9a50f3b5 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.reference.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [reference](./extract-pg-schema.tablecolumn.reference.md) + +## TableColumn.reference property + +Signature: + +```typescript +reference: ColumnReference | null; +``` diff --git a/docs/api/extract-pg-schema.tablecolumn.type.md b/docs/api/extract-pg-schema.tablecolumn.type.md new file mode 100644 index 00000000..61205373 --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumn.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumn](./extract-pg-schema.tablecolumn.md) > [type](./extract-pg-schema.tablecolumn.type.md) + +## TableColumn.type property + +Signature: + +```typescript +type: TableColumnType; +``` diff --git a/docs/api/extract-pg-schema.tablecolumntype.md b/docs/api/extract-pg-schema.tablecolumntype.md new file mode 100644 index 00000000..d1be100b --- /dev/null +++ b/docs/api/extract-pg-schema.tablecolumntype.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableColumnType](./extract-pg-schema.tablecolumntype.md) + +## TableColumnType type + +Signature: + +```typescript +export declare type TableColumnType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; +``` diff --git a/docs/api/extract-pg-schema.tabledetails.columns.md b/docs/api/extract-pg-schema.tabledetails.columns.md new file mode 100644 index 00000000..ac3593ad --- /dev/null +++ b/docs/api/extract-pg-schema.tabledetails.columns.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableDetails](./extract-pg-schema.tabledetails.md) > [columns](./extract-pg-schema.tabledetails.columns.md) + +## TableDetails.columns property + +Signature: + +```typescript +columns: TableColumn[]; +``` diff --git a/docs/api/extract-pg-schema.tabledetails.informationschemavalue.md b/docs/api/extract-pg-schema.tabledetails.informationschemavalue.md new file mode 100644 index 00000000..fd2dd667 --- /dev/null +++ b/docs/api/extract-pg-schema.tabledetails.informationschemavalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableDetails](./extract-pg-schema.tabledetails.md) > [informationSchemaValue](./extract-pg-schema.tabledetails.informationschemavalue.md) + +## TableDetails.informationSchemaValue property + +Signature: + +```typescript +informationSchemaValue: InformationSchemaTable; +``` diff --git a/docs/api/extract-pg-schema.tabledetails.md b/docs/api/extract-pg-schema.tabledetails.md new file mode 100644 index 00000000..9dd4d6e2 --- /dev/null +++ b/docs/api/extract-pg-schema.tabledetails.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [TableDetails](./extract-pg-schema.tabledetails.md) + +## TableDetails interface + +Signature: + +```typescript +export interface TableDetails extends PgType<'table'> +``` +Extends: PgType + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [columns](./extract-pg-schema.tabledetails.columns.md) | | [TableColumn](./extract-pg-schema.tablecolumn.md)\[\] | | +| [informationSchemaValue](./extract-pg-schema.tabledetails.informationschemavalue.md) | | InformationSchemaTable | | + diff --git a/docs/api/extract-pg-schema.updateaction.md b/docs/api/extract-pg-schema.updateaction.md new file mode 100644 index 00000000..a6fb68c5 --- /dev/null +++ b/docs/api/extract-pg-schema.updateaction.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [UpdateAction](./extract-pg-schema.updateaction.md) + +## UpdateAction type + +Signature: + +```typescript +export declare type UpdateAction = typeof updateActionMap[keyof typeof updateActionMap]; +``` +References: [updateActionMap](./extract-pg-schema.updateactionmap.md) + diff --git a/docs/api/extract-pg-schema.updateactionmap.md b/docs/api/extract-pg-schema.updateactionmap.md new file mode 100644 index 00000000..9217aa97 --- /dev/null +++ b/docs/api/extract-pg-schema.updateactionmap.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [updateActionMap](./extract-pg-schema.updateactionmap.md) + +## updateActionMap variable + +Signature: + +```typescript +updateActionMap: { + readonly a: "NO ACTION"; + readonly r: "RESTRICT"; + readonly c: "CASCADE"; + readonly n: "SET NULL"; + readonly d: "SET DEFAULT"; +} +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.comment.md b/docs/api/extract-pg-schema.viewcolumn.comment.md new file mode 100644 index 00000000..72b5d0d7 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.comment.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [comment](./extract-pg-schema.viewcolumn.comment.md) + +## ViewColumn.comment property + +Signature: + +```typescript +comment: string | null; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.defaultvalue.md b/docs/api/extract-pg-schema.viewcolumn.defaultvalue.md new file mode 100644 index 00000000..e25ff7c4 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.defaultvalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [defaultValue](./extract-pg-schema.viewcolumn.defaultvalue.md) + +## ViewColumn.defaultValue property + +Signature: + +```typescript +defaultValue: any; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.expandedtype.md b/docs/api/extract-pg-schema.viewcolumn.expandedtype.md new file mode 100644 index 00000000..79b47967 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.expandedtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [expandedType](./extract-pg-schema.viewcolumn.expandedtype.md) + +## ViewColumn.expandedType property + +Signature: + +```typescript +expandedType: string; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.generated.md b/docs/api/extract-pg-schema.viewcolumn.generated.md new file mode 100644 index 00000000..36880aa1 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.generated.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [generated](./extract-pg-schema.viewcolumn.generated.md) + +## ViewColumn.generated property + +Signature: + +```typescript +generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.indices.md b/docs/api/extract-pg-schema.viewcolumn.indices.md new file mode 100644 index 00000000..f33c2523 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.indices.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [indices](./extract-pg-schema.viewcolumn.indices.md) + +## ViewColumn.indices property + +Signature: + +```typescript +indices?: Index[]; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.informationschemavalue.md b/docs/api/extract-pg-schema.viewcolumn.informationschemavalue.md new file mode 100644 index 00000000..96232412 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.informationschemavalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [informationSchemaValue](./extract-pg-schema.viewcolumn.informationschemavalue.md) + +## ViewColumn.informationSchemaValue property + +Signature: + +```typescript +informationSchemaValue: InformationSchemaColumn; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.isarray.md b/docs/api/extract-pg-schema.viewcolumn.isarray.md new file mode 100644 index 00000000..a653c056 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.isarray.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [isArray](./extract-pg-schema.viewcolumn.isarray.md) + +## ViewColumn.isArray property + +Signature: + +```typescript +isArray: boolean; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.isidentity.md b/docs/api/extract-pg-schema.viewcolumn.isidentity.md new file mode 100644 index 00000000..c3b28510 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.isidentity.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [isIdentity](./extract-pg-schema.viewcolumn.isidentity.md) + +## ViewColumn.isIdentity property + +Signature: + +```typescript +isIdentity: boolean; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.isnullable.md b/docs/api/extract-pg-schema.viewcolumn.isnullable.md new file mode 100644 index 00000000..d49ee028 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.isnullable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [isNullable](./extract-pg-schema.viewcolumn.isnullable.md) + +## ViewColumn.isNullable property + +Signature: + +```typescript +isNullable?: boolean; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.isprimarykey.md b/docs/api/extract-pg-schema.viewcolumn.isprimarykey.md new file mode 100644 index 00000000..0f706552 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.isprimarykey.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [isPrimaryKey](./extract-pg-schema.viewcolumn.isprimarykey.md) + +## ViewColumn.isPrimaryKey property + +Signature: + +```typescript +isPrimaryKey?: boolean; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.isupdatable.md b/docs/api/extract-pg-schema.viewcolumn.isupdatable.md new file mode 100644 index 00000000..b82b9a00 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.isupdatable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [isUpdatable](./extract-pg-schema.viewcolumn.isupdatable.md) + +## ViewColumn.isUpdatable property + +Signature: + +```typescript +isUpdatable: boolean; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.maxlength.md b/docs/api/extract-pg-schema.viewcolumn.maxlength.md new file mode 100644 index 00000000..3888ef5f --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.maxlength.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [maxLength](./extract-pg-schema.viewcolumn.maxlength.md) + +## ViewColumn.maxLength property + +Signature: + +```typescript +maxLength: number | null; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.md b/docs/api/extract-pg-schema.viewcolumn.md new file mode 100644 index 00000000..4a721122 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.md @@ -0,0 +1,34 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) + +## ViewColumn interface + +Signature: + +```typescript +export interface ViewColumn +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [comment](./extract-pg-schema.viewcolumn.comment.md) | | string \| null | | +| [defaultValue](./extract-pg-schema.viewcolumn.defaultvalue.md) | | any | | +| [expandedType](./extract-pg-schema.viewcolumn.expandedtype.md) | | string | | +| [generated](./extract-pg-schema.viewcolumn.generated.md) | | 'ALWAYS' \| 'NEVER' \| 'BY DEFAULT' | | +| [indices?](./extract-pg-schema.viewcolumn.indices.md) | | [Index](./extract-pg-schema.index.md)\[\] | (Optional) | +| [informationSchemaValue](./extract-pg-schema.viewcolumn.informationschemavalue.md) | | InformationSchemaColumn | | +| [isArray](./extract-pg-schema.viewcolumn.isarray.md) | | boolean | | +| [isIdentity](./extract-pg-schema.viewcolumn.isidentity.md) | | boolean | | +| [isNullable?](./extract-pg-schema.viewcolumn.isnullable.md) | | boolean | (Optional) | +| [isPrimaryKey?](./extract-pg-schema.viewcolumn.isprimarykey.md) | | boolean | (Optional) | +| [isUpdatable](./extract-pg-schema.viewcolumn.isupdatable.md) | | boolean | | +| [maxLength](./extract-pg-schema.viewcolumn.maxlength.md) | | number \| null | | +| [name](./extract-pg-schema.viewcolumn.name.md) | | string | | +| [ordinalPosition](./extract-pg-schema.viewcolumn.ordinalposition.md) | | number | | +| [reference?](./extract-pg-schema.viewcolumn.reference.md) | | [ColumnReference](./extract-pg-schema.columnreference.md) \| null | (Optional) If views are resolved, this will contain the reference from the source column in the table that this view references. Note that if the source is another view, that view in turn will be resolved if possible, leading us to a table in the end. | +| [source](./extract-pg-schema.viewcolumn.source.md) | | { schema: string; table: string; column: string; } \| null | This will contain a "link" to the source table or view and column, if it can be determined. | +| [type](./extract-pg-schema.viewcolumn.type.md) | | [ViewColumnType](./extract-pg-schema.viewcolumntype.md) | | + diff --git a/docs/api/extract-pg-schema.viewcolumn.name.md b/docs/api/extract-pg-schema.viewcolumn.name.md new file mode 100644 index 00000000..74995d9c --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.name.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [name](./extract-pg-schema.viewcolumn.name.md) + +## ViewColumn.name property + +Signature: + +```typescript +name: string; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.ordinalposition.md b/docs/api/extract-pg-schema.viewcolumn.ordinalposition.md new file mode 100644 index 00000000..ea8b3497 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.ordinalposition.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [ordinalPosition](./extract-pg-schema.viewcolumn.ordinalposition.md) + +## ViewColumn.ordinalPosition property + +Signature: + +```typescript +ordinalPosition: number; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.reference.md b/docs/api/extract-pg-schema.viewcolumn.reference.md new file mode 100644 index 00000000..2ea2633a --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.reference.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [reference](./extract-pg-schema.viewcolumn.reference.md) + +## ViewColumn.reference property + +If views are resolved, this will contain the reference from the source column in the table that this view references. Note that if the source is another view, that view in turn will be resolved if possible, leading us to a table in the end. + +Signature: + +```typescript +reference?: ColumnReference | null; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.source.md b/docs/api/extract-pg-schema.viewcolumn.source.md new file mode 100644 index 00000000..ee424c09 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.source.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [source](./extract-pg-schema.viewcolumn.source.md) + +## ViewColumn.source property + +This will contain a "link" to the source table or view and column, if it can be determined. + +Signature: + +```typescript +source: { + schema: string; + table: string; + column: string; + } | null; +``` diff --git a/docs/api/extract-pg-schema.viewcolumn.type.md b/docs/api/extract-pg-schema.viewcolumn.type.md new file mode 100644 index 00000000..e5cd8550 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumn.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumn](./extract-pg-schema.viewcolumn.md) > [type](./extract-pg-schema.viewcolumn.type.md) + +## ViewColumn.type property + +Signature: + +```typescript +type: ViewColumnType; +``` diff --git a/docs/api/extract-pg-schema.viewcolumntype.md b/docs/api/extract-pg-schema.viewcolumntype.md new file mode 100644 index 00000000..b647c534 --- /dev/null +++ b/docs/api/extract-pg-schema.viewcolumntype.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewColumnType](./extract-pg-schema.viewcolumntype.md) + +## ViewColumnType type + +Signature: + +```typescript +export declare type ViewColumnType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; +``` diff --git a/docs/api/extract-pg-schema.viewdetails.columns.md b/docs/api/extract-pg-schema.viewdetails.columns.md new file mode 100644 index 00000000..e9a9477c --- /dev/null +++ b/docs/api/extract-pg-schema.viewdetails.columns.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewDetails](./extract-pg-schema.viewdetails.md) > [columns](./extract-pg-schema.viewdetails.columns.md) + +## ViewDetails.columns property + +Signature: + +```typescript +columns: ViewColumn[]; +``` diff --git a/docs/api/extract-pg-schema.viewdetails.definition.md b/docs/api/extract-pg-schema.viewdetails.definition.md new file mode 100644 index 00000000..63d3615f --- /dev/null +++ b/docs/api/extract-pg-schema.viewdetails.definition.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewDetails](./extract-pg-schema.viewdetails.md) > [definition](./extract-pg-schema.viewdetails.definition.md) + +## ViewDetails.definition property + +Signature: + +```typescript +definition: string; +``` diff --git a/docs/api/extract-pg-schema.viewdetails.informationschemavalue.md b/docs/api/extract-pg-schema.viewdetails.informationschemavalue.md new file mode 100644 index 00000000..3fe668bb --- /dev/null +++ b/docs/api/extract-pg-schema.viewdetails.informationschemavalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewDetails](./extract-pg-schema.viewdetails.md) > [informationSchemaValue](./extract-pg-schema.viewdetails.informationschemavalue.md) + +## ViewDetails.informationSchemaValue property + +Signature: + +```typescript +informationSchemaValue: InformationSchemaView; +``` diff --git a/docs/api/extract-pg-schema.viewdetails.md b/docs/api/extract-pg-schema.viewdetails.md new file mode 100644 index 00000000..ce64f4cf --- /dev/null +++ b/docs/api/extract-pg-schema.viewdetails.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [ViewDetails](./extract-pg-schema.viewdetails.md) + +## ViewDetails interface + +Signature: + +```typescript +export interface ViewDetails extends PgType<'view'> +``` +Extends: PgType + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [columns](./extract-pg-schema.viewdetails.columns.md) | | [ViewColumn](./extract-pg-schema.viewcolumn.md)\[\] | | +| [definition](./extract-pg-schema.viewdetails.definition.md) | | string | | +| [informationSchemaValue](./extract-pg-schema.viewdetails.informationschemavalue.md) | | InformationSchemaView | | + diff --git a/docs/api/extract-pg-schema.yesno.md b/docs/api/extract-pg-schema.yesno.md new file mode 100644 index 00000000..b8237b37 --- /dev/null +++ b/docs/api/extract-pg-schema.yesno.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [extract-pg-schema](./extract-pg-schema.md) > [YesNo](./extract-pg-schema.yesno.md) + +## YesNo type + +Signature: + +```typescript +declare type YesNo = 'YES' | 'NO'; +``` diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 00000000..e83874ba --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [extract-pg-schema](./extract-pg-schema.md) | | + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..ab14bd91 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,35 @@ +# Extract Schema from Postgres Database + +Reads various metadata from your postgres database and returns a js object. +This package is used by [Kanel](https://github.com/kristiandupont/kanel) to generate Typescript types and [Schemalint](https://github.com/kristiandupont/schemalint) to provide linting of database schemas. + +## Installation + +```bash +npm i extract-pg-schema +``` + +## Usage + +You give it a [postgres connection config object](https://node-postgres.com/api/client) and some options and it will connect to your database and generate + +```javascript +const { extractSchemas } = require('extract-pg-schema'); + +async function run() { + const connection = { + host: 'localhost', + database: 'postgres', + user: 'postgres', + password: 'postgres', + }; + + const result = await extractSchemas(connection); + + console.log(result); +} + +run(); +``` + +The generated output is a record of schemas, described with the [Schema](/api/extract-pg-schema.schema.html) type. diff --git a/dvdrental.json b/dvdrental.json index 468e6302..a6aa527c 100644 --- a/dvdrental.json +++ b/dvdrental.json @@ -1,8159 +1,9363 @@ { - "tables": [ - { - "name": "actor", - "tags": {}, - "columns": [ - { - "name": "actor_id", - "indices": [ - { - "name": "actor_pkey", - "isPrimary": true - } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('actor_actor_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor", - "column_name": "actor_id", - "ordinal_position": 1, - "column_default": "nextval('actor_actor_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "first_name", - "indices": [], - "maxLength": 45, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor", - "column_name": "first_name", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } + "public": { + "name": "public", + "domains": [ + { + "name": "year", + "schemaName": "public", + "kind": "domain", + "comment": null, + "innerType": "pg_catalog.int4", + "informationSchemaValue": { + "domain_catalog": "dvdrental", + "domain_schema": "public", + "domain_name": "year", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "domain_default": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1" + } + } + ], + "enums": [ + { + "name": "mpaa_rating", + "schemaName": "public", + "kind": "enum", + "comment": null, + "values": ["G", "PG", "PG-13", "R", "NC-17"] + } + ], + "ranges": [], + "tables": [ + { + "name": "customer", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "last_name", - "indices": [ - { - "name": "idx_actor_last_name", - "isPrimary": false + "columns": [ + { + "name": "customer_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('customer_customer_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "customer_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "customer_id", + "ordinal_position": 1, + "column_default": "nextval('customer_customer_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": 45, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor", - "column_name": "last_name", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor", - "column_name": "last_update", - "ordinal_position": 4, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "address", - "tags": {}, - "columns": [ - { - "name": "address_id", - "indices": [ - { - "name": "address_pkey", - "isPrimary": true + }, + { + "name": "store_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_store_id", + "isPrimary": false + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "store_id", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('address_address_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "address_id", - "ordinal_position": 1, - "column_default": "nextval('address_address_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "address", - "indices": [], - "maxLength": 50, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "address", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "address2", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "address2", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "district", - "indices": [], - "maxLength": 20, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "district", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 20, - "character_octet_length": 80, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "city_id", - "parent": "city.city_id", - "reference": { - "schema": "public", - "table": "city", - "column": "city_id", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION" }, - "indices": [ - { - "name": "idx_fk_city_id", - "isPrimary": false + { + "name": "first_name", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "first_name", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "city_id", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "postal_code", - "indices": [], - "maxLength": 10, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "postal_code", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 10, - "character_octet_length": 40, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "phone", - "indices": [], - "maxLength": 20, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "phone", - "ordinal_position": 7, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 20, - "character_octet_length": 80, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "address", - "column_name": "last_update", - "ordinal_position": 8, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "category", - "tags": {}, - "columns": [ - { - "name": "category_id", - "indices": [ - { - "name": "category_pkey", - "isPrimary": true + }, + { + "name": "last_name", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_last_name", + "isPrimary": false + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "last_name", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('category_category_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "category", - "column_name": "category_id", - "ordinal_position": 1, - "column_default": "nextval('category_category_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "name", - "indices": [], - "maxLength": 25, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "category", - "column_name": "name", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 25, - "character_octet_length": 100, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "category", - "column_name": "last_update", - "ordinal_position": 3, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "city", - "tags": {}, - "columns": [ - { - "name": "city_id", - "indices": [ - { - "name": "city_pkey", - "isPrimary": true + }, + { + "name": "email", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 5, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "email", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('city_city_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "city", - "column_name": "city_id", - "ordinal_position": 1, - "column_default": "nextval('city_city_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "city", - "indices": [], - "maxLength": 50, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "city", - "column_name": "city", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "country_id", - "parent": "country.country_id", - "reference": { - "schema": "public", - "table": "country", - "column": "country_id", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION" }, - "indices": [ - { - "name": "idx_fk_country_id", - "isPrimary": false + { + "name": "address_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 6, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_address_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "address", + "columnName": "address_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "address_id", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "city", - "column_name": "country_id", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "city", - "column_name": "last_update", - "ordinal_position": 4, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "country", - "tags": {}, - "columns": [ - { - "name": "country_id", - "indices": [ - { - "name": "country_pkey", - "isPrimary": true + }, + { + "name": "activebool", + "expandedType": "pg_catalog.bool", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.bool", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "true", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 7, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "activebool", + "ordinal_position": 7, + "column_default": "true", + "is_nullable": "NO", + "data_type": "boolean", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "bool", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('country_country_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "country", - "column_name": "country_id", - "ordinal_position": 1, - "column_default": "nextval('country_country_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "country", - "indices": [], - "maxLength": 50, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "country", - "column_name": "country", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "country", - "column_name": "last_update", - "ordinal_position": 3, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "customer", - "tags": {}, - "columns": [ - { - "name": "customer_id", - "indices": [ - { - "name": "customer_pkey", - "isPrimary": true + }, + { + "name": "create_date", + "expandedType": "pg_catalog.date", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.date", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "('now'::text)::date", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 8, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "create_date", + "ordinal_position": 8, + "column_default": "('now'::text)::date", + "is_nullable": "NO", + "data_type": "date", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 0, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "date", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('customer_customer_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "customer_id", - "ordinal_position": 1, - "column_default": "nextval('customer_customer_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "store_id", - "indices": [ - { - "name": "idx_fk_store_id", - "isPrimary": false + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 9, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "last_update", + "ordinal_position": 9, + "column_default": "now()", + "is_nullable": "YES", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "9", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "store_id", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "first_name", - "indices": [], - "maxLength": 45, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "first_name", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "last_name", - "indices": [ - { - "name": "idx_last_name", - "isPrimary": false + }, + { + "name": "active", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 10, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer", + "column_name": "active", + "ordinal_position": 10, + "column_default": null, + "is_nullable": "YES", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "10", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": 45, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "last_name", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "email", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "email", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" } + ] + }, + { + "name": "actor", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "address_id", - "parent": "address.address_id", - "reference": { - "schema": "public", - "table": "address", - "column": "address_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" + "columns": [ + { + "name": "actor_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('actor_actor_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "actor_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor", + "column_name": "actor_id", + "ordinal_position": 1, + "column_default": "nextval('actor_actor_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } }, - "indices": [ - { - "name": "idx_fk_address_id", - "isPrimary": false + { + "name": "first_name", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor", + "column_name": "first_name", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "address_id", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "activebool", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "true", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "bool", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "activebool", - "ordinal_position": 7, - "column_default": "true", - "is_nullable": "NO", - "data_type": "boolean", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "bool", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "boolean" - } - }, - { - "name": "create_date", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "('now'::text)::date", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "date", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "create_date", - "ordinal_position": 8, - "column_default": "('now'::text)::date", - "is_nullable": "NO", - "data_type": "date", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 0, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "date", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "date" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "last_update", - "ordinal_position": 9, - "column_default": "now()", - "is_nullable": "YES", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "9", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - }, - { - "name": "active", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer", - "column_name": "active", - "ordinal_position": 10, - "column_default": null, - "is_nullable": "YES", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "10", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - } - ] - }, - { - "name": "film", - "tags": {}, - "columns": [ - { - "name": "film_id", - "indices": [ - { - "name": "film_pkey", - "isPrimary": true + }, + { + "name": "last_name", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_actor_last_name", + "isPrimary": false + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor", + "column_name": "last_name", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('film_film_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "film_id", - "ordinal_position": 1, - "column_default": "nextval('film_film_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "title", - "indices": [ - { - "name": "idx_title", - "isPrimary": false + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor", + "column_name": "last_update", + "ordinal_position": 4, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": 255, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "title", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 255, - "character_octet_length": 1020, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "description", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "description", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "text" } + ] + }, + { + "name": "category", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "category", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "release_year", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "release_year", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "YES", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": "dvdrental", - "domain_schema": "public", - "domain_name": "year", - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "language_id", - "parent": "language.language_id", - "reference": { - "schema": "public", - "table": "language", - "column": "language_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" + "columns": [ + { + "name": "category_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('category_category_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "category_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "category", + "column_name": "category_id", + "ordinal_position": 1, + "column_default": "nextval('category_category_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } }, - "indices": [ - { - "name": "idx_fk_language_id", - "isPrimary": false + { + "name": "name", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 25, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "category", + "column_name": "name", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 25, + "character_octet_length": 100, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "category", + "column_name": "last_update", + "ordinal_position": 3, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "language_id", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "rental_duration", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "3", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "rental_duration", - "ordinal_position": 6, - "column_default": "3", - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "rental_rate", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "4.99", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "numeric", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "rental_rate", - "ordinal_position": 7, - "column_default": "4.99", - "is_nullable": "NO", - "data_type": "numeric", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 4, - "numeric_precision_radix": 10, - "numeric_scale": 2, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "numeric", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "numeric" - } - }, - { - "name": "length", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "length", - "ordinal_position": 8, - "column_default": null, - "is_nullable": "YES", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "replacement_cost", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "19.99", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "numeric", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "replacement_cost", - "ordinal_position": 9, - "column_default": "19.99", - "is_nullable": "NO", - "data_type": "numeric", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 5, - "numeric_precision_radix": 10, - "numeric_scale": 2, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "numeric", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "9", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "numeric" - } - }, - { - "name": "rating", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": "'G'::mpaa_rating", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "mpaa_rating", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "rating", - "ordinal_position": 10, - "column_default": "'G'::mpaa_rating", - "is_nullable": "YES", - "data_type": "USER-DEFINED", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "public", - "udt_name": "mpaa_rating", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "10", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "mpaa_rating" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "last_update", - "ordinal_position": 11, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "11", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - }, - { - "name": "special_features", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "text[]", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "special_features", - "ordinal_position": 12, - "column_default": null, - "is_nullable": "YES", - "data_type": "ARRAY", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "_text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "12", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "text[]" } + ] + }, + { + "name": "film", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "fulltext", - "indices": [ - { - "name": "film_fulltext_idx", - "isPrimary": false + "columns": [ + { + "name": "film_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('film_film_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "film_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "film_id", + "ordinal_position": 1, + "column_default": "nextval('film_film_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "tsvector", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film", - "column_name": "fulltext", - "ordinal_position": 13, - "column_default": null, - "is_nullable": "NO", - "data_type": "tsvector", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "tsvector", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "13", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "tsvector" - } - } - ] - }, - { - "name": "film_actor", - "tags": {}, - "columns": [ - { - "name": "actor_id", - "parent": "actor.actor_id", - "reference": { - "schema": "public", - "table": "actor", - "column": "actor_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "film_actor_pkey", - "isPrimary": true + { + "name": "title", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 255, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_title", + "isPrimary": false + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "title", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 255, + "character_octet_length": 1020, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_actor", - "column_name": "actor_id", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "film_id", - "parent": "film.film_id", - "reference": { - "schema": "public", - "table": "film", - "column": "film_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "film_actor_pkey", - "isPrimary": true - }, - { - "name": "idx_fk_film_id", - "isPrimary": false + { + "name": "description", + "expandedType": "pg_catalog.text", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "description", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_actor", - "column_name": "film_id", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_actor", - "column_name": "last_update", - "ordinal_position": 3, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "film_category", - "tags": {}, - "columns": [ - { - "name": "film_id", - "parent": "film.film_id", - "reference": { - "schema": "public", - "table": "film", - "column": "film_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "film_category_pkey", - "isPrimary": true + { + "name": "release_year", + "expandedType": "public.year", + "dimensions": 0, + "type": { + "fullName": "public.year", + "kind": "domain" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "release_year", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "YES", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": "dvdrental", + "domain_schema": "public", + "domain_name": "year", + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_category", - "column_name": "film_id", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "category_id", - "parent": "category.category_id", - "reference": { - "schema": "public", - "table": "category", - "column": "category_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "film_category_pkey", - "isPrimary": true + { + "name": "language_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 5, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_language_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "language", + "columnName": "language_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "language_id", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_category", - "column_name": "category_id", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_category", - "column_name": "last_update", - "ordinal_position": 3, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "inventory", - "tags": {}, - "columns": [ - { - "name": "inventory_id", - "indices": [ - { - "name": "inventory_pkey", - "isPrimary": true + }, + { + "name": "rental_duration", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "3", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 6, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "rental_duration", + "ordinal_position": 6, + "column_default": "3", + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('inventory_inventory_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "inventory", - "column_name": "inventory_id", - "ordinal_position": 1, - "column_default": "nextval('inventory_inventory_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "film_id", - "parent": "film.film_id", - "reference": { - "schema": "public", - "table": "film", - "column": "film_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "idx_store_id_film_id", - "isPrimary": false + { + "name": "rental_rate", + "expandedType": "pg_catalog.numeric", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.numeric", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "4.99", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 7, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "rental_rate", + "ordinal_position": 7, + "column_default": "4.99", + "is_nullable": "NO", + "data_type": "numeric", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 4, + "numeric_precision_radix": 10, + "numeric_scale": 2, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "numeric", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "inventory", - "column_name": "film_id", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "store_id", - "indices": [ - { - "name": "idx_store_id_film_id", - "isPrimary": false + }, + { + "name": "length", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 8, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "length", + "ordinal_position": 8, + "column_default": null, + "is_nullable": "YES", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "inventory", - "column_name": "store_id", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "inventory", - "column_name": "last_update", - "ordinal_position": 4, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "language", - "tags": {}, - "columns": [ - { - "name": "language_id", - "indices": [ - { - "name": "language_pkey", - "isPrimary": true + }, + { + "name": "replacement_cost", + "expandedType": "pg_catalog.numeric", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.numeric", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "19.99", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 9, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "replacement_cost", + "ordinal_position": 9, + "column_default": "19.99", + "is_nullable": "NO", + "data_type": "numeric", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 5, + "numeric_precision_radix": 10, + "numeric_scale": 2, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "numeric", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "9", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('language_language_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "language", - "column_name": "language_id", - "ordinal_position": 1, - "column_default": "nextval('language_language_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "name", - "indices": [], - "maxLength": 20, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "bpchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "language", - "column_name": "name", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character", - "character_maximum_length": 20, - "character_octet_length": 80, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "bpchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "language", - "column_name": "last_update", - "ordinal_position": 3, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "payment", - "tags": {}, - "columns": [ - { - "name": "payment_id", - "indices": [ - { - "name": "payment_pkey", - "isPrimary": true + }, + { + "name": "rating", + "expandedType": "public.mpaa_rating", + "dimensions": 0, + "type": { + "fullName": "public.mpaa_rating", + "kind": "enum" + }, + "comment": null, + "maxLength": null, + "defaultValue": "'G'::mpaa_rating", + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 10, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "rating", + "ordinal_position": 10, + "column_default": "'G'::mpaa_rating", + "is_nullable": "YES", + "data_type": "USER-DEFINED", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "public", + "udt_name": "mpaa_rating", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "10", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('payment_payment_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "payment", - "column_name": "payment_id", - "ordinal_position": 1, - "column_default": "nextval('payment_payment_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "customer_id", - "parent": "customer.customer_id", - "reference": { - "schema": "public", - "table": "customer", - "column": "customer_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "idx_fk_customer_id", - "isPrimary": false + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 11, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "last_update", + "ordinal_position": 11, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "11", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "payment", - "column_name": "customer_id", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "staff_id", - "parent": "staff.staff_id", - "reference": { - "schema": "public", - "table": "staff", - "column": "staff_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "idx_fk_staff_id", - "isPrimary": false + { + "name": "special_features", + "expandedType": "pg_catalog.text[]", + "dimensions": 1, + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": true, + "isArray": true, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 12, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "special_features", + "ordinal_position": 12, + "column_default": null, + "is_nullable": "YES", + "data_type": "ARRAY", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "_text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "12", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "payment", - "column_name": "staff_id", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "rental_id", - "parent": "rental.rental_id", - "reference": { - "schema": "public", - "table": "rental", - "column": "rental_id", - "onDelete": "CASCADE", - "onUpdate": "SET NULL" }, - "indices": [ - { - "name": "idx_fk_rental_id", - "isPrimary": false + { + "name": "fulltext", + "expandedType": "pg_catalog.tsvector", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.tsvector", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 13, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "film_fulltext_idx", + "isPrimary": false + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film", + "column_name": "fulltext", + "ordinal_position": 13, + "column_default": null, + "is_nullable": "NO", + "data_type": "tsvector", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "tsvector", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "13", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "payment", - "column_name": "rental_id", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "amount", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "numeric", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "payment", - "column_name": "amount", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "NO", - "data_type": "numeric", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 5, - "numeric_precision_radix": 10, - "numeric_scale": 2, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "numeric", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "numeric" } + ] + }, + { + "name": "film_actor", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_actor", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "payment_date", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "payment", - "column_name": "payment_date", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "rental", - "tags": {}, - "columns": [ - { - "name": "rental_id", - "indices": [ - { - "name": "rental_pkey", - "isPrimary": true + "columns": [ + { + "name": "actor_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "film_actor_pkey", + "isPrimary": true + } + ], + "reference": { + "schemaName": "public", + "tableName": "actor", + "columnName": "actor_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_actor", + "column_name": "actor_id", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('rental_rental_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "rental", - "column_name": "rental_id", - "ordinal_position": 1, - "column_default": "nextval('rental_rental_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "rental_date", - "indices": [ - { - "name": "idx_unq_rental_rental_date_inventory_id_customer_id", - "isPrimary": false + }, + { + "name": "film_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "film_actor_pkey", + "isPrimary": true + }, + { + "name": "idx_fk_film_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "film", + "columnName": "film_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_actor", + "column_name": "film_id", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "rental", - "column_name": "rental_date", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - }, - { - "name": "inventory_id", - "parent": "inventory.inventory_id", - "reference": { - "schema": "public", - "table": "inventory", - "column": "inventory_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" }, - "indices": [ - { - "name": "idx_fk_inventory_id", - "isPrimary": false - }, - { - "name": "idx_unq_rental_rental_date_inventory_id_customer_id", - "isPrimary": false + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_actor", + "column_name": "last_update", + "ordinal_position": 3, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "rental", - "column_name": "inventory_id", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" } + ] + }, + { + "name": "film_category", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_category", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "customer_id", - "parent": "customer.customer_id", - "reference": { - "schema": "public", - "table": "customer", - "column": "customer_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" + "columns": [ + { + "name": "film_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "film_category_pkey", + "isPrimary": true + } + ], + "reference": { + "schemaName": "public", + "tableName": "film", + "columnName": "film_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_category", + "column_name": "film_id", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } }, - "indices": [ - { - "name": "idx_unq_rental_rental_date_inventory_id_customer_id", - "isPrimary": false + { + "name": "category_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "film_category_pkey", + "isPrimary": true + } + ], + "reference": { + "schemaName": "public", + "tableName": "category", + "columnName": "category_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_category", + "column_name": "category_id", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "rental", - "column_name": "customer_id", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "return_date", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "rental", - "column_name": "return_date", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "YES", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - }, - { - "name": "staff_id", - "parent": "staff.staff_id", - "reference": { - "schema": "public", - "table": "staff", - "column": "staff_id", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION" }, - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "rental", - "column_name": "staff_id", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "rental", - "column_name": "last_update", - "ordinal_position": 7, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - }, - { - "name": "staff", - "tags": {}, - "columns": [ - { - "name": "staff_id", - "indices": [ - { - "name": "staff_pkey", - "isPrimary": true + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_category", + "column_name": "last_update", + "ordinal_position": 3, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('staff_staff_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "staff_id", - "ordinal_position": 1, - "column_default": "nextval('staff_staff_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" - } - }, - { - "name": "first_name", - "indices": [], - "maxLength": 45, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "first_name", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" } + ] + }, + { + "name": "address", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "last_name", - "indices": [], - "maxLength": 45, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "last_name", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "address_id", - "parent": "address.address_id", - "reference": { - "schema": "public", - "table": "address", - "column": "address_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" + "columns": [ + { + "name": "address_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('address_address_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "address_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "address_id", + "ordinal_position": 1, + "column_default": "nextval('address_address_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } }, - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "address_id", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "email", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "email", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "store_id", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "store_id", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" - } - }, - { - "name": "active", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "true", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "bool", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "active", - "ordinal_position": 7, - "column_default": "true", - "is_nullable": "NO", - "data_type": "boolean", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "bool", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "boolean" - } - }, - { - "name": "username", - "indices": [], - "maxLength": 16, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "username", - "ordinal_position": 8, - "column_default": null, - "is_nullable": "NO", - "data_type": "character varying", - "character_maximum_length": 16, - "character_octet_length": 64, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "password", - "indices": [], - "maxLength": 40, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "password", - "ordinal_position": 9, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 40, - "character_octet_length": 160, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "9", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "character varying" - } - }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "last_update", - "ordinal_position": 10, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "10", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - }, - { - "name": "picture", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "bytea", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff", - "column_name": "picture", - "ordinal_position": 11, - "column_default": null, - "is_nullable": "YES", - "data_type": "bytea", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "bytea", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "11", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "bytea" - } - } - ] - }, - { - "name": "store", - "tags": {}, - "columns": [ - { - "name": "store_id", - "indices": [ - { - "name": "store_pkey", - "isPrimary": true + { + "name": "address", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "address", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "address2", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "address2", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "district", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 20, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "district", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 20, + "character_octet_length": 80, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "city_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 5, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_city_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "city", + "columnName": "city_id", + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "city_id", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "postal_code", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 10, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 6, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "postal_code", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 10, + "character_octet_length": 40, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "phone", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 20, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 7, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "phone", + "ordinal_position": 7, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 20, + "character_octet_length": 80, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 8, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "address", + "column_name": "last_update", + "ordinal_position": 8, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": "nextval('store_store_id_seq'::regclass)", - "isPrimary": true, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "store", - "column_name": "store_id", - "ordinal_position": 1, - "column_default": "nextval('store_store_id_seq'::regclass)", - "is_nullable": "NO", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "integer" } + ] + }, + { + "name": "city", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "city", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "manager_staff_id", - "parent": "staff.staff_id", - "reference": { - "schema": "public", - "table": "staff", - "column": "staff_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" + "columns": [ + { + "name": "city_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('city_city_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "city_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "city", + "column_name": "city_id", + "ordinal_position": 1, + "column_default": "nextval('city_city_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "city", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "city", + "column_name": "city", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "country_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_country_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "country", + "columnName": "country_id", + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "city", + "column_name": "country_id", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } }, - "indices": [ - { - "name": "idx_unq_manager_staff_id", - "isPrimary": false + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "city", + "column_name": "last_update", + "ordinal_position": 4, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" } - ], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "store", - "column_name": "manager_staff_id", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" } + ] + }, + { + "name": "country", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "country", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "address_id", - "parent": "address.address_id", - "reference": { - "schema": "public", - "table": "address", - "column": "address_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT" + "columns": [ + { + "name": "country_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('country_country_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "country_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "country", + "column_name": "country_id", + "ordinal_position": 1, + "column_default": "nextval('country_country_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } }, - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "store", - "column_name": "address_id", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "NO", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "smallint" + { + "name": "country", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "country", + "column_name": "country", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "country", + "column_name": "last_update", + "ordinal_position": 3, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } } + ] + }, + { + "name": "inventory", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "inventory", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "last_update", - "indices": [], - "maxLength": null, - "nullable": false, - "defaultValue": "now()", - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": true, - "type": "timestamp", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "store", - "column_name": "last_update", - "ordinal_position": 4, - "column_default": "now()", - "is_nullable": "NO", - "data_type": "timestamp without time zone", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": 6, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "timestamp", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "YES", - "regtype": "timestamp without time zone" - } - } - ] - } - ], - "views": [ - { - "name": "actor_info", - "tags": {}, - "columns": [ - { - "name": "actor_id", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor_info", - "column_name": "actor_id", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "YES", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "integer" - } - }, - { - "name": "first_name", - "indices": [], - "maxLength": 45, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor_info", - "column_name": "first_name", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "last_name", - "indices": [], - "maxLength": 45, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor_info", - "column_name": "last_name", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 45, - "character_octet_length": 180, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "film_info", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "actor_info", - "column_name": "film_info", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } - } - ] - }, - { - "name": "customer_list", - "tags": {}, - "columns": [ - { - "name": "id", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "id", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "YES", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "integer" - } - }, - { - "name": "name", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "name", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } - }, - { - "name": "address", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "address", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "zip code", - "indices": [], - "maxLength": 10, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "zip code", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 10, - "character_octet_length": 40, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "phone", - "indices": [], - "maxLength": 20, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "phone", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 20, - "character_octet_length": 80, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "city", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "city", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "country", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "country", - "ordinal_position": 7, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "notes", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "notes", - "ordinal_position": 8, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } - }, - { - "name": "sid", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "customer_list", - "column_name": "sid", - "ordinal_position": 9, - "column_default": null, - "is_nullable": "YES", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "9", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "smallint" - } - } - ] - }, - { - "name": "film_list", - "tags": {}, - "columns": [ - { - "name": "fid", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "fid", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "YES", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "integer" - } - }, - { - "name": "title", - "indices": [], - "maxLength": 255, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "title", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 255, - "character_octet_length": 1020, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "description", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "description", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } - }, - { - "name": "category", - "indices": [], - "maxLength": 25, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "category", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 25, - "character_octet_length": 100, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "price", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "numeric", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "price", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "YES", - "data_type": "numeric", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 4, - "numeric_precision_radix": 10, - "numeric_scale": 2, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "numeric", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "numeric" - } - }, - { - "name": "length", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "length", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "YES", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "smallint" - } - }, - { - "name": "rating", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "mpaa_rating", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "rating", - "ordinal_position": 7, - "column_default": null, - "is_nullable": "YES", - "data_type": "USER-DEFINED", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "public", - "udt_name": "mpaa_rating", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "mpaa_rating" - } - }, - { - "name": "actors", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "film_list", - "column_name": "actors", - "ordinal_position": 8, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } - } - ] - }, - { - "name": "nicer_but_slower_film_list", - "tags": {}, - "columns": [ - { - "name": "fid", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "fid", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "YES", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "integer" - } - }, - { - "name": "title", - "indices": [], - "maxLength": 255, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "title", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 255, - "character_octet_length": 1020, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "description", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "description", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } - }, - { - "name": "category", - "indices": [], - "maxLength": 25, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "category", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 25, - "character_octet_length": 100, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } - }, - { - "name": "price", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "numeric", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "price", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "YES", - "data_type": "numeric", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 4, - "numeric_precision_radix": 10, - "numeric_scale": 2, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "numeric", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "numeric" - } - }, - { - "name": "length", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "length", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "YES", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "smallint" + "columns": [ + { + "name": "inventory_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('inventory_inventory_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "inventory_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "inventory", + "column_name": "inventory_id", + "ordinal_position": 1, + "column_default": "nextval('inventory_inventory_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "film_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_store_id_film_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "film", + "columnName": "film_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "inventory", + "column_name": "film_id", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "store_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_store_id_film_id", + "isPrimary": false + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "inventory", + "column_name": "store_id", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "inventory", + "column_name": "last_update", + "ordinal_position": 4, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } } + ] + }, + { + "name": "language", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "language", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "rating", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "mpaa_rating", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "rating", - "ordinal_position": 7, - "column_default": null, - "is_nullable": "YES", - "data_type": "USER-DEFINED", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "public", - "udt_name": "mpaa_rating", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "mpaa_rating" + "columns": [ + { + "name": "language_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('language_language_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "language_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "language", + "column_name": "language_id", + "ordinal_position": 1, + "column_default": "nextval('language_language_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "name", + "expandedType": "pg_catalog.bpchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.bpchar", + "kind": "base" + }, + "comment": null, + "maxLength": 20, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "language", + "column_name": "name", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character", + "character_maximum_length": 20, + "character_octet_length": 80, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "bpchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "language", + "column_name": "last_update", + "ordinal_position": 3, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } } + ] + }, + { + "name": "payment", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "payment", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "actors", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "nicer_but_slower_film_list", - "column_name": "actors", - "ordinal_position": 8, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } - } - ] - }, - { - "name": "sales_by_film_category", - "tags": {}, - "columns": [ - { - "name": "category", - "indices": [], - "maxLength": 25, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "sales_by_film_category", - "column_name": "category", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 25, - "character_octet_length": 100, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" + "columns": [ + { + "name": "payment_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('payment_payment_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "payment_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "payment", + "column_name": "payment_id", + "ordinal_position": 1, + "column_default": "nextval('payment_payment_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "customer_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_customer_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "customer", + "columnName": "customer_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "payment", + "column_name": "customer_id", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "staff_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_staff_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "staff", + "columnName": "staff_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "payment", + "column_name": "staff_id", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "rental_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_rental_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "rental", + "columnName": "rental_id", + "onUpdate": "CASCADE", + "onDelete": "SET NULL" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "payment", + "column_name": "rental_id", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "amount", + "expandedType": "pg_catalog.numeric", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.numeric", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 5, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "payment", + "column_name": "amount", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "NO", + "data_type": "numeric", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 5, + "numeric_precision_radix": 10, + "numeric_scale": 2, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "numeric", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "payment_date", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 6, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "payment", + "column_name": "payment_date", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } } + ] + }, + { + "name": "rental", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "total_sales", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "numeric", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "sales_by_film_category", - "column_name": "total_sales", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "YES", - "data_type": "numeric", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": 10, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "numeric", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "numeric" - } - } - ] - }, - { - "name": "sales_by_store", - "tags": {}, - "columns": [ - { - "name": "store", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "sales_by_store", - "column_name": "store", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" + "columns": [ + { + "name": "rental_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('rental_rental_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "rental_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "column_name": "rental_id", + "ordinal_position": 1, + "column_default": "nextval('rental_rental_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "rental_date", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_unq_rental_rental_date_inventory_id_customer_id", + "isPrimary": false + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "column_name": "rental_date", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "inventory_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_fk_inventory_id", + "isPrimary": false + }, + { + "name": "idx_unq_rental_rental_date_inventory_id_customer_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "inventory", + "columnName": "inventory_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "column_name": "inventory_id", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "customer_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_unq_rental_rental_date_inventory_id_customer_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "customer", + "columnName": "customer_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "column_name": "customer_id", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "return_date", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 5, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "column_name": "return_date", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "YES", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "staff_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 6, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": { + "schemaName": "public", + "tableName": "staff", + "columnName": "staff_id", + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "column_name": "staff_id", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 7, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "rental", + "column_name": "last_update", + "ordinal_position": 7, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } } + ] + }, + { + "name": "staff", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "manager", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "sales_by_store", - "column_name": "manager", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" + "columns": [ + { + "name": "staff_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('staff_staff_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "staff_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "staff_id", + "ordinal_position": 1, + "column_default": "nextval('staff_staff_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "first_name", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "first_name", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_name", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "last_name", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "address_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": { + "schemaName": "public", + "tableName": "address", + "columnName": "address_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "address_id", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "email", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 5, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "email", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "store_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 6, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "store_id", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "active", + "expandedType": "pg_catalog.bool", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.bool", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "true", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 7, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "active", + "ordinal_position": 7, + "column_default": "true", + "is_nullable": "NO", + "data_type": "boolean", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "bool", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "username", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 16, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 8, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "username", + "ordinal_position": 8, + "column_default": null, + "is_nullable": "NO", + "data_type": "character varying", + "character_maximum_length": 16, + "character_octet_length": 64, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "password", + "expandedType": "pg_catalog.varchar", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 40, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 9, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "password", + "ordinal_position": 9, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 40, + "character_octet_length": 160, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "9", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 10, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "last_update", + "ordinal_position": 10, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "10", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "picture", + "expandedType": "pg_catalog.bytea", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.bytea", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": true, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 11, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff", + "column_name": "picture", + "ordinal_position": 11, + "column_default": null, + "is_nullable": "YES", + "data_type": "bytea", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "bytea", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "11", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } } + ] + }, + { + "name": "store", + "schemaName": "public", + "kind": "table", + "comment": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "store", + "table_type": "BASE TABLE", + "self_referencing_column_name": null, + "reference_generation": null, + "user_defined_type_catalog": null, + "user_defined_type_schema": null, + "user_defined_type_name": null, + "is_insertable_into": "YES", + "is_typed": "NO", + "commit_action": null }, - { - "name": "total_sales", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "numeric", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "sales_by_store", - "column_name": "total_sales", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "numeric", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": null, - "numeric_precision_radix": 10, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "numeric", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "numeric" - } - } - ] - }, - { - "name": "staff_list", - "tags": {}, - "columns": [ - { - "name": "id", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int4", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "id", - "ordinal_position": 1, - "column_default": null, - "is_nullable": "YES", - "data_type": "integer", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 32, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int4", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "1", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "integer" + "columns": [ + { + "name": "store_id", + "expandedType": "pg_catalog.int4", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "nextval('store_store_id_seq'::regclass)", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 1, + "generated": "NEVER", + "isPrimaryKey": true, + "indices": [ + { + "name": "store_pkey", + "isPrimary": true + } + ], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "store", + "column_name": "store_id", + "ordinal_position": 1, + "column_default": "nextval('store_store_id_seq'::regclass)", + "is_nullable": "NO", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "manager_staff_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 2, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [ + { + "name": "idx_unq_manager_staff_id", + "isPrimary": false + } + ], + "reference": { + "schemaName": "public", + "tableName": "staff", + "columnName": "staff_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "store", + "column_name": "manager_staff_id", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "address_id", + "expandedType": "pg_catalog.int2", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 3, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": { + "schemaName": "public", + "tableName": "address", + "columnName": "address_id", + "onUpdate": "CASCADE", + "onDelete": "RESTRICT" + }, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "store", + "column_name": "address_id", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "NO", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } + }, + { + "name": "last_update", + "expandedType": "pg_catalog.timestamp", + "dimensions": 0, + "type": { + "fullName": "pg_catalog.timestamp", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": "now()", + "isNullable": false, + "isArray": false, + "isIdentity": false, + "isUpdatable": true, + "ordinalPosition": 4, + "generated": "NEVER", + "isPrimaryKey": false, + "indices": [], + "reference": null, + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "store", + "column_name": "last_update", + "ordinal_position": 4, + "column_default": "now()", + "is_nullable": "NO", + "data_type": "timestamp without time zone", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": 6, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "timestamp", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "YES" + } } + ] + } + ], + "views": [ + { + "name": "actor_info", + "schemaName": "public", + "kind": "view", + "comment": null, + "definition": " SELECT a.actor_id,\n a.first_name,\n a.last_name,\n group_concat(DISTINCT (((c.name)::text || ': '::text) || ( SELECT group_concat((f.title)::text) AS group_concat\n FROM ((film f\n JOIN film_category fc_1 ON ((f.film_id = fc_1.film_id)))\n JOIN film_actor fa_1 ON ((f.film_id = fa_1.film_id)))\n WHERE ((fc_1.category_id = c.category_id) AND (fa_1.actor_id = a.actor_id))\n GROUP BY fa_1.actor_id))) AS film_info\n FROM (((actor a\n LEFT JOIN film_actor fa ON ((a.actor_id = fa.actor_id)))\n LEFT JOIN film_category fc ON ((fa.film_id = fc.film_id)))\n LEFT JOIN category c ON ((fc.category_id = c.category_id)))\n GROUP BY a.actor_id, a.first_name, a.last_name;", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor_info", + "view_definition": " SELECT a.actor_id,\n a.first_name,\n a.last_name,\n group_concat(DISTINCT (((c.name)::text || ': '::text) || ( SELECT group_concat((f.title)::text) AS group_concat\n FROM ((film f\n JOIN film_category fc_1 ON ((f.film_id = fc_1.film_id)))\n JOIN film_actor fa_1 ON ((f.film_id = fa_1.film_id)))\n WHERE ((fc_1.category_id = c.category_id) AND (fa_1.actor_id = a.actor_id))\n GROUP BY fa_1.actor_id))) AS film_info\n FROM (((actor a\n LEFT JOIN film_actor fa ON ((a.actor_id = fa.actor_id)))\n LEFT JOIN film_category fc ON ((fa.film_id = fc.film_id)))\n LEFT JOIN category c ON ((fc.category_id = c.category_id)))\n GROUP BY a.actor_id, a.first_name, a.last_name;", + "check_option": "NONE", + "is_updatable": "NO", + "is_insertable_into": "NO", + "is_trigger_updatable": "NO", + "is_trigger_deletable": "NO", + "is_trigger_insertable_into": "NO" }, - { - "name": "name", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "text", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "name", - "ordinal_position": 2, - "column_default": null, - "is_nullable": "YES", - "data_type": "text", - "character_maximum_length": null, - "character_octet_length": 1073741824, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "text", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "2", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "text" - } + "columns": [ + { + "name": "actor_id", + "expandedType": "pg_catalog.int4", + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 1, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor_info", + "column_name": "actor_id", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "YES", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "actor", + "column": "actor_id" + } + }, + { + "name": "first_name", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 2, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor_info", + "column_name": "first_name", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "actor", + "column": "first_name" + } + }, + { + "name": "last_name", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 45, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 3, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor_info", + "column_name": "last_name", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 45, + "character_octet_length": 180, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "actor", + "column": "last_name" + } + }, + { + "name": "film_info", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 4, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "actor_info", + "column_name": "film_info", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + } + ] + }, + { + "name": "customer_list", + "schemaName": "public", + "kind": "view", + "comment": null, + "definition": " SELECT cu.customer_id AS id,\n (((cu.first_name)::text || ' '::text) || (cu.last_name)::text) AS name,\n a.address,\n a.postal_code AS \"zip code\",\n a.phone,\n city.city,\n country.country,\n CASE\n WHEN cu.activebool THEN 'active'::text\n ELSE ''::text\n END AS notes,\n cu.store_id AS sid\n FROM (((customer cu\n JOIN address a ON ((cu.address_id = a.address_id)))\n JOIN city ON ((a.city_id = city.city_id)))\n JOIN country ON ((city.country_id = country.country_id)));", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "view_definition": " SELECT cu.customer_id AS id,\n (((cu.first_name)::text || ' '::text) || (cu.last_name)::text) AS name,\n a.address,\n a.postal_code AS \"zip code\",\n a.phone,\n city.city,\n country.country,\n CASE\n WHEN cu.activebool THEN 'active'::text\n ELSE ''::text\n END AS notes,\n cu.store_id AS sid\n FROM (((customer cu\n JOIN address a ON ((cu.address_id = a.address_id)))\n JOIN city ON ((a.city_id = city.city_id)))\n JOIN country ON ((city.country_id = country.country_id)));", + "check_option": "NONE", + "is_updatable": "NO", + "is_insertable_into": "NO", + "is_trigger_updatable": "NO", + "is_trigger_deletable": "NO", + "is_trigger_insertable_into": "NO" }, - { - "name": "address", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "address", - "ordinal_position": 3, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "3", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" + "columns": [ + { + "name": "id", + "expandedType": "pg_catalog.int4", + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 1, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "id", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "YES", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "customer", + "column": "customer_id" + } + }, + { + "name": "name", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 2, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "name", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + }, + { + "name": "address", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 3, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "address", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "address", + "column": "address" + } + }, + { + "name": "zip code", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 10, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 4, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "zip code", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 10, + "character_octet_length": 40, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "address", + "column": "postal_code" + } + }, + { + "name": "phone", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 20, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 5, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "phone", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 20, + "character_octet_length": 80, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "address", + "column": "phone" + } + }, + { + "name": "city", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 6, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "city", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "city", + "column": "city" + } + }, + { + "name": "country", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 7, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "country", + "ordinal_position": 7, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "country", + "column": "country" + } + }, + { + "name": "notes", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 8, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "notes", + "ordinal_position": 8, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + }, + { + "name": "sid", + "expandedType": "pg_catalog.int2", + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 9, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "customer_list", + "column_name": "sid", + "ordinal_position": 9, + "column_default": null, + "is_nullable": "YES", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "9", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "customer", + "column": "store_id" + } } + ] + }, + { + "name": "film_list", + "schemaName": "public", + "kind": "view", + "comment": null, + "definition": " SELECT film.film_id AS fid,\n film.title,\n film.description,\n category.name AS category,\n film.rental_rate AS price,\n film.length,\n film.rating,\n group_concat((((actor.first_name)::text || ' '::text) || (actor.last_name)::text)) AS actors\n FROM ((((category\n LEFT JOIN film_category ON ((category.category_id = film_category.category_id)))\n LEFT JOIN film ON ((film_category.film_id = film.film_id)))\n JOIN film_actor ON ((film.film_id = film_actor.film_id)))\n JOIN actor ON ((film_actor.actor_id = actor.actor_id)))\n GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating;", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "view_definition": " SELECT film.film_id AS fid,\n film.title,\n film.description,\n category.name AS category,\n film.rental_rate AS price,\n film.length,\n film.rating,\n group_concat((((actor.first_name)::text || ' '::text) || (actor.last_name)::text)) AS actors\n FROM ((((category\n LEFT JOIN film_category ON ((category.category_id = film_category.category_id)))\n LEFT JOIN film ON ((film_category.film_id = film.film_id)))\n JOIN film_actor ON ((film.film_id = film_actor.film_id)))\n JOIN actor ON ((film_actor.actor_id = actor.actor_id)))\n GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating;", + "check_option": "NONE", + "is_updatable": "NO", + "is_insertable_into": "NO", + "is_trigger_updatable": "NO", + "is_trigger_deletable": "NO", + "is_trigger_insertable_into": "NO" }, - { - "name": "zip code", - "indices": [], - "maxLength": 10, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "zip code", - "ordinal_position": 4, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 10, - "character_octet_length": 40, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "4", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } + "columns": [ + { + "name": "fid", + "expandedType": "pg_catalog.int4", + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 1, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "fid", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "YES", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "film_id" + } + }, + { + "name": "title", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 255, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 2, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "title", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 255, + "character_octet_length": 1020, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "title" + } + }, + { + "name": "description", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 3, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "description", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "description" + } + }, + { + "name": "category", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 25, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 4, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "category", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 25, + "character_octet_length": 100, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "category", + "column": "name" + } + }, + { + "name": "price", + "expandedType": "pg_catalog.numeric", + "type": { + "fullName": "pg_catalog.numeric", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 5, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "price", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "YES", + "data_type": "numeric", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 4, + "numeric_precision_radix": 10, + "numeric_scale": 2, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "numeric", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "rental_rate" + } + }, + { + "name": "length", + "expandedType": "pg_catalog.int2", + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 6, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "length", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "YES", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "length" + } + }, + { + "name": "rating", + "expandedType": "public.mpaa_rating", + "type": { + "fullName": "public.mpaa_rating", + "kind": "enum" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 7, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "rating", + "ordinal_position": 7, + "column_default": null, + "is_nullable": "YES", + "data_type": "USER-DEFINED", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "public", + "udt_name": "mpaa_rating", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "rating" + } + }, + { + "name": "actors", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 8, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "film_list", + "column_name": "actors", + "ordinal_position": 8, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + } + ] + }, + { + "name": "nicer_but_slower_film_list", + "schemaName": "public", + "kind": "view", + "comment": null, + "definition": " SELECT film.film_id AS fid,\n film.title,\n film.description,\n category.name AS category,\n film.rental_rate AS price,\n film.length,\n film.rating,\n group_concat((((upper(\"substring\"((actor.first_name)::text, 1, 1)) || lower(\"substring\"((actor.first_name)::text, 2))) || upper(\"substring\"((actor.last_name)::text, 1, 1))) || lower(\"substring\"((actor.last_name)::text, 2)))) AS actors\n FROM ((((category\n LEFT JOIN film_category ON ((category.category_id = film_category.category_id)))\n LEFT JOIN film ON ((film_category.film_id = film.film_id)))\n JOIN film_actor ON ((film.film_id = film_actor.film_id)))\n JOIN actor ON ((film_actor.actor_id = actor.actor_id)))\n GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating;", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "view_definition": " SELECT film.film_id AS fid,\n film.title,\n film.description,\n category.name AS category,\n film.rental_rate AS price,\n film.length,\n film.rating,\n group_concat((((upper(\"substring\"((actor.first_name)::text, 1, 1)) || lower(\"substring\"((actor.first_name)::text, 2))) || upper(\"substring\"((actor.last_name)::text, 1, 1))) || lower(\"substring\"((actor.last_name)::text, 2)))) AS actors\n FROM ((((category\n LEFT JOIN film_category ON ((category.category_id = film_category.category_id)))\n LEFT JOIN film ON ((film_category.film_id = film.film_id)))\n JOIN film_actor ON ((film.film_id = film_actor.film_id)))\n JOIN actor ON ((film_actor.actor_id = actor.actor_id)))\n GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating;", + "check_option": "NONE", + "is_updatable": "NO", + "is_insertable_into": "NO", + "is_trigger_updatable": "NO", + "is_trigger_deletable": "NO", + "is_trigger_insertable_into": "NO" }, - { - "name": "phone", - "indices": [], - "maxLength": 20, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "phone", - "ordinal_position": 5, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 20, - "character_octet_length": 80, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "5", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } + "columns": [ + { + "name": "fid", + "expandedType": "pg_catalog.int4", + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 1, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "fid", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "YES", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "film_id" + } + }, + { + "name": "title", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 255, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 2, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "title", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 255, + "character_octet_length": 1020, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "title" + } + }, + { + "name": "description", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 3, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "description", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "description" + } + }, + { + "name": "category", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 25, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 4, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "category", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 25, + "character_octet_length": 100, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "category", + "column": "name" + } + }, + { + "name": "price", + "expandedType": "pg_catalog.numeric", + "type": { + "fullName": "pg_catalog.numeric", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 5, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "price", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "YES", + "data_type": "numeric", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 4, + "numeric_precision_radix": 10, + "numeric_scale": 2, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "numeric", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "rental_rate" + } + }, + { + "name": "length", + "expandedType": "pg_catalog.int2", + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 6, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "length", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "YES", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "length" + } + }, + { + "name": "rating", + "expandedType": "public.mpaa_rating", + "type": { + "fullName": "public.mpaa_rating", + "kind": "enum" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 7, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "rating", + "ordinal_position": 7, + "column_default": null, + "is_nullable": "YES", + "data_type": "USER-DEFINED", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "public", + "udt_name": "mpaa_rating", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "film", + "column": "rating" + } + }, + { + "name": "actors", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 8, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "nicer_but_slower_film_list", + "column_name": "actors", + "ordinal_position": 8, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + } + ] + }, + { + "name": "sales_by_film_category", + "schemaName": "public", + "kind": "view", + "comment": null, + "definition": " SELECT c.name AS category,\n sum(p.amount) AS total_sales\n FROM (((((payment p\n JOIN rental r ON ((p.rental_id = r.rental_id)))\n JOIN inventory i ON ((r.inventory_id = i.inventory_id)))\n JOIN film f ON ((i.film_id = f.film_id)))\n JOIN film_category fc ON ((f.film_id = fc.film_id)))\n JOIN category c ON ((fc.category_id = c.category_id)))\n GROUP BY c.name\n ORDER BY (sum(p.amount)) DESC;", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "sales_by_film_category", + "view_definition": " SELECT c.name AS category,\n sum(p.amount) AS total_sales\n FROM (((((payment p\n JOIN rental r ON ((p.rental_id = r.rental_id)))\n JOIN inventory i ON ((r.inventory_id = i.inventory_id)))\n JOIN film f ON ((i.film_id = f.film_id)))\n JOIN film_category fc ON ((f.film_id = fc.film_id)))\n JOIN category c ON ((fc.category_id = c.category_id)))\n GROUP BY c.name\n ORDER BY (sum(p.amount)) DESC;", + "check_option": "NONE", + "is_updatable": "NO", + "is_insertable_into": "NO", + "is_trigger_updatable": "NO", + "is_trigger_deletable": "NO", + "is_trigger_insertable_into": "NO" }, - { - "name": "city", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "city", - "ordinal_position": 6, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "6", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } + "columns": [ + { + "name": "category", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 25, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 1, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "sales_by_film_category", + "column_name": "category", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 25, + "character_octet_length": 100, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "category", + "column": "name" + } + }, + { + "name": "total_sales", + "expandedType": "pg_catalog.numeric", + "type": { + "fullName": "pg_catalog.numeric", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 2, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "sales_by_film_category", + "column_name": "total_sales", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "YES", + "data_type": "numeric", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": 10, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "numeric", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + } + ] + }, + { + "name": "sales_by_store", + "schemaName": "public", + "kind": "view", + "comment": null, + "definition": " SELECT (((c.city)::text || ','::text) || (cy.country)::text) AS store,\n (((m.first_name)::text || ' '::text) || (m.last_name)::text) AS manager,\n sum(p.amount) AS total_sales\n FROM (((((((payment p\n JOIN rental r ON ((p.rental_id = r.rental_id)))\n JOIN inventory i ON ((r.inventory_id = i.inventory_id)))\n JOIN store s ON ((i.store_id = s.store_id)))\n JOIN address a ON ((s.address_id = a.address_id)))\n JOIN city c ON ((a.city_id = c.city_id)))\n JOIN country cy ON ((c.country_id = cy.country_id)))\n JOIN staff m ON ((s.manager_staff_id = m.staff_id)))\n GROUP BY cy.country, c.city, s.store_id, m.first_name, m.last_name\n ORDER BY cy.country, c.city;", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "sales_by_store", + "view_definition": " SELECT (((c.city)::text || ','::text) || (cy.country)::text) AS store,\n (((m.first_name)::text || ' '::text) || (m.last_name)::text) AS manager,\n sum(p.amount) AS total_sales\n FROM (((((((payment p\n JOIN rental r ON ((p.rental_id = r.rental_id)))\n JOIN inventory i ON ((r.inventory_id = i.inventory_id)))\n JOIN store s ON ((i.store_id = s.store_id)))\n JOIN address a ON ((s.address_id = a.address_id)))\n JOIN city c ON ((a.city_id = c.city_id)))\n JOIN country cy ON ((c.country_id = cy.country_id)))\n JOIN staff m ON ((s.manager_staff_id = m.staff_id)))\n GROUP BY cy.country, c.city, s.store_id, m.first_name, m.last_name\n ORDER BY cy.country, c.city;", + "check_option": "NONE", + "is_updatable": "NO", + "is_insertable_into": "NO", + "is_trigger_updatable": "NO", + "is_trigger_deletable": "NO", + "is_trigger_insertable_into": "NO" }, - { - "name": "country", - "indices": [], - "maxLength": 50, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "varchar", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "country", - "ordinal_position": 7, - "column_default": null, - "is_nullable": "YES", - "data_type": "character varying", - "character_maximum_length": 50, - "character_octet_length": 200, - "numeric_precision": null, - "numeric_precision_radix": null, - "numeric_scale": null, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "varchar", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "7", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "character varying" - } + "columns": [ + { + "name": "store", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 1, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "sales_by_store", + "column_name": "store", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + }, + { + "name": "manager", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 2, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "sales_by_store", + "column_name": "manager", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + }, + { + "name": "total_sales", + "expandedType": "pg_catalog.numeric", + "type": { + "fullName": "pg_catalog.numeric", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 3, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "sales_by_store", + "column_name": "total_sales", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "numeric", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": null, + "numeric_precision_radix": 10, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "numeric", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + } + ] + }, + { + "name": "staff_list", + "schemaName": "public", + "kind": "view", + "comment": null, + "definition": " SELECT s.staff_id AS id,\n (((s.first_name)::text || ' '::text) || (s.last_name)::text) AS name,\n a.address,\n a.postal_code AS \"zip code\",\n a.phone,\n city.city,\n country.country,\n s.store_id AS sid\n FROM (((staff s\n JOIN address a ON ((s.address_id = a.address_id)))\n JOIN city ON ((a.city_id = city.city_id)))\n JOIN country ON ((city.country_id = country.country_id)));", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "view_definition": " SELECT s.staff_id AS id,\n (((s.first_name)::text || ' '::text) || (s.last_name)::text) AS name,\n a.address,\n a.postal_code AS \"zip code\",\n a.phone,\n city.city,\n country.country,\n s.store_id AS sid\n FROM (((staff s\n JOIN address a ON ((s.address_id = a.address_id)))\n JOIN city ON ((a.city_id = city.city_id)))\n JOIN country ON ((city.country_id = country.country_id)));", + "check_option": "NONE", + "is_updatable": "NO", + "is_insertable_into": "NO", + "is_trigger_updatable": "NO", + "is_trigger_deletable": "NO", + "is_trigger_insertable_into": "NO" }, - { - "name": "sid", - "indices": [], - "maxLength": null, - "nullable": true, - "defaultValue": null, - "isPrimary": false, - "isIdentity": false, - "generated": "NEVER", - "isUpdatable": false, - "type": "int2", - "tags": {}, - "rawInfo": { - "table_catalog": "dvdrental", - "table_schema": "public", - "table_name": "staff_list", - "column_name": "sid", - "ordinal_position": 8, - "column_default": null, - "is_nullable": "YES", - "data_type": "smallint", - "character_maximum_length": null, - "character_octet_length": null, - "numeric_precision": 16, - "numeric_precision_radix": 2, - "numeric_scale": 0, - "datetime_precision": null, - "interval_type": null, - "interval_precision": null, - "character_set_catalog": null, - "character_set_schema": null, - "character_set_name": null, - "collation_catalog": null, - "collation_schema": null, - "collation_name": null, - "domain_catalog": null, - "domain_schema": null, - "domain_name": null, - "udt_catalog": "dvdrental", - "udt_schema": "pg_catalog", - "udt_name": "int2", - "scope_catalog": null, - "scope_schema": null, - "scope_name": null, - "maximum_cardinality": null, - "dtd_identifier": "8", - "is_self_referencing": "NO", - "is_identity": "NO", - "identity_generation": null, - "identity_start": null, - "identity_increment": null, - "identity_maximum": null, - "identity_minimum": null, - "identity_cycle": "NO", - "is_generated": "NEVER", - "generation_expression": null, - "is_updatable": "NO", - "regtype": "smallint" + "columns": [ + { + "name": "id", + "expandedType": "pg_catalog.int4", + "type": { + "fullName": "pg_catalog.int4", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 1, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "id", + "ordinal_position": 1, + "column_default": null, + "is_nullable": "YES", + "data_type": "integer", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 32, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int4", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "1", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "staff", + "column": "staff_id" + } + }, + { + "name": "name", + "expandedType": "pg_catalog.text", + "type": { + "fullName": "pg_catalog.text", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 2, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "name", + "ordinal_position": 2, + "column_default": null, + "is_nullable": "YES", + "data_type": "text", + "character_maximum_length": null, + "character_octet_length": 1073741824, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "text", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "2", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": null + }, + { + "name": "address", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 3, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "address", + "ordinal_position": 3, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "3", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "address", + "column": "address" + } + }, + { + "name": "zip code", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 10, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 4, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "zip code", + "ordinal_position": 4, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 10, + "character_octet_length": 40, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "4", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "address", + "column": "postal_code" + } + }, + { + "name": "phone", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 20, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 5, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "phone", + "ordinal_position": 5, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 20, + "character_octet_length": 80, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "5", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "address", + "column": "phone" + } + }, + { + "name": "city", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 6, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "city", + "ordinal_position": 6, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "6", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "city", + "column": "city" + } + }, + { + "name": "country", + "expandedType": "pg_catalog.varchar", + "type": { + "fullName": "pg_catalog.varchar", + "kind": "base" + }, + "comment": null, + "maxLength": 50, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 7, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "country", + "ordinal_position": 7, + "column_default": null, + "is_nullable": "YES", + "data_type": "character varying", + "character_maximum_length": 50, + "character_octet_length": 200, + "numeric_precision": null, + "numeric_precision_radix": null, + "numeric_scale": null, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "varchar", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "7", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "country", + "column": "country" + } + }, + { + "name": "sid", + "expandedType": "pg_catalog.int2", + "type": { + "fullName": "pg_catalog.int2", + "kind": "base" + }, + "comment": null, + "maxLength": null, + "defaultValue": null, + "isArray": false, + "isIdentity": false, + "isUpdatable": false, + "ordinalPosition": 8, + "generated": "NEVER", + "informationSchemaValue": { + "table_catalog": "dvdrental", + "table_schema": "public", + "table_name": "staff_list", + "column_name": "sid", + "ordinal_position": 8, + "column_default": null, + "is_nullable": "YES", + "data_type": "smallint", + "character_maximum_length": null, + "character_octet_length": null, + "numeric_precision": 16, + "numeric_precision_radix": 2, + "numeric_scale": 0, + "datetime_precision": null, + "interval_type": null, + "interval_precision": null, + "character_set_catalog": null, + "character_set_schema": null, + "character_set_name": null, + "collation_catalog": null, + "collation_schema": null, + "collation_name": null, + "domain_catalog": null, + "domain_schema": null, + "domain_name": null, + "udt_catalog": "dvdrental", + "udt_schema": "pg_catalog", + "udt_name": "int2", + "scope_catalog": null, + "scope_schema": null, + "scope_name": null, + "maximum_cardinality": null, + "dtd_identifier": "8", + "is_self_referencing": "NO", + "is_identity": "NO", + "identity_generation": null, + "identity_start": null, + "identity_increment": null, + "identity_maximum": null, + "identity_minimum": null, + "identity_cycle": "NO", + "is_generated": "NEVER", + "generation_expression": null, + "is_updatable": "NO" + }, + "source": { + "schema": "public", + "table": "staff", + "column": "store_id" + } } - } - ] - } - ], - "types": [ - { - "type": "enum", - "name": "mpaa_rating", - "tags": {}, - "values": [ - "G", - "PG", - "PG-13", - "R", - "NC-17" - ] - } - ] + ] + } + ], + "materializedViews": [], + "compositeTypes": [] + } } diff --git a/generate-dvdrental.js b/generate-dvdrental.js index e03782bb..38149744 100644 --- a/generate-dvdrental.js +++ b/generate-dvdrental.js @@ -8,7 +8,7 @@ const connection = { password: 'postgres', port: 54321, }; -l.extractSchema('public', connection).then((r) => +l.extractSchemas(connection).then((r) => // eslint-disable-next-line no-console console.log(JSON.stringify(r, null, 2)) ); diff --git a/package.json b/package.json index 365a6c2a..a8b4ac08 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,10 @@ "build": "tsc", "lint": "yarn eslint . -f visualstudio --report-unused-disable-directives --ext .js,.ts", "test": "vitest run", - "version": "yarn build" + "version": "yarn build", + "docs:prep": "tsc && yarn api-extractor run --local --verbose && yarn api-documenter markdown --input-folder=./temp/ --output-folder=./docs/api && rm -rf ./temp", + "docs:dev": "yarn docs:prep && vitepress dev docs", + "docs:build": "yarn docs:prep && vitepress build docs" }, "prettier": { "singleQuote": true, @@ -32,10 +35,14 @@ "knex": "2.1.0", "pg": "8.7.3", "pg-query-emscripten": "^0.1.0", - "ramda": "^0.28.0" + "ramda": "^0.28.0", + "tagged-comment-parser": "^1.1.1" }, "devDependencies": { "@kristiandupont/eslint-config": "1.2.7", + "@microsoft/api-documenter": "^7.18.0", + "@microsoft/api-extractor": "^7.28.2", + "@types/jsonpath": "^0.2.0", "@types/pg": "8.6.5", "@types/ramda": "0.28.14", "eslint": "8.17.0", @@ -43,7 +50,9 @@ "prettier": "2.7.0", "testcontainers": "8.10.1", "typescript": "4.7.3", - "vitest": "0.14.2" + "vitepress": "^1.0.0-alpha.4", + "vitest": "0.14.2", + "vue": "^3.2.37" }, "np": {} } diff --git a/src/deprecatia/extract-schema.ts b/src/deprecatia/extract-schema.ts new file mode 100644 index 00000000..2477fc9f --- /dev/null +++ b/src/deprecatia/extract-schema.ts @@ -0,0 +1,133 @@ +import { ConnectionConfig } from 'pg'; +import * as R from 'ramda'; +import { parse } from 'tagged-comment-parser'; + +import extractSchemas from '../extractSchemas'; + +const tryParse = (str: string) => { + try { + return parse(str); + } catch (e) { + return { comment: str || undefined, tags: {} }; + } +}; + +const mapColumn = (column: any) => { + const { + // These have just been renamed: + isNullable: nullable, + informationSchemaValue: rawInfo, + isPrimaryKey: isPrimary, + + // These have changed: + reference, + expandedType, + comment: rawComment, + + // And these didn't exist before: + ordinalPosition: _ordinalPosition, + type: _type, + dimensions: _dimensions, + + // Everything else should be as it was + ...rest + } = column; + + const { comment, tags } = tryParse(rawComment); + + const typeName = expandedType.split('.')[1]; + return { + ...rest, + comment, + tags, + nullable, + rawInfo, + isPrimary, + type: typeName, + subType: typeName, + reference: + (reference && { + schema: reference.schemaName, + table: reference.tableName, + column: reference.columnName, + onUpdate: reference.onUpdate, + onDelete: reference.onDelete, + }) || + undefined, + }; +}; + +const mapTable = (table: any) => { + const { + columns, + comment: rawComment, + + informationSchemaValue: _informationSchemaValue, + definition: _definition, + kind: _kind, + schemaName: _schemaName, + + ...rest + } = table; + + const { comment, tags } = tryParse(rawComment); + + return { + ...rest, + comment, + tags, + columns: columns.map(mapColumn), + }; +}; + +const mapType = (type: any) => { + const { comment: rawComment, kind, schemaName: _schemaName, ...rest } = type; + + const { comment, tags } = tryParse(rawComment); + + return { + ...rest, + type: kind, // this just happens to match the old types.. + comment, + tags, + }; +}; + +/** @deprecated - use extractSchemas instead */ +const extractSchema = async ( + schemaName: string, + connectionConfig: string | ConnectionConfig, + resolveViews: boolean, + tables?: string[] +) => { + console.warn('NOTE: extractSchema is deprecated, use extractSchemas instead'); + + const r = await extractSchemas(connectionConfig, { + schemas: [schemaName], + resolveViews, + typeFilter: (pgType) => { + if (!['table', 'view', 'enum', 'compositeType'].includes(pgType.kind)) + return false; + + if (tables && pgType.kind === 'table') { + return tables.includes(pgType.name); + } + return true; + }, + }); + + const result = { + tables: R.sortBy(R.prop('name'), r[schemaName].tables.map(mapTable)), + views: R.sortBy(R.prop('name'), r[schemaName].views.map(mapTable)), + types: R.sortBy( + R.prop('name'), + [ + ...(r[schemaName].enums ?? []), + ...(r[schemaName].compositeTypes ?? []), + ].map(mapType) + ), + }; + return result; +}; + +export default extractSchema; diff --git a/src/integration-tests/__snapshots__/index.test.js.snap b/src/deprecatia/integration-tests/__snapshots__/index.test.js.snap similarity index 95% rename from src/integration-tests/__snapshots__/index.test.js.snap rename to src/deprecatia/integration-tests/__snapshots__/index.test.js.snap index abfdb772..30bb2d6b 100644 --- a/src/integration-tests/__snapshots__/index.test.js.snap +++ b/src/deprecatia/integration-tests/__snapshots__/index.test.js.snap @@ -22,7 +22,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "actor_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -59,7 +58,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -87,7 +85,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "first_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -124,7 +121,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -157,7 +153,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "last_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -194,7 +189,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -222,7 +216,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -259,7 +252,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -299,7 +291,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "address_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -336,7 +327,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -364,7 +354,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "address", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -401,7 +390,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -429,7 +417,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "address2", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -466,7 +453,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -494,7 +480,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 20, "name": "district", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 20, "character_octet_length": 80, @@ -531,7 +516,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -564,7 +548,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "city_id", "nullable": false, - "parent": "city.city_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -601,7 +584,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 5, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -635,7 +617,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 10, "name": "postal_code", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": 10, "character_octet_length": 40, @@ -672,7 +653,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 6, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -700,7 +680,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 20, "name": "phone", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 20, "character_octet_length": 80, @@ -737,7 +716,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -765,7 +743,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -802,7 +779,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 8, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -842,7 +818,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "category_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -879,7 +854,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -907,7 +881,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 25, "name": "name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 25, "character_octet_length": 100, @@ -944,7 +917,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -972,7 +944,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1009,7 +980,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1049,7 +1019,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "city_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1086,7 +1055,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1114,7 +1082,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "city", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -1151,7 +1118,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1184,7 +1150,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "country_id", "nullable": false, - "parent": "country.country_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1221,7 +1186,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 3, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1255,7 +1219,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1292,7 +1255,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1332,7 +1294,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "country_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1369,7 +1330,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1397,7 +1357,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "country", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -1434,7 +1393,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1462,7 +1420,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1499,7 +1456,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1539,7 +1495,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "customer_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1576,7 +1531,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1609,7 +1563,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "store_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1646,7 +1599,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 2, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1674,7 +1626,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "first_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -1711,7 +1662,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1744,7 +1694,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "last_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -1781,7 +1730,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1809,7 +1757,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "email", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -1846,7 +1793,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 5, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1879,7 +1825,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "address_id", "nullable": false, - "parent": "address.address_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1916,7 +1861,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 6, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -1929,8 +1873,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "address_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "address", }, @@ -1950,7 +1894,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "activebool", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -1987,7 +1930,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "boolean", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2015,7 +1957,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "create_date", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2052,7 +1993,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 8, - "regtype": "date", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2080,7 +2020,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2117,7 +2056,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 9, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2145,7 +2083,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "active", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2182,7 +2119,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 10, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2222,7 +2158,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "film_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2259,7 +2194,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2292,7 +2226,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 255, "name": "title", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 255, "character_octet_length": 1020, @@ -2329,7 +2262,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2357,7 +2289,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "description", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -2394,7 +2325,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2422,7 +2352,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "release_year", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2459,7 +2388,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 4, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2471,9 +2399,9 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, - "subType": "int4", + "subType": "year", "tags": {}, - "type": "int4", + "type": "year", }, { "comment": undefined, @@ -2492,7 +2420,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "language_id", "nullable": false, - "parent": "language.language_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2529,7 +2456,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 5, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2542,8 +2468,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "language_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "language", }, @@ -2563,7 +2489,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rental_duration", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2600,7 +2525,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 6, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2628,7 +2552,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rental_rate", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2665,7 +2588,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 10, "numeric_scale": 2, "ordinal_position": 7, - "regtype": "numeric", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2693,7 +2615,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "length", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2730,7 +2651,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 8, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2758,7 +2678,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "replacement_cost", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2795,7 +2714,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 10, "numeric_scale": 2, "ordinal_position": 9, - "regtype": "numeric", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2823,7 +2741,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rating", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2860,7 +2777,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 10, - "regtype": "mpaa_rating", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2888,7 +2804,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2925,7 +2840,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 11, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -2953,7 +2867,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "special_features", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -2990,7 +2903,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 12, - "regtype": "text[]", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3002,7 +2914,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, - "subType": "text", + "subType": "text[]", "tags": {}, "type": "text[]", }, @@ -3023,7 +2935,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "fulltext", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3060,7 +2971,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 13, - "regtype": "tsvector", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3100,7 +3010,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "actor_id", "nullable": false, - "parent": "actor.actor_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3137,7 +3046,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3150,8 +3058,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "actor_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "actor", }, @@ -3180,7 +3088,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "film_id", "nullable": false, - "parent": "film.film_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3217,7 +3124,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 2, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3230,8 +3136,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "film_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "film", }, @@ -3251,7 +3157,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3288,7 +3193,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3328,7 +3232,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "film_id", "nullable": false, - "parent": "film.film_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3365,7 +3268,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3378,8 +3280,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "film_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "film", }, @@ -3404,7 +3306,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "category_id", "nullable": false, - "parent": "category.category_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3441,7 +3342,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 2, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3454,8 +3354,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "category_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "category", }, @@ -3475,7 +3375,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3512,7 +3411,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3552,7 +3450,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "inventory_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3589,7 +3486,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3622,7 +3518,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "film_id", "nullable": false, - "parent": "film.film_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3659,7 +3554,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 2, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3672,8 +3566,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "film_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "film", }, @@ -3698,7 +3592,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "store_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3735,7 +3628,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 3, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3763,7 +3655,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3800,7 +3691,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3840,7 +3730,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "language_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -3877,7 +3766,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3905,7 +3793,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 20, "name": "name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 20, "character_octet_length": 80, @@ -3942,7 +3829,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -3970,7 +3856,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4007,7 +3892,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4047,7 +3931,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "payment_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4084,7 +3967,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4117,7 +3999,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "customer_id", "nullable": false, - "parent": "customer.customer_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4154,7 +4035,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 2, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4167,8 +4047,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "customer_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "customer", }, @@ -4193,7 +4073,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "staff_id", "nullable": false, - "parent": "staff.staff_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4230,7 +4109,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 3, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4243,8 +4121,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "staff_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "staff", }, @@ -4269,7 +4147,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rental_id", "nullable": false, - "parent": "rental.rental_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4306,7 +4183,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 4, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4319,8 +4195,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "rental_id", - "onDelete": "CASCADE", - "onUpdate": "SET NULL", + "onDelete": "SET NULL", + "onUpdate": "CASCADE", "schema": "public", "table": "rental", }, @@ -4340,7 +4216,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "amount", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4377,7 +4252,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 10, "numeric_scale": 2, "ordinal_position": 5, - "regtype": "numeric", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4405,7 +4279,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "payment_date", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4442,7 +4315,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 6, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4482,7 +4354,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rental_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4519,7 +4390,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4552,7 +4422,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rental_date", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4589,7 +4458,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4626,7 +4494,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "inventory_id", "nullable": false, - "parent": "inventory.inventory_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4663,7 +4530,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 3, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4676,8 +4542,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "inventory_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "inventory", }, @@ -4702,7 +4568,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "customer_id", "nullable": false, - "parent": "customer.customer_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4739,7 +4604,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 4, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4752,8 +4616,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "customer_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "customer", }, @@ -4773,7 +4637,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "return_date", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4810,7 +4673,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 5, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4838,7 +4700,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "staff_id", "nullable": false, - "parent": "staff.staff_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4875,7 +4736,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 6, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4909,7 +4769,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -4946,7 +4805,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -4986,7 +4844,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "staff_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5023,7 +4880,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5051,7 +4907,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "first_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -5088,7 +4943,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5116,7 +4970,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "last_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -5153,7 +5006,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5181,7 +5033,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "address_id", "nullable": false, - "parent": "address.address_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5218,7 +5069,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 4, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5231,8 +5081,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "address_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "address", }, @@ -5252,7 +5102,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "email", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -5289,7 +5138,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 5, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5317,7 +5165,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "store_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5354,7 +5201,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 6, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5382,7 +5228,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "active", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5419,7 +5264,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "boolean", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5447,7 +5291,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 16, "name": "username", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 16, "character_octet_length": 64, @@ -5484,7 +5327,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 8, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5512,7 +5354,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 40, "name": "password", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": 40, "character_octet_length": 160, @@ -5549,7 +5390,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 9, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5577,7 +5417,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5614,7 +5453,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 10, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5642,7 +5480,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "picture", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5679,7 +5516,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 11, - "regtype": "bytea", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5719,7 +5555,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "store_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5756,7 +5591,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5789,7 +5623,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "manager_staff_id", "nullable": false, - "parent": "staff.staff_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5826,7 +5659,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 2, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5839,8 +5671,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "staff_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "staff", }, @@ -5860,7 +5692,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "address_id", "nullable": false, - "parent": "address.address_id", "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5897,7 +5728,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 3, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -5910,8 +5740,8 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` }, "reference": { "column": "address_id", - "onDelete": "CASCADE", - "onUpdate": "RESTRICT", + "onDelete": "RESTRICT", + "onUpdate": "CASCADE", "schema": "public", "table": "address", }, @@ -5931,7 +5761,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "last_update", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -5968,7 +5797,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "timestamp without time zone", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6025,7 +5853,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "actor_id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -6062,7 +5889,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6076,7 +5902,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "actor_id", - "schema": undefined, + "schema": "public", "table": "actor", }, "subType": "int4", @@ -6095,7 +5921,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "first_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -6132,7 +5957,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6146,7 +5970,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "first_name", - "schema": undefined, + "schema": "public", "table": "actor", }, "subType": "varchar", @@ -6170,7 +5994,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 45, "name": "last_name", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 45, "character_octet_length": 180, @@ -6207,7 +6030,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6221,7 +6043,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "last_name", - "schema": undefined, + "schema": "public", "table": "actor", }, "subType": "varchar", @@ -6232,15 +6054,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "film_info", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -6277,7 +6097,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6289,6 +6108,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -6317,7 +6137,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -6354,7 +6173,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6368,7 +6186,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "customer_id", - "schema": undefined, + "schema": "public", "table": "customer", }, "subType": "int4", @@ -6379,15 +6197,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "name", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -6424,7 +6240,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6436,6 +6251,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -6452,7 +6268,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "address", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -6489,7 +6304,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6503,7 +6317,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "address", - "schema": undefined, + "schema": "public", "table": "address", }, "subType": "varchar", @@ -6522,7 +6336,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 10, "name": "zip code", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": 10, "character_octet_length": 40, @@ -6559,7 +6372,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6573,7 +6385,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "postal_code", - "schema": undefined, + "schema": "public", "table": "address", }, "subType": "varchar", @@ -6592,7 +6404,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 20, "name": "phone", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 20, "character_octet_length": 80, @@ -6629,7 +6440,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 5, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6643,7 +6453,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "phone", - "schema": undefined, + "schema": "public", "table": "address", }, "subType": "varchar", @@ -6662,7 +6472,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "city", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -6699,7 +6508,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 6, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6713,7 +6521,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "city", - "schema": undefined, + "schema": "public", "table": "city", }, "subType": "varchar", @@ -6732,7 +6540,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "country", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -6769,7 +6576,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6783,7 +6589,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "country", - "schema": undefined, + "schema": "public", "table": "country", }, "subType": "varchar", @@ -6794,15 +6600,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "notes", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -6839,7 +6643,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 8, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6851,6 +6654,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -6872,7 +6676,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "sid", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -6909,7 +6712,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 9, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -6923,7 +6725,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "store_id", - "schema": undefined, + "schema": "public", "table": "customer", }, "subType": "int2", @@ -6954,7 +6756,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "fid", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -6991,7 +6792,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7005,7 +6805,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "film_id", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "int4", @@ -7029,7 +6829,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 255, "name": "title", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 255, "character_octet_length": 1020, @@ -7066,7 +6865,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7080,7 +6878,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "title", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "varchar", @@ -7099,7 +6897,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "description", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -7136,7 +6933,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7150,7 +6946,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "description", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "text", @@ -7169,7 +6965,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 25, "name": "category", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 25, "character_octet_length": 100, @@ -7206,7 +7001,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7220,7 +7014,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "name", - "schema": undefined, + "schema": "public", "table": "category", }, "subType": "varchar", @@ -7239,7 +7033,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "price", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -7276,7 +7069,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 10, "numeric_scale": 2, "ordinal_position": 5, - "regtype": "numeric", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7290,7 +7082,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "rental_rate", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "numeric", @@ -7309,7 +7101,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "length", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -7346,7 +7137,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 6, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7360,7 +7150,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "length", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "int2", @@ -7379,7 +7169,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rating", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -7416,7 +7205,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "mpaa_rating", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7430,7 +7218,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "rating", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "mpaa_rating", @@ -7441,15 +7229,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "actors", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -7486,7 +7272,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 8, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7498,6 +7283,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -7526,7 +7312,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "fid", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -7563,7 +7348,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7577,7 +7361,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "film_id", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "int4", @@ -7601,7 +7385,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 255, "name": "title", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 255, "character_octet_length": 1020, @@ -7638,7 +7421,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7652,7 +7434,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "title", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "varchar", @@ -7671,7 +7453,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "description", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -7708,7 +7489,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7722,7 +7502,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "description", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "text", @@ -7741,7 +7521,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 25, "name": "category", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 25, "character_octet_length": 100, @@ -7778,7 +7557,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7792,7 +7570,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "name", - "schema": undefined, + "schema": "public", "table": "category", }, "subType": "varchar", @@ -7811,7 +7589,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "price", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -7848,7 +7625,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 10, "numeric_scale": 2, "ordinal_position": 5, - "regtype": "numeric", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7862,7 +7638,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "rental_rate", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "numeric", @@ -7881,7 +7657,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "length", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -7918,7 +7693,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 6, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -7932,7 +7706,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "length", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "int2", @@ -7951,7 +7725,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "rating", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -7988,7 +7761,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "mpaa_rating", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8002,7 +7774,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "rating", - "schema": undefined, + "schema": "public", "table": "film", }, "subType": "mpaa_rating", @@ -8013,15 +7785,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "actors", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -8058,7 +7828,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 8, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8070,6 +7839,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -8093,7 +7863,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 25, "name": "category", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 25, "character_octet_length": 100, @@ -8130,7 +7899,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 1, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8144,7 +7912,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "name", - "schema": undefined, + "schema": "public", "table": "category", }, "subType": "varchar", @@ -8155,15 +7923,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "total_sales", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -8200,7 +7966,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 10, "numeric_scale": null, "ordinal_position": 2, - "regtype": "numeric", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8212,6 +7977,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "numeric", "tags": {}, "type": "numeric", @@ -8227,15 +7993,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "store", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -8272,7 +8036,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 1, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8284,6 +8047,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -8292,15 +8056,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "manager", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -8337,7 +8099,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8349,6 +8110,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -8357,15 +8119,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "total_sales", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -8402,7 +8162,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 10, "numeric_scale": null, "ordinal_position": 3, - "regtype": "numeric", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8414,6 +8173,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "numeric", "tags": {}, "type": "numeric", @@ -8442,7 +8202,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "id", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -8479,7 +8238,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 1, - "regtype": "integer", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8493,7 +8251,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "staff_id", - "schema": undefined, + "schema": "public", "table": "staff", }, "subType": "int4", @@ -8504,15 +8262,13 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "comment": undefined, "defaultValue": null, "generated": "NEVER", - "indices": [], "isArray": false, "isIdentity": false, - "isPrimary": false, + "isPrimary": undefined, "isUpdatable": false, "maxLength": null, "name": "name", - "nullable": true, - "parent": undefined, + "nullable": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": 1073741824, @@ -8549,7 +8305,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 2, - "regtype": "text", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8561,6 +8316,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "udt_schema": "pg_catalog", }, "reference": undefined, + "source": null, "subType": "text", "tags": {}, "type": "text", @@ -8577,7 +8333,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "address", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -8614,7 +8369,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 3, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8628,7 +8382,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "address", - "schema": undefined, + "schema": "public", "table": "address", }, "subType": "varchar", @@ -8647,7 +8401,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 10, "name": "zip code", "nullable": true, - "parent": undefined, "rawInfo": { "character_maximum_length": 10, "character_octet_length": 40, @@ -8684,7 +8437,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 4, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8698,7 +8450,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "postal_code", - "schema": undefined, + "schema": "public", "table": "address", }, "subType": "varchar", @@ -8717,7 +8469,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 20, "name": "phone", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 20, "character_octet_length": 80, @@ -8754,7 +8505,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 5, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8768,7 +8518,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "phone", - "schema": undefined, + "schema": "public", "table": "address", }, "subType": "varchar", @@ -8787,7 +8537,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "city", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -8824,7 +8573,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 6, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8838,7 +8586,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "city", - "schema": undefined, + "schema": "public", "table": "city", }, "subType": "varchar", @@ -8857,7 +8605,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": 50, "name": "country", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": 50, "character_octet_length": 200, @@ -8894,7 +8641,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": null, "numeric_scale": null, "ordinal_position": 7, - "regtype": "character varying", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8908,7 +8654,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "country", - "schema": undefined, + "schema": "public", "table": "country", }, "subType": "varchar", @@ -8927,7 +8673,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "maxLength": null, "name": "sid", "nullable": false, - "parent": undefined, "rawInfo": { "character_maximum_length": null, "character_octet_length": null, @@ -8964,7 +8709,6 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "numeric_precision_radix": 2, "numeric_scale": 0, "ordinal_position": 8, - "regtype": "smallint", "scope_catalog": null, "scope_name": null, "scope_schema": null, @@ -8978,7 +8722,7 @@ exports[`extractSchema > dvd-rental database > Should match snapshot 1`] = ` "reference": undefined, "source": { "column": "store_id", - "schema": undefined, + "schema": "public", "table": "staff", }, "subType": "int2", diff --git a/src/integration-tests/index.test.js b/src/deprecatia/integration-tests/index.test.js similarity index 97% rename from src/integration-tests/index.test.js rename to src/deprecatia/integration-tests/index.test.js index 6569ea2a..354bbc6e 100644 --- a/src/integration-tests/index.test.js +++ b/src/deprecatia/integration-tests/index.test.js @@ -73,9 +73,9 @@ describe('extractSchema', () => { 'CREATE VIEW some_schema.default_view AS select * from some_schema.default_table' ); - await setupDB.schema.raw( - 'CREATE MATERIALIZED VIEW some_schema.default_matview AS select * from some_schema.default_table' - ); + // await setupDB.schema.raw( + // 'CREATE MATERIALIZED VIEW some_schema.default_matview AS select * from some_schema.default_table' + // ); await setupDB.schema.createSchemaIfNotExists('not_default'); await setupDB.schema.raw( @@ -117,7 +117,7 @@ describe('extractSchema', () => { expect(extracted.tables).toHaveLength(1); expect(extracted.tables[0].name).toBe('default_table'); - expect(extracted.views).toHaveLength(2); + expect(extracted.views).toHaveLength(1); const extractedViewNames = extracted.views.map((view) => view.name); expect(extractedViewNames).toContain('default_view'); diff --git a/src/extract-attributes.js b/src/extract-attributes.js deleted file mode 100644 index 86f9f355..00000000 --- a/src/extract-attributes.js +++ /dev/null @@ -1,56 +0,0 @@ -import * as R from 'ramda'; - -import parseComment from './parse-comment'; - -/** - * @typedef {{ name: string, maxLength: number, nullable: boolean, defaultValue: any, type: string, comment: string, tags: TagMap, rawInfo: object }} Attribute - */ - -/** - * @param {string} schemaName - * @param {string} typeName - * @param {import('knex').Knex} db - * @returns {Promise} - */ -async function extractAttributes(schemaName, typeName, db) { - const dbAttributes = await db - .select( - db.raw( - `*, ('"' || "attribute_udt_schema" || '"."' || "attribute_udt_name" || '"')::regtype as regtype` - ) - ) - .from('information_schema.attributes') - .where('udt_schema', schemaName) - .where('udt_name', typeName); - - const commentsQuery = await db.schema.raw(` - SELECT cols.attribute_name, pg_catalog.col_description(c.oid, cols.ordinal_position::int) - FROM pg_catalog.pg_class c, information_schema.attributes cols - WHERE cols.udt_schema = '${schemaName}' AND cols.udt_name = '${typeName}' AND cols.udt_name = c.relname; - `); - const commentMap = R.pluck( - 'col_description', - R.indexBy(R.prop('attribute_name'), commentsQuery.rows) - ); - - const attributes = R.map( - /** @returns {Attribute} */ - (attribute) => ({ - name: attribute.attribute_name, - maxLength: attribute.character_maximum_length, - nullable: attribute.is_nullable === 'YES', - defaultValue: attribute.attribute_default, - type: - attribute.data_type === 'ARRAY' - ? attribute.regtype - : attribute.attribute_udt_name, - ...parseComment(commentMap[attribute.attribute_name]), - rawInfo: attribute, - }), - dbAttributes - ); - - return attributes; -} - -export default extractAttributes; diff --git a/src/extract-columns.js b/src/extract-columns.js deleted file mode 100644 index 65c2f815..00000000 --- a/src/extract-columns.js +++ /dev/null @@ -1,157 +0,0 @@ -import * as R from 'ramda'; - -import parseComment from './parse-comment'; - -/** - * @typedef {{ name: string, isPrimary: boolean }} Index - * @typedef {{ [index: string]: string | boolean }} TagMap - * @typedef {{ name: string, parent: string, indices: Index[], maxLength: number, nullable: boolean, defaultValue: any, isPrimary: boolean, type: string, comment: string, tags: TagMap, rawInfo: object }} Column - */ - -/** - * @param {string} schemaName - * @param {string} tableOrViewName - * @param {import('knex').Knex} db - * @returns {Promise} - */ -async function extractColumns(schemaName, tableOrViewName, db) { - const dbColumns = await db - .select( - db.raw( - `*, ('"' || "udt_schema" || '"."' || "udt_name" || '"')::regtype as regtype` - ) - ) - .from('information_schema.columns') - .where('table_schema', schemaName) - .where('table_name', tableOrViewName); - const relationsQuery = await db.schema.raw(` -SELECT - att2.attname AS "column_name", - con.confrelid :: regclass :: text as table_path, - att.attname as column, - con.confupdtype, - con.confdeltype, - concat_ws('.', cl.relname, att.attname) AS "parent" -FROM - ( - SELECT - unnest(con1.conkey) AS "parent", - unnest(con1.confkey) AS "child", - con1.confrelid, - con1.conrelid, - con1.conname, - con1.confupdtype, - con1.confdeltype - FROM - pg_class cl - JOIN pg_namespace ns ON cl.relnamespace = ns.oid - JOIN pg_constraint con1 ON con1.conrelid = cl.oid - WHERE - cl.relname = '${tableOrViewName}' - AND ns.nspname = '${schemaName}' - AND con1.contype = 'f' - ) con - JOIN pg_attribute att ON att.attrelid = con.confrelid - AND att.attnum = con.child - JOIN pg_class cl ON cl.oid = con.confrelid - JOIN pg_attribute att2 ON att2.attrelid = con.conrelid - AND att2.attnum = con.parent - where cl.relispartition = false; - `); - const relationsMap = R.indexBy(R.prop('column_name'), relationsQuery.rows); - const parentMap = R.pluck('parent', relationsMap); - const referenceMap = R.map( - ({ table_path, column, confupdtype, confdeltype }) => { - let schema = schemaName; - let table = table_path; - if (table.indexOf('.') !== -1) { - [schema, table] = table.split('.'); - } - - const updateActionMap = { - a: 'NO ACTION', - r: 'RESTRICT', - c: 'CASCADE', - n: 'SET NULL', - d: 'SET DEFAULT', - }; - - const trim = (s) => s.replace(/^"(.*)"$/, '$1'); - - return { - schema: trim(schema), - table: trim(table), - column: trim(column), - onDelete: updateActionMap[confupdtype], - onUpdate: updateActionMap[confdeltype], - }; - }, - relationsMap - ); - - const indexQuery = await db.schema.raw(` - SELECT i.relname as index_name, ix.indisprimary as is_primary, a.attname as column_name - FROM pg_class t, pg_class i, pg_index ix, pg_attribute a - WHERE - t.oid = ix.indrelid and i.oid = ix.indexrelid - and a.attrelid = t.oid and a.attnum = ANY(ix.indkey) - and t.relkind = 'r' and t.relname = '${tableOrViewName}' - ORDER BY t.relname, i.relname; - `); - const indexMap = R.reduce( - (acc, elem) => { - const columnName = elem['column_name']; - acc[columnName] = [ - ...(acc[columnName] || []), - { name: elem.index_name, isPrimary: elem.is_primary }, - ]; - return acc; - }, - {}, - indexQuery.rows - ); - const commentsQuery = await db.schema.raw(` - SELECT cols.column_name, pg_catalog.col_description(c.oid, cols.ordinal_position::int) - FROM pg_catalog.pg_class c, information_schema.columns cols - WHERE cols.table_schema = '${schemaName}' AND cols.table_name = '${tableOrViewName}' AND cols.table_name = c.relname; - `); - const commentMap = R.pluck( - 'col_description', - R.indexBy(R.prop('column_name'), commentsQuery.rows) - ); - - const columns = R.map( - /** @returns {Column} */ - (column) => ({ - name: column.column_name, - parent: parentMap[column.column_name], - reference: referenceMap[column.column_name], - indices: indexMap[column.column_name] || [], - maxLength: column.character_maximum_length, - nullable: column.is_nullable === 'YES', - defaultValue: column.column_default, - isArray: column.data_type === 'ARRAY', - subType: - column.data_type === 'ARRAY' - ? column.udt_name.slice(1) - : column.udt_name, - isPrimary: Boolean( - R.find(R.prop('isPrimary'), indexMap[column.column_name] || []) - ), - isIdentity: column.is_identity === 'YES', - generated: - column.is_identity === 'YES' - ? column.identity_generation - : column.is_generated, - isUpdatable: column.is_updatable === 'YES', - type: column.data_type === 'ARRAY' ? column.regtype : column.udt_name, - ...parseComment(commentMap[column.column_name]), - rawInfo: column, - }), - dbColumns - ); - - return columns; -} - -export default extractColumns; diff --git a/src/extract-schema.ts b/src/extract-schema.ts deleted file mode 100644 index c6edbfea..00000000 --- a/src/extract-schema.ts +++ /dev/null @@ -1,37 +0,0 @@ -import knex, { Knex } from 'knex'; -import { ConnectionConfig } from 'pg'; -import * as R from 'ramda'; - -import extractTables from './extract-tables'; -import extractTypes from './extract-types'; -import extractViews from './extract-views'; -import resolveViewColumns from './resolve-view-columns'; -import { Schema } from './types'; - -async function extractSchema( - schemaName: string, - connectionConfig: string | ConnectionConfig, - resolveViews: boolean, - tables?: string[] -): Promise { - const connection = connectionConfig as string | Knex.PgConnectionConfig; - const db = knex({ client: 'postgres', connection }); - - const extractedTables = await extractTables(schemaName, db, tables); - const rawViews = await extractViews(schemaName, db); - const types = await extractTypes(schemaName, db); - - const views = resolveViews - ? resolveViewColumns(rawViews, extractedTables, schemaName) - : rawViews; - - await db.destroy(); - - return { - tables: R.sortBy(R.prop('name'), extractedTables), - views: R.sortBy(R.prop('name'), views), - types: R.sortBy(R.prop('name'), types), - }; -} - -export default extractSchema; diff --git a/src/extract-tables.js b/src/extract-tables.js deleted file mode 100644 index 5e54d76e..00000000 --- a/src/extract-tables.js +++ /dev/null @@ -1,48 +0,0 @@ -import extractColumns from './extract-columns'; -import parseComment from './parse-comment'; - -/** - * @param {string} schemaName - * @param {import('knex').Knex} db - * @param {string[]} tables - * @returns {Promise} - */ -async function extractTables(schemaName, db, tables = []) { - /** @type {import('./types').TableOrView[]} */ - const extractedTables = []; - // Exclude partition tables - const dbTables = await db - .select('tablename') - .distinct() - .from('pg_catalog.pg_tables') - .join('pg_catalog.pg_class', 'tablename', '=', 'pg_class.relname') - .where('schemaname', schemaName) - .andWhere('relispartition', '=', false) - .modify((q) => { - if (!tables.length) return; - - q.whereIn('tablename', tables); - }); - - for (const table of dbTables) { - const tableName = table.tablename; - const tableCommentQuery = await db.schema.raw( - `SELECT obj_description('"${schemaName}"."${tableName}"'::regclass)` - ); - const rawTableComment = - tableCommentQuery.rows.length > 0 && - tableCommentQuery.rows[0].obj_description; - - const columns = await extractColumns(schemaName, tableName, db); - - extractedTables.push({ - name: tableName, - ...parseComment(rawTableComment), - columns, - }); - } - - return extractedTables; -} - -export default extractTables; diff --git a/src/extract-types.js b/src/extract-types.js deleted file mode 100644 index ac19027c..00000000 --- a/src/extract-types.js +++ /dev/null @@ -1,96 +0,0 @@ -import * as R from 'ramda'; - -import extractAttributes from './extract-attributes'; -import parseComment from './parse-comment'; - -/** - * @param {string | undefined} schemaName Name of the schema or `undefined` to - * extract types from all schemas. - * @param {import('knex').Knex} db - * @returns {Promise} - */ -async function extractTypes(schemaName, db) { - // PG Extensions can add types to the schema. We probably don't want to - // include those, so filter them out. Todo: should this be optional? - const extensionTypes = await db - .select(['t.oid']) - .from('pg_extension as e') - .join('pg_depend as d', 'd.refobjid', 'e.oid') - .join('pg_type as t', 't.oid', 'd.objid') - .join('pg_namespace as ns', 'ns.oid', 'e.extnamespace') - .where('d.deptype', 'e'); - const extensionTypeOids = extensionTypes.map(({ oid }) => oid); - - /** @type {import('./types').Type[]} */ - const types = []; - const enumsQuery = db - .select(['t.oid', 't.typname']) - .from('pg_type as t') - .join('pg_namespace as n', 'n.oid', 't.typnamespace') - .where('t.typtype', 'e') - .andWhere('t.oid', 'not in', extensionTypeOids); - if (schemaName) { - enumsQuery.andWhere('n.nspname', schemaName); - } - const enumTypes = await enumsQuery; - for (const enumType of enumTypes) { - const rawTypeComment = await getTypeRawComment(enumType.oid, db); - const values = await db - .select(['enumlabel', 'enumsortorder']) - .from('pg_enum') - .where('enumtypid', enumType.oid); - types.push({ - type: 'enum', - name: enumType.typname, - ...parseComment(rawTypeComment), - values: R.pluck('enumlabel', R.sortBy(R.prop('enumsortorder'), values)), - }); - } - - const compositeTypesQuery = db - .select(['t.oid', 't.typname']) - .from('pg_type as t') - .join('pg_namespace as n', 'n.oid', 't.typnamespace') - .join('pg_class as c', 'c.reltype', 't.oid') - .where('t.typtype', 'c') - .andWhere('c.relkind', 'c') - .andWhere('t.oid', 'not in', extensionTypeOids); - if (schemaName) { - compositeTypesQuery.andWhere('n.nspname', schemaName); - } - const compositeTypes = await compositeTypesQuery; - for (const compositeType of compositeTypes) { - const rawTypeComment = await getTypeRawComment(compositeType.oid, db); - const attributes = await extractAttributes( - schemaName, - compositeType.typname, - db - ); - - types.push({ - type: 'composite', - name: compositeType.typname, - ...parseComment(rawTypeComment), - attributes, - }); - } - - return types; -} - -/** - * @param oid: number - * @param {Knex} db - * @return {Promise} - */ -async function getTypeRawComment(oid, db) { - const typeCommentQuery = await db.schema.raw( - `SELECT obj_description(${oid})` - ); - const rawTypeComment = - typeCommentQuery.rows.length > 0 && - typeCommentQuery.rows[0].obj_description; - return rawTypeComment; -} - -export default extractTypes; diff --git a/src/extract-views.js b/src/extract-views.js deleted file mode 100644 index c9ee1444..00000000 --- a/src/extract-views.js +++ /dev/null @@ -1,71 +0,0 @@ -import extractColumns from './extract-columns'; -import parseComment from './parse-comment'; -import parseViewDefinition from './parse-view-definition'; - -/** - * @param {string} schemaName - * @param {import('knex').Knex} db - * @returns {Promise} - */ -async function extractViews(schemaName, db) { - /** @type {import('./types').TableOrView[]} */ - const views = []; - const [dbViews, dbMaterializedViews] = await Promise.all([ - db - .select('viewname') - .from('pg_catalog.pg_views') - .where('schemaname', schemaName), - db - .select('matviewname') - .from('pg_catalog.pg_matviews') - .where('schemaname', schemaName), - ]); - - const dbViewNames = [ - ...dbViews.map(({ viewname }) => viewname), - ...dbMaterializedViews.map(({ matviewname }) => matviewname), - ]; - - for (const name of dbViewNames) { - const viewCommentQuery = await db.schema.raw( - `SELECT obj_description('"${schemaName}"."${name}"'::regclass)` - ); - const rawViewComment = - viewCommentQuery.rows.length > 0 && - viewCommentQuery.rows[0].obj_description; - - const columns = await extractColumns(schemaName, name, db); - - const { comment, tags } = parseComment(rawViewComment); - - try { - const viewDefinitionQuery = await db.schema.raw( - `select pg_get_viewdef('"${schemaName}"."${name}"', true)` - ); - const viewDefinitionString = viewDefinitionQuery.rows[0].pg_get_viewdef; - const originalColumns = await parseViewDefinition(viewDefinitionString); - - originalColumns.forEach(({ name, schema, table, column }) => { - if (!table || !column) { - return; - } - const col = columns.find((c) => c.name === name); - col.source = { schema, table, column }; - }); - } catch (error) { - console.warn( - `Error parsing view definition for "${name}". Falling back to raw data` - ); - } - - views.push({ - name, - comment, - tags, - columns, - }); - } - return views; -} - -export default extractViews; diff --git a/src/extractSchemas.ts b/src/extractSchemas.ts new file mode 100644 index 00000000..90d33a03 --- /dev/null +++ b/src/extractSchemas.ts @@ -0,0 +1,181 @@ +import knex, { Knex } from 'knex'; +import { ConnectionConfig } from 'pg'; +import * as R from 'ramda'; + +import extractCompositeType, { + CompositeTypeDetails, +} from './kinds/extractCompositeType'; +import extractDomain, { DomainDetails } from './kinds/extractDomain'; +import extractEnum, { EnumDetails } from './kinds/extractEnum'; +import extractMaterializedView, { + MaterializedViewDetails, +} from './kinds/extractMaterializedView'; +import extractRange, { RangeDetails } from './kinds/extractRange'; +import extractTable, { TableDetails } from './kinds/extractTable'; +import extractView, { ViewDetails } from './kinds/extractView'; +import fetchTypes from './kinds/fetchTypes'; +import PgType, { Kind } from './kinds/PgType'; +import resolveViewColumns from './resolveViewColumns'; + +interface DetailsMap { + domain: DomainDetails; + enum: EnumDetails; + range: RangeDetails; + table: TableDetails; + materializedView: MaterializedViewDetails; + view: ViewDetails; + compositeType: CompositeTypeDetails; +} + +/** + * extractSchemas generates a record of all the schemas extracted, indexed by schema name. + * The schemas are instances of this type. + */ +export type Schema = { + name: string; + domains: DomainDetails[]; + enums: EnumDetails[]; + ranges: RangeDetails[]; + tables: TableDetails[]; + views: ViewDetails[]; + materializedViews: MaterializedViewDetails[]; + compositeTypes: CompositeTypeDetails[]; +}; + +const emptySchema: Omit = { + domains: [], + enums: [], + ranges: [], + tables: [], + views: [], + materializedViews: [], + compositeTypes: [], +}; + +type Populator = ( + db: Knex, + pgType: PgType +) => Promise; + +// @ts-ignore Why is this broken? I don't understand. :-/ +const populatorMap: Record = { + domain: extractDomain, + enum: extractEnum, + range: extractRange, + + table: extractTable, + view: extractView, + materializedView: extractMaterializedView, + compositeType: extractCompositeType, +} as const; + +/** + * This is the options object that can be passed to `extractSchemas`. + * @see extractSchemas + */ +export interface ExtractSchemaOptions { + /** + * Will contain an array of schema names to extract. + * If undefined, all non-system schemas will be extracted. + */ + schemas?: string[]; + + /** + * Filter function that you can use if you want to exclude + * certain items from the schemas. + */ + typeFilter?: (pgType: PgType) => boolean; + + /** + * extractShemas will always attempt to parse view definitions to + * discover the "source" of each column, i.e. the table or view that it + * is derived from. + * If this option is set to `true`, it will attempt to follow this + * source and copy values like indices, isNullable, etc. + * so that the view data is closer to what the database reflects. + */ + resolveViews?: boolean; + + /** + * Called with the number of types to extract. + */ + onProgressStart?: (total: number) => void; + + /** + * Called once for each type that is extracted. + */ + onProgress?: () => void; + + /** + * Called when all types have been extracted. + */ + onProgressEnd?: () => void; +} + +/** + * Perform the extraction + * @param connectionConfig - Connection string or configuration object for Postgres connection + * @param options - Optional options + * @returns A record of all the schemas extracted, indexed by schema name. + */ +async function extractSchemas( + connectionConfig: string | ConnectionConfig, + options?: ExtractSchemaOptions +): Promise> { + const connection = connectionConfig as string | Knex.PgConnectionConfig; + const db = knex({ client: 'postgres', connection }); + + const q = await db + .select<{ nspname: string }[]>('nspname') + .from('pg_catalog.pg_namespace') + .whereNot('nspname', '=', 'information_schema') + .whereNot('nspname', 'LIKE', 'pg_%'); + const allSchemaNames = R.pluck('nspname', q); + + const schemaNames = options?.schemas ?? allSchemaNames; + if (options?.schemas) { + const missingSchemas = schemaNames.filter( + (schemaName) => !allSchemaNames.includes(schemaName) + ); + + if (missingSchemas.length > 0) { + throw new Error(`No schemas found for ${missingSchemas.join(', ')}`); + } + } + + const pgTypes = await fetchTypes(db, schemaNames); + + const typesToExtract = options?.typeFilter + ? pgTypes.filter(options.typeFilter) + : pgTypes; + + if (options?.onProgressStart) { + options.onProgressStart(typesToExtract.length); + } + + const populated = await Promise.all( + typesToExtract.map(async (pgType) => populatorMap[pgType.kind](db, pgType)) + ); + + const schemas: Record = {}; + populated.forEach((p) => { + if (!(p.schemaName in schemas)) { + schemas[p.schemaName] = { + name: p.schemaName, + ...emptySchema, + }; + } + // @ts-ignore + schemas[p.schemaName][`${p.kind}s`] = [ + ...schemas[p.schemaName][`${p.kind}s`], + p, + ]; + }); + + const result = options?.resolveViews ? resolveViewColumns(schemas) : schemas; + + await db.destroy(); + return result; +} + +export default extractSchemas; diff --git a/src/fetchExtensionItemIds.test.ts b/src/fetchExtensionItemIds.test.ts new file mode 100644 index 00000000..d88e22b3 --- /dev/null +++ b/src/fetchExtensionItemIds.test.ts @@ -0,0 +1,59 @@ +import { expect, it } from 'vitest'; + +import fetchExtensionItemIds from './fetchExtensionItemIds'; +import { describe } from './tests/fixture'; +import useSchema from './tests/useSchema'; +import useTestKnex from './tests/useTestKnex'; + +describe('fetchExtensionItemIds', () => { + const [getKnex] = useTestKnex(); + useSchema(getKnex, 'test'); + + // NOTE: be aware that this test depends on specifics of certain Postgres extensions. + // If it fails there is a chance that it's because the extensions themselves have changed, + // not necessarily the test. + it('should fetch extension item ids', async () => { + const db = getKnex(); + + await db.raw('create extension if not exists pg_trgm'); + await db.raw('create extension if not exists pg_stat_statements'); + await db.raw('create extension if not exists citext'); + + const r = await fetchExtensionItemIds(db); + + const classes = []; + for (const extClassOid of r.extClassOids) { + const c = await db.raw( + `select * from pg_catalog.pg_class where oid = ${extClassOid}` + ); + classes.push(c.rows[0].relname); + } + expect(classes).toContain('pg_stat_statements_info'); + expect(classes).toContain('pg_stat_statements'); + + const types = []; + for (const extTypeOid of r.extTypeOids) { + const c = await db.raw( + `select * from pg_catalog.pg_type where oid = ${extTypeOid}` + ); + types.push(c.rows[0].typname); + } + expect(types).toContain('gtrgm'); + expect(types).toContain('citext'); + + const procs = []; + for (const extProcOid of r.extProcOids) { + const c = await db.raw( + `select * from pg_catalog.pg_proc where oid = ${extProcOid}` + ); + procs.push(c.rows[0].proname); + } + expect(procs).toContain('pg_stat_statements_info'); + expect(procs).toContain('gtrgm_in'); + expect(procs).toContain('citextin'); + + await db.raw('drop extension pg_trgm'); + await db.raw('drop extension pg_stat_statements'); + await db.raw('drop extension citext'); + }); +}); diff --git a/src/fetchExtensionItemIds.ts b/src/fetchExtensionItemIds.ts new file mode 100644 index 00000000..35929f8d --- /dev/null +++ b/src/fetchExtensionItemIds.ts @@ -0,0 +1,41 @@ +import { Knex } from 'knex'; + +/** + * In order to ignore the items (types, views, etc.) that belong to extensions, + * we use these queries to figure out what the OID's of those are. We can then + * ignore them in fetchClasses. + * @param db Knex instance + * @returns the oids of the Postgres extension classes and types + */ +const fetchExtensionItemIds = async (db: Knex) => { + const cq = await db + .select('c.oid') + .from('pg_extension as e') + .join('pg_depend as d', 'd.refobjid', 'e.oid') + .join('pg_class as c', 'c.oid', 'd.objid') + .join('pg_namespace as ns', 'ns.oid', 'e.extnamespace') + .where('d.deptype', 'e'); + const extClassOids = cq.map(({ oid }) => oid); + + const tq = await db + .select('t.oid') + .from('pg_extension as e') + .join('pg_depend as d', 'd.refobjid', 'e.oid') + .join('pg_type as t', 't.oid', 'd.objid') + .join('pg_namespace as ns', 'ns.oid', 'e.extnamespace') + .where('d.deptype', 'e'); + const extTypeOids = tq.map(({ oid }) => oid); + + const rq = await db + .select('p.oid') + .from('pg_extension as e') + .join('pg_depend as d', 'd.refobjid', 'e.oid') + .join('pg_proc as p', 'p.oid', 'd.objid') + .join('pg_namespace as ns', 'ns.oid', 'e.extnamespace') + .where('d.deptype', 'e'); + const extProcOids = rq.map(({ oid }) => oid); + + return { extClassOids, extTypeOids, extProcOids }; +}; + +export default fetchExtensionItemIds; diff --git a/src/index.ts b/src/index.ts index b0117265..693f607b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,39 @@ -export { default as extractSchema } from './extract-schema'; -export * from './types'; +export { default as extractSchema } from './deprecatia/extract-schema'; +export { + ExtractSchemaOptions, + default as extractSchemas, + Schema, +} from './extractSchemas'; +export { type default as InformationSchemaColumn } from './information_schema/InformationSchemaColumn'; +export { type default as InformationSchemaDomain } from './information_schema/InformationSchemaDomain'; +export { type default as InformationSchemaTable } from './information_schema/InformationSchemaTable'; +export { type default as InformationSchemaView } from './information_schema/InformationSchemaView'; +export { type default as YesNo } from './information_schema/YesNo'; +export { + type AttributeType, + type CompositeTypeAttribute, + type CompositeTypeDetails, +} from './kinds/extractCompositeType'; +export { type DomainDetails } from './kinds/extractDomain'; +export { type EnumDetails } from './kinds/extractEnum'; +export { + type MaterializedViewColumn, + type MaterializedViewColumnType, + type MaterializedViewDetails, +} from './kinds/extractMaterializedView'; +export { type RangeDetails } from './kinds/extractRange'; +export { + type ColumnReference, + type TableColumn, + type TableColumnType, + type TableDetails, + type UpdateAction, + Index, + updateActionMap, +} from './kinds/extractTable'; +export { + type ViewColumn, + type ViewColumnType, + type ViewDetails, +} from './kinds/extractView'; +export { type Kind, type default as PgType } from './kinds/PgType'; diff --git a/src/information_schema/InformationSchemaColumn.ts b/src/information_schema/InformationSchemaColumn.ts new file mode 100644 index 00000000..c7eb3f3f --- /dev/null +++ b/src/information_schema/InformationSchemaColumn.ts @@ -0,0 +1,97 @@ +import YesNo from './YesNo'; + +/** + * The view columns contains information about all table columns (or view columns) in the database. System columns (ctid, etc.) are not included. Only those columns are shown that the current user has access to (by way of being the owner or having some privilege). + */ +interface InformationSchemaColumn { + /** Name of the database containing the table (always the current database) */ + table_catalog: string; + /** Name of the schema containing the table */ + table_schema: string; + /** Name of the table */ + table_name: string; + /** Name of the column */ + column_name: string; + /** Ordinal position of the column within the table (count starts at 1) */ + ordinal_position: number; + /** Default expression of the column */ + column_default: any; + /** YES if the column is possibly nullable, NO if it is known not nullable. A not-null constraint is one way a column can be known not nullable, but there can be others. */ + is_nullable: YesNo; + /** Data type of the column, if it is a built-in type, or ARRAY if it is some array (in that case, see the view element_types), else USER-DEFINED (in that case, the type is identified in udt_name and associated columns). If the column is based on a domain, this column refers to the type underlying the domain (and the domain is identified in domain_name and associated columns). */ + data_type: string; + /** If data_type identifies a character or bit string type, the declared maximum length; null for all other data types or if no maximum length was declared. */ + character_maximum_length: number | null; + /** If data_type identifies a character type, the maximum possible length in octets (bytes) of a datum; null for all other data types. The maximum octet length depends on the declared character maximum length (see above) and the server encoding. */ + character_octet_length: number | null; + /** If data_type identifies a numeric type, this column contains the (declared or implicit) precision of the type for this column. The precision indicates the number of significant digits. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric_precision_radix. For all other data types, this column is null. */ + numeric_precision: number | null; + /** If data_type identifies a numeric type, this column indicates in which base the values in the columns numeric_precision and numeric_scale are expressed. The value is either 2 or 10. For all other data types, this column is null. */ + numeric_precision_radix: number; + /** If data_type identifies an exact numeric type, this column contains the (declared or implicit) scale of the type for this column. The scale indicates the number of significant digits to the right of the decimal point. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric_precision_radix. For all other data types, this column is null. */ + numeric_scale: number | null; + /** If data_type identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this column, that is, the number of decimal digits maintained following the decimal point in the seconds value. For all other data types, this column is null. */ + datetime_precision: number | null; + /** If data_type identifies an interval type, this column contains the specification which fields the intervals include for this column, e.g., YEAR TO MONTH, DAY TO SECOND, etc. If no field restrictions were specified (that is, the interval accepts all fields), and for all other data types, this field is null. */ + interval_type: string | null; + /** Applies to a feature not available in PostgreSQL (see datetime_precision for the fractional seconds precision of interval type columns) */ + interval_precision: number | null; + /** Applies to a feature not available in PostgreSQL */ + character_set_catalog: string | null; + /** Applies to a feature not available in PostgreSQL */ + character_set_schema: string | null; + /** Applies to a feature not available in PostgreSQL */ + character_set_name: string | null; + /** Name of the database containing the collation of the column (always the current database), null if default or the data type of the column is not collatable */ + collation_catalog: string | null; + /** Name of the schema containing the collation of the column, null if default or the data type of the column is not collatable */ + collation_schema: string | null; + /** Name of the collation of the column, null if default or the data type of the column is not collatable */ + collation_name: string | null; + /** If the column has a domain type, the name of the database that the domain is defined in (always the current database), else null. */ + domain_catalog: string | null; + /** If the column has a domain type, the name of the schema that the domain is defined in, else null. */ + domain_schema: string | null; + /** If the column has a domain type, the name of the domain, else null. */ + domain_name: string | null; + /** Name of the database that the column data type (the underlying type of the domain, if applicable) is defined in (always the current database) */ + udt_catalog: string; + /** Name of the schema that the column data type (the underlying type of the domain, if applicable) is defined in */ + udt_schema: string; + /** Name of the column data type (the underlying type of the domain, if applicable) */ + udt_name: string; + /** Applies to a feature not available in PostgreSQL */ + scope_catalog: string | null; + /** Applies to a feature not available in PostgreSQL */ + scope_schema: string | null; + /** Applies to a feature not available in PostgreSQL */ + scope_name: string | null; + /** Always null, because arrays always have unlimited maximum cardinality in PostgreSQL */ + maximum_cardinality: null; + /** An identifier of the data type descriptor of the column, unique among the data type descriptors pertaining to the table. This is mainly useful for joining with other instances of such identifiers. (The specific format of the identifier is not defined and not guaranteed to remain the same in future versions.) */ + dtd_identifier: string; + /** Applies to a feature not available in PostgreSQL */ + is_self_referencing: YesNo; + /** If the column is an identity column, then YES, else NO. */ + is_identity: YesNo; + /** If the column is an identity column, then ALWAYS or BY DEFAULT, reflecting the definition of the column. */ + identity_generation: 'ALWAYS' | 'BY DEFAULT' | null; + /** If the column is an identity column, then the start value of the internal sequence, else null. */ + identity_start: string | null; + /** If the column is an identity column, then the increment of the internal sequence, else null. */ + identity_increment: string | null; + /** If the column is an identity column, then the maximum value of the internal sequence, else null. */ + identity_maximum: string | null; + /** If the column is an identity column, then the minimum value of the internal sequence, else null. */ + identity_minimum: string | null; + /** If the column is an identity column, then YES if the internal sequence cycles or NO if it does not; otherwise null. */ + identity_cycle: string; + /** If the column is a generated column, then ALWAYS, else NEVER. */ + is_generated: 'ALWAYS' | 'NEVER'; + /** If the column is a generated column, then the generation expression, else null. */ + generation_expression: any; + /** YES if the column is updatable, NO if not (Columns in base tables are always updatable, columns in views not necessarily) */ + is_updatable: YesNo; +} + +export default InformationSchemaColumn; diff --git a/src/information_schema/InformationSchemaDomain.ts b/src/information_schema/InformationSchemaDomain.ts new file mode 100644 index 00000000..4311d87f --- /dev/null +++ b/src/information_schema/InformationSchemaDomain.ts @@ -0,0 +1,61 @@ +/** + * The view domains contains all domains defined in the current database. Only those domains are shown that the current user has access to (by way of being the owner or having some privilege). + */ +interface InformationSchemaDomain { + /** Name of the database that contains the domain (always the current database) */ + domain_catalog: string; + /** Name of the schema that contains the domain */ + domain_schema: string; + /** Name of the domain */ + domain_name: string; + /** Data type of the domain, if it is a built-in type, or ARRAY if it is some array (in that case, see the view element_types), else USER-DEFINED (in that case, the type is identified in udt_name and associated columns). */ + data_type: string; + /** If the domain has a character or bit string type, the declared maximum length; null for all other data types or if no maximum length was declared. */ + character_maximum_length: number | null; + /** If the domain has a character type, the maximum possible length in octets (bytes) of a datum; null for all other data types. The maximum octet length depends on the declared character maximum length (see above) and the server encoding. */ + character_octet_length: number | null; + /** Applies to a feature not available in PostgreSQL */ + character_set_catalog: string | null; + /** Applies to a feature not available in PostgreSQL */ + character_set_schema: string | null; + /** Applies to a feature not available in PostgreSQL */ + character_set_name: string | null; + /** Name of the database containing the collation of the domain (always the current database), null if default or the data type of the domain is not collatable */ + collation_catalog: string | null; + /** Name of the schema containing the collation of the domain, null if default or the data type of the domain is not collatable */ + collation_schema: string | null; + /** Name of the collation of the domain, null if default or the data type of the domain is not collatable */ + collation_name: string | null; + /** If the domain has a numeric type, this column contains the (declared or implicit) precision of the type for this domain. The precision indicates the number of significant digits. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric_precision_radix. For all other data types, this column is null. */ + numeric_precision: number | null; + /** If the domain has a numeric type, this column indicates in which base the values in the columns numeric_precision and numeric_scale are expressed. The value is either 2 or 10. For all other data types, this column is null. */ + numeric_precision_radix: number | null; + /** If the domain has an exact numeric type, this column contains the (declared or implicit) scale of the type for this domain. The scale indicates the number of significant digits to the right of the decimal point. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column numeric_precision_radix. For all other data types, this column is null. */ + numeric_scale: number | null; + /** If data_type identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this domain, that is, the number of decimal digits maintained following the decimal point in the seconds value. For all other data types, this column is null. */ + datetime_precision: number | null; + /** If data_type identifies an interval type, this column contains the specification which fields the intervals include for this domain, e.g., YEAR TO MONTH, DAY TO SECOND, etc. If no field restrictions were specified (that is, the interval accepts all fields), and for all other data types, this field is null. */ + interval_type: string | null; + /** Applies to a feature not available in PostgreSQL (see datetime_precision for the fractional seconds precision of interval type domains) */ + interval_precision: number | null; + /** Default expression of the domain */ + domain_default: string | null; + /** Name of the database that the domain data type is defined in (always the current database) */ + udt_catalog: string | null; + /** Name of the schema that the domain data type is defined in */ + udt_schema: string | null; + /** Name of the domain data type */ + udt_name: string | null; + /** Applies to a feature not available in PostgreSQL */ + scope_catalog: string | null; + /** Applies to a feature not available in PostgreSQL */ + scope_schema: string | null; + /** Applies to a feature not available in PostgreSQL */ + scope_name: string | null; + /** Always null, because arrays always have unlimited maximum cardinality in PostgreSQL */ + maximum_cardinality: number | null; + /** An identifier of the data type descriptor of the domain, unique among the data type descriptors pertaining to the domain (which is trivial, because a domain only contains one data type descriptor). This is mainly useful for joining with other instances of such identifiers. (The specific format of the identifier is not defined and not guaranteed to remain the same in future versions.) */ + dtd_identifier: string | null; +} + +export default InformationSchemaDomain; diff --git a/src/information_schema/InformationSchemaTable.ts b/src/information_schema/InformationSchemaTable.ts new file mode 100644 index 00000000..6bfbc20c --- /dev/null +++ b/src/information_schema/InformationSchemaTable.ts @@ -0,0 +1,33 @@ +import YesNo from './YesNo'; + +/** + * The view tables contains all tables and views defined in the current database. Only those tables and views are shown that the current user has access to (by way of being the owner or having some privilege). + */ +interface InformationSchemaTable { + /** Name of the database that contains the table (always the current database) */ + table_catalog: string; + /** Name of the schema that contains the table */ + table_schema: string; + /** Name of the table */ + table_name: string; + /** Type of the table: BASE TABLE for a persistent base table (the normal table type), VIEW for a view, FOREIGN for a foreign table, or LOCAL TEMPORARY for a temporary table */ + table_type: 'BASE TABLE' | 'VIEW' | 'FOREIGN' | 'LOCAL TEMPORARY'; + /** Applies to a feature not available in PostgreSQL */ + self_referencing_column_name: string | null; + /** Applies to a feature not available in PostgreSQL */ + reference_generation: string | null; + /** If the table is a typed table, the name of the database that contains the underlying data type (always the current database), else null. */ + user_defined_type_catalog: string | null; + /** If the table is a typed table, the name of the schema that contains the underlying data type, else null. */ + user_defined_type_schema: string | null; + /** If the table is a typed table, the name of the underlying data type, else null. */ + user_defined_type_name: string | null; + /** YES if the table is insertable into, NO if not (Base tables are always insertable into, views not necessarily.) */ + is_insertable_into: YesNo; + /** YES if the table is a typed table, NO if not */ + is_typed: YesNo; + /** Not yet implemented */ + commit_action: any; +} + +export default InformationSchemaTable; diff --git a/src/information_schema/InformationSchemaView.ts b/src/information_schema/InformationSchemaView.ts new file mode 100644 index 00000000..0dbc8549 --- /dev/null +++ b/src/information_schema/InformationSchemaView.ts @@ -0,0 +1,29 @@ +import YesNo from './YesNo'; + +/** + * The view tables contains all tables and views defined in the current database. Only those tables and views are shown that the current user has access to (by way of being the owner or having some privilege). + */ +interface InformationSchemaView { + /** Name of the database that contains the table (always the current database) */ + table_catalog: string; + /** Name of the schema that contains the table */ + table_schema: string; + /** Name of the table */ + table_name: string; + /** Query expression defining the view (null if the view is not owned by a currently enabled role) */ + view_definition: string; + /** CASCADED or LOCAL if the view has a CHECK OPTION defined on it, NONE if not */ + check_option: 'CASCADED' | 'LOCAL' | 'NONE'; + /** ES if the view is updatable (allows UPDATE and DELETE), NO if not */ + is_updatable: YesNo; + /** YES if the table is insertable into, NO if not (Base tables are always insertable into, views not necessarily.) */ + is_insertable_into: YesNo; + /** YES if the view has an INSTEAD OF UPDATE trigger defined on it, NO if not */ + is_trigger_updatable: YesNo; + /** YES if the view has an INSTEAD OF DELETE trigger defined on it, NO if not */ + is_trigger_deletable: YesNo; + /** YES if the view has an INSTEAD OF INSERT trigger defined on it, NO if not */ + is_trigger_insertable_into: YesNo; +} + +export default InformationSchemaView; diff --git a/src/information_schema/YesNo.ts b/src/information_schema/YesNo.ts new file mode 100644 index 00000000..104ff4cc --- /dev/null +++ b/src/information_schema/YesNo.ts @@ -0,0 +1,3 @@ +type YesNo = 'YES' | 'NO'; + +export default YesNo; diff --git a/src/kinds/PgType.ts b/src/kinds/PgType.ts new file mode 100644 index 00000000..ecfe95c9 --- /dev/null +++ b/src/kinds/PgType.ts @@ -0,0 +1,51 @@ +export const typeKindMap = { + d: 'domain', + e: 'enum', + r: 'range', + + // Not supported (yet): + // m: 'multiRange', + // b: 'base', + // p: 'pseudo', + + // c: 'composite', -- is also a class, handled below. +} as const; +type TypeKind = typeof typeKindMap[keyof typeof typeKindMap]; + +export const classKindMap = { + r: 'table', + p: 'table', // Treat partitioned tables as tables + v: 'view', + m: 'materializedView', + c: 'compositeType', + + // Not supported (yet): + // i: 'index', + // S: 'sequence', + // t: 'toastTable', + // f: 'foreignTable', + // I: 'partitionedIndex', +} as const; +type ClassKind = typeof classKindMap[keyof typeof classKindMap]; + +// Routines are not supported yet. +// export const routineKindMap = { +// p: 'procedure', +// f: 'function', +// a: 'aggregate', + +// // Not supported (yet): +// // w: 'windowFunction', +// }; +// type RoutineKind = typeof routineKindMap[keyof typeof routineKindMap]; + +export type Kind = TypeKind | ClassKind; // | RoutineKind; + +type PgType = { + name: string; + schemaName: string; + kind: K; + comment: string | null; +}; + +export default PgType; diff --git a/src/kinds/extractCompositeType.test.ts b/src/kinds/extractCompositeType.test.ts new file mode 100644 index 00000000..3186299f --- /dev/null +++ b/src/kinds/extractCompositeType.test.ts @@ -0,0 +1,221 @@ +import * as R from 'ramda'; + +import { describe, expect, it } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import extractCompositeType, { + CompositeTypeAttribute, + CompositeTypeDetails, +} from './extractCompositeType'; +import PgType from './PgType'; + +const makePgType = ( + name: string, + schemaName: string = 'test' +): PgType<'compositeType'> => ({ + schemaName, + name, + kind: 'compositeType', + comment: null, +}); + +describe('extractCompositeType', () => { + const [getKnex, databaseName] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should extract simplified information', async () => { + const db = getKnex(); + await db.raw('create type test.some_composite_type as (id integer)'); + + const result = await extractCompositeType( + db, + makePgType('some_composite_type') + ); + + const expected: CompositeTypeDetails = { + name: 'some_composite_type', + schemaName: 'test', + kind: 'compositeType', + comment: null, + attributes: [ + { + name: 'id', + expandedType: 'pg_catalog.int4', + isArray: false, + type: { + fullName: 'pg_catalog.int4', + kind: 'base', + }, + comment: null, + maxLength: null, + defaultValue: null, + isNullable: true, + isIdentity: false, + isUpdatable: false, + ordinalPosition: 1, + generated: 'NEVER', + fakeInformationSchemaValue: { + table_catalog: databaseName, + table_schema: 'test', + table_name: 'some_composite_type', + column_name: 'id', + ordinal_position: 1, + column_default: null, + is_nullable: 'YES', + data_type: 'integer', + character_maximum_length: null, + character_octet_length: null, + numeric_precision: 32, + numeric_precision_radix: 2, + numeric_scale: 0, + datetime_precision: null, + interval_type: null, + interval_precision: null, + character_set_catalog: null, + character_set_schema: null, + character_set_name: null, + collation_catalog: null, + collation_schema: null, + collation_name: null, + domain_catalog: null, + domain_schema: null, + domain_name: null, + udt_catalog: databaseName, + udt_schema: 'pg_catalog', + udt_name: 'int4', + scope_catalog: null, + scope_schema: null, + scope_name: null, + maximum_cardinality: null, + dtd_identifier: '1', + is_self_referencing: 'NO', + is_identity: 'NO', + identity_generation: null, + identity_start: null, + identity_increment: null, + identity_maximum: null, + identity_minimum: null, + identity_cycle: 'NO', + is_generated: 'NEVER', + generation_expression: null, + is_updatable: 'NO', + }, + }, + ], + }; + + expect(result).toStrictEqual(expected); + }); + + it('should fetch column comments', async () => { + const db = getKnex(); + await db.raw( + 'create type test.some_composite_type as (id integer, name text)' + ); + await db.raw( + "comment on column test.some_composite_type.id is 'id column'" + ); + + const result = await extractCompositeType( + db, + makePgType('some_composite_type') + ); + + expect(result.attributes[0].comment).toBe('id column'); + }); + + it('should handle domains, composite types, ranges and enums as well as arrays of those', async () => { + const db = getKnex(); + await db.raw('create domain test.some_domain as text'); + await db.raw('create type test.some_composite as (id integer, name text)'); + await db.raw('create type test.some_range as range(subtype=timestamptz)'); + await db.raw("create type test.some_enum as enum ('a', 'b', 'c')"); + + await db.raw( + `create type test.some_composite_type as ( + d test.some_domain, + c test.some_composite, + r test.some_range, + e test.some_enum, + d_a test.some_domain[], + c_a test.some_composite[], + r_a test.some_range[], + e_a test.some_enum[] + )` + ); + + const result = await extractCompositeType( + db, + makePgType('some_composite_type') + ); + const actual = R.map( + R.pick(['name', 'expandedType', 'type', 'isArray']), + result.attributes + ); + + const expected: Partial[] = [ + { + name: 'd', + expandedType: 'test.some_domain', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + isArray: false, + }, + { + name: 'c', + expandedType: 'test.some_composite', + type: { fullName: 'test.some_composite', kind: 'composite' }, + isArray: false, + }, + { + name: 'r', + expandedType: 'test.some_range', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + isArray: false, + }, + { + name: 'e', + expandedType: 'test.some_enum', + type: { fullName: 'test.some_enum', kind: 'enum' }, + isArray: false, + }, + { + name: 'd_a', + expandedType: 'test.some_domain[]', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + isArray: true, + }, + { + name: 'c_a', + expandedType: 'test.some_composite[]', + type: { fullName: 'test.some_composite', kind: 'composite' }, + isArray: true, + }, + { + name: 'r_a', + expandedType: 'test.some_range[]', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + isArray: true, + }, + { + name: 'e_a', + expandedType: 'test.some_enum[]', + type: { fullName: 'test.some_enum', kind: 'enum' }, + isArray: true, + }, + ]; + + expect(actual).toEqual(expected); + }); +}); diff --git a/src/kinds/extractCompositeType.ts b/src/kinds/extractCompositeType.ts new file mode 100644 index 00000000..fc64029e --- /dev/null +++ b/src/kinds/extractCompositeType.ts @@ -0,0 +1,122 @@ +import { Knex } from 'knex'; + +import InformationSchemaColumn from '../information_schema/InformationSchemaColumn'; +import PgType from './PgType'; +import commentMapQueryPart from './query-parts/commentMapQueryPart'; +import fakeInformationSchemaColumnsQueryPart from './query-parts/fakeInformationSchemaColumnsQueryPart'; + +export type AttributeType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; + +export interface CompositeTypeAttribute { + name: string; + expandedType: string; + type: AttributeType; + comment: string | null; + defaultValue: any; + isArray: boolean; + maxLength: number | null; + isNullable: boolean; + generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; + isUpdatable: boolean; + isIdentity: boolean; + ordinalPosition: number; + + /** + * The Postgres information_schema views do not contain info about materialized views. + * This value is the result of a query that matches the one for regular views. + * Use with caution, not all fields are guaranteed to be meaningful and/or accurate. + */ + fakeInformationSchemaValue: InformationSchemaColumn; +} + +export interface CompositeTypeDetails extends PgType<'compositeType'> { + attributes: CompositeTypeAttribute[]; +} + +// NOTE: This is NOT identical for the one for tables. +// The dimension field is not present for materialized views, so we +// deduce whether or not it is an array by checking the type. +const typeMapQueryPart = ` + select + pg_attribute.attname as "column_name", + typnamespace::regnamespace::text||'.'||(case when (t.typelem <> 0::oid AND t.typlen = '-1'::integer) then substring(typname, 2)||'[]' else typname end)::text as "expanded_name", + json_build_object( + 'fullName', typnamespace::regnamespace::text||'.'||substring(typname, (case when (t.typelem <> 0::oid AND t.typlen = '-1'::integer) then 2 else 1 end))::text, + 'kind', case + when typtype = 'd' then 'domain' + when typtype = 'r' then 'range' + when typtype = 'c' then 'composite' + when typtype = 'e' then 'enum' + when typtype = 'b' then COALESCE((select case + when i.typtype = 'r' then 'range' + when i.typtype = 'd' then 'domain' + when i.typtype = 'c' then 'composite' + when i.typtype = 'e' then 'enum' + end as inner_kind from pg_type i where i.oid = t.typelem), 'base') + ELSE 'unknown' + end + ) as "type_info" + from pg_type t + join pg_attribute on pg_attribute.atttypid = t.oid + join pg_class on pg_attribute.attrelid = pg_class.oid + join pg_namespace on pg_class.relnamespace = pg_namespace.oid + WHERE + pg_namespace.nspname = :schema_name + and pg_class.relname = :table_name +`; + +const extractCompositeType = async ( + db: Knex, + compositeType: PgType<'compositeType'> +): Promise => { + const columnsQuery = await db.raw( + ` + WITH + fake_info_schema_columns AS ( + ${fakeInformationSchemaColumnsQueryPart} + ), + type_map AS ( + ${typeMapQueryPart} + ), + comment_map AS ( + ${commentMapQueryPart} + ) + SELECT + columns.column_name AS "name", + type_map.expanded_name AS "expandedType", + type_map.type_info AS "type", + comment_map.comment AS "comment", + character_maximum_length AS "maxLength", + column_default AS "defaultValue", + is_nullable = 'YES' AS "isNullable", + data_type = 'ARRAY' AS "isArray", + is_identity = 'YES' AS "isIdentity", + is_updatable = 'YES' AS "isUpdatable", + ordinal_position AS "ordinalPosition", + CASE WHEN is_identity = 'YES' THEN + identity_generation + ELSE + is_generated + END AS "generated", + + row_to_json(columns.*) AS "fakeInformationSchemaValue" + FROM + fake_info_schema_columns columns + LEFT JOIN type_map ON type_map.column_name = columns.column_name + LEFT JOIN comment_map ON comment_map.column_name = columns.column_name + WHERE + table_name = :table_name + AND table_schema = :schema_name; + `, + { table_name: compositeType.name, schema_name: compositeType.schemaName } + ); + + const attributes = columnsQuery.rows; + + return { ...compositeType, attributes }; +}; + +export default extractCompositeType; diff --git a/src/kinds/extractDomain.test.ts b/src/kinds/extractDomain.test.ts new file mode 100644 index 00000000..c7f863f6 --- /dev/null +++ b/src/kinds/extractDomain.test.ts @@ -0,0 +1,67 @@ +import { expect, it } from 'vitest'; + +import { describe } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import extractDomain, { DomainDetails } from './extractDomain'; +import PgType from './PgType'; + +const makePgType = ( + name: string, + schemaName: string = 'test' +): PgType<'domain'> => ({ + schemaName, + name, + kind: 'domain', + comment: null, +}); + +describe('extractDomain', () => { + const [getKnex, databaseName] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should extract simplified as well as full information_schema information', async () => { + const db = getKnex(); + await db.raw('create domain test.some_domain as integer'); + + const result = await extractDomain(db, makePgType('some_domain')); + + const expected: DomainDetails = { + name: 'some_domain', + schemaName: 'test', + kind: 'domain', + comment: null, + innerType: 'pg_catalog.int4', + informationSchemaValue: { + domain_catalog: databaseName, + domain_schema: 'test', + domain_name: 'some_domain', + data_type: 'integer', + character_maximum_length: null, + character_octet_length: null, + character_set_catalog: null, + character_set_schema: null, + character_set_name: null, + collation_catalog: null, + collation_schema: null, + collation_name: null, + numeric_precision: 32, + numeric_precision_radix: 2, + numeric_scale: 0, + datetime_precision: null, + interval_type: null, + interval_precision: null, + domain_default: null, + udt_catalog: databaseName, + udt_schema: 'pg_catalog', + udt_name: 'int4', + scope_catalog: null, + scope_schema: null, + scope_name: null, + maximum_cardinality: null, + dtd_identifier: '1', + }, + }; + expect(result).toStrictEqual(expected); + }); +}); diff --git a/src/kinds/extractDomain.ts b/src/kinds/extractDomain.ts new file mode 100644 index 00000000..2141351f --- /dev/null +++ b/src/kinds/extractDomain.ts @@ -0,0 +1,41 @@ +import { Knex } from 'knex'; + +import InformationSchemaDomain from '../information_schema/InformationSchemaDomain'; +import PgType from './PgType'; + +export interface DomainDetails extends PgType<'domain'> { + innerType: string; + + informationSchemaValue: InformationSchemaDomain; +} + +const extractDomain = async ( + db: Knex, + domain: PgType<'domain'> +): Promise => { + const query = await db.raw( + ` + SELECT + i.typnamespace::regnamespace::text||'.'||i.typname as "innerType", + row_to_json(domains.*) AS "informationSchemaValue" + FROM + information_schema.domains, + pg_type t + JOIN pg_type i on t.typbasetype = i.oid + WHERE + domain_name = :domain_name + AND t.typname = :domain_name + AND t.typtype = 'd' + AND domain_schema = :schema_name + AND t.typnamespace::regnamespace::text = :schema_name + `, + { domain_name: domain.name, schema_name: domain.schemaName } + ); + + return { + ...domain, + ...query.rows[0], + }; +}; + +export default extractDomain; diff --git a/src/kinds/extractEnum.test.ts b/src/kinds/extractEnum.test.ts new file mode 100644 index 00000000..1e991d0f --- /dev/null +++ b/src/kinds/extractEnum.test.ts @@ -0,0 +1,38 @@ +import { expect, it } from 'vitest'; + +import { describe } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import extractEnum, { EnumDetails } from './extractEnum'; +import PgType from './PgType'; + +const makePgType = ( + name: string, + schemaName: string = 'test' +): PgType<'enum'> => ({ + schemaName, + name, + kind: 'enum', + comment: null, +}); + +describe('extractEnum', () => { + const [getKnex] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should extract enum values', async () => { + const db = getKnex(); + await db.raw("create type test.some_enum as enum('a', 'b', 'c')"); + + const result = await extractEnum(db, makePgType('some_enum')); + + const expected: EnumDetails = { + name: 'some_enum', + schemaName: 'test', + kind: 'enum', + comment: null, + values: ['a', 'b', 'c'], + }; + expect(result).toStrictEqual(expected); + }); +}); diff --git a/src/kinds/extractEnum.ts b/src/kinds/extractEnum.ts new file mode 100644 index 00000000..b392e52d --- /dev/null +++ b/src/kinds/extractEnum.ts @@ -0,0 +1,35 @@ +import { Knex } from 'knex'; + +import PgType from './PgType'; + +export interface EnumDetails extends PgType<'enum'> { + values: string[]; +} + +const extractEnum = async ( + db: Knex, + pgEnum: PgType<'enum'> +): Promise => { + const query = await db.raw( + ` + SELECT + json_agg(pg_enum.enumlabel ORDER BY pg_enum.enumsortorder) as "values" + FROM + pg_type + JOIN pg_namespace ON pg_type.typnamespace = pg_namespace.oid + JOIN pg_enum ON pg_type.oid = pg_enum.enumtypid + WHERE + pg_type.typtype = 'e' + AND pg_namespace.nspname = :schema_name + AND typname = :type_name + `, + { type_name: pgEnum.name, schema_name: pgEnum.schemaName } + ); + + return { + ...pgEnum, + ...query.rows[0], + }; +}; + +export default extractEnum; diff --git a/src/kinds/extractMaterializedView.test.ts b/src/kinds/extractMaterializedView.test.ts new file mode 100644 index 00000000..50ad3788 --- /dev/null +++ b/src/kinds/extractMaterializedView.test.ts @@ -0,0 +1,241 @@ +import * as R from 'ramda'; +import { expect, it } from 'vitest'; + +import { describe } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import extractMaterializedView, { + MaterializedViewColumn, + MaterializedViewDetails, +} from './extractMaterializedView'; +import PgType from './PgType'; + +const makePgType = ( + name: string, + schemaName: string = 'test' +): PgType<'materializedView'> => ({ + schemaName, + name, + kind: 'materializedView', + comment: null, +}); + +describe('extractMaterializedView', () => { + const [getKnex, databaseName] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should extract simplified information', async () => { + const db = getKnex(); + await db.raw( + 'create materialized view test.some_materialized_view as select 1 as id' + ); + + const result = await extractMaterializedView( + db, + makePgType('some_materialized_view') + ); + + const expected: MaterializedViewDetails = { + name: 'some_materialized_view', + schemaName: 'test', + kind: 'materializedView', + comment: null, + definition: ' SELECT 1 AS id;', + columns: [ + { + name: 'id', + expandedType: 'pg_catalog.int4', + isArray: false, + type: { + fullName: 'pg_catalog.int4', + kind: 'base', + }, + comment: null, + maxLength: null, + defaultValue: null, + isNullable: true, + isIdentity: false, + isUpdatable: false, + ordinalPosition: 1, + generated: 'NEVER', + fakeInformationSchemaValue: { + table_catalog: databaseName, + table_schema: 'test', + table_name: 'some_materialized_view', + column_name: 'id', + ordinal_position: 1, + column_default: null, + is_nullable: 'YES', + data_type: 'integer', + character_maximum_length: null, + character_octet_length: null, + numeric_precision: 32, + numeric_precision_radix: 2, + numeric_scale: 0, + datetime_precision: null, + interval_type: null, + interval_precision: null, + character_set_catalog: null, + character_set_schema: null, + character_set_name: null, + collation_catalog: null, + collation_schema: null, + collation_name: null, + domain_catalog: null, + domain_schema: null, + domain_name: null, + udt_catalog: databaseName, + udt_schema: 'pg_catalog', + udt_name: 'int4', + scope_catalog: null, + scope_schema: null, + scope_name: null, + maximum_cardinality: null, + dtd_identifier: '1', + is_self_referencing: 'NO', + is_identity: 'NO', + identity_generation: null, + identity_start: null, + identity_increment: null, + identity_maximum: null, + identity_minimum: null, + identity_cycle: 'NO', + is_generated: 'NEVER', + generation_expression: null, + is_updatable: 'NO', + }, + }, + ], + fakeInformationSchemaValue: { + table_catalog: databaseName, + table_schema: 'test', + table_name: 'some_materialized_view', + view_definition: ' SELECT 1 AS id;', + check_option: 'NONE', + is_updatable: 'NO', + is_insertable_into: 'NO', + is_trigger_updatable: 'NO', + is_trigger_deletable: 'NO', + is_trigger_insertable_into: 'NO', + }, + }; + + expect(result).toStrictEqual(expected); + }); + + it('should fetch column comments', async () => { + const db = getKnex(); + await db.raw( + 'create materialized view test.some_materialized_view as select 1 as id' + ); + await db.raw( + "comment on column test.some_materialized_view.id is 'id column'" + ); + + const result = await extractMaterializedView( + db, + makePgType('some_materialized_view') + ); + + expect(result.columns[0].comment).toBe('id column'); + }); + + it('should handle domains, composite types, ranges and enums as well as arrays of those', async () => { + const db = getKnex(); + await db.raw('create domain test.some_domain as text'); + await db.raw('create type test.some_composite as (id integer, name text)'); + await db.raw('create type test.some_range as range(subtype=timestamptz)'); + await db.raw("create type test.some_enum as enum ('a', 'b', 'c')"); + + await db.raw( + `create table test.some_table ( + d test.some_domain, + c test.some_composite, + r test.some_range, + e test.some_enum, + d_a test.some_domain[], + c_a test.some_composite[], + r_a test.some_range[], + e_a test.some_enum[] + )` + ); + + await db.raw( + 'create materialized view test.some_materialized_view as select * from test.some_table' + ); + + const result = await extractMaterializedView( + db, + makePgType('some_materialized_view') + ); + const actual = R.map( + R.pick(['name', 'expandedType', 'type', 'isArray']), + result.columns + ); + + const expected: Partial[] = [ + { + name: 'd', + expandedType: 'test.some_domain', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + isArray: false, + }, + { + name: 'c', + expandedType: 'test.some_composite', + type: { fullName: 'test.some_composite', kind: 'composite' }, + isArray: false, + }, + { + name: 'r', + expandedType: 'test.some_range', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + isArray: false, + }, + { + name: 'e', + expandedType: 'test.some_enum', + type: { fullName: 'test.some_enum', kind: 'enum' }, + isArray: false, + }, + { + name: 'd_a', + expandedType: 'test.some_domain[]', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + isArray: true, + }, + { + name: 'c_a', + expandedType: 'test.some_composite[]', + type: { fullName: 'test.some_composite', kind: 'composite' }, + isArray: true, + }, + { + name: 'r_a', + expandedType: 'test.some_range[]', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + isArray: true, + }, + { + name: 'e_a', + expandedType: 'test.some_enum[]', + type: { fullName: 'test.some_enum', kind: 'enum' }, + isArray: true, + }, + ]; + + expect(actual).toEqual(expected); + }); +}); diff --git a/src/kinds/extractMaterializedView.ts b/src/kinds/extractMaterializedView.ts new file mode 100644 index 00000000..9bc750c8 --- /dev/null +++ b/src/kinds/extractMaterializedView.ts @@ -0,0 +1,171 @@ +import { Knex } from 'knex'; + +import InformationSchemaColumn from '../information_schema/InformationSchemaColumn'; +import InformationSchemaView from '../information_schema/InformationSchemaView'; +import { ColumnReference, Index } from './extractTable'; +import PgType from './PgType'; +import commentMapQueryPart from './query-parts/commentMapQueryPart'; +import fakeInformationSchemaColumnsQueryPart from './query-parts/fakeInformationSchemaColumnsQueryPart'; +import fakeInformationSchemaViewsQueryPart from './query-parts/fakeInformationSchemaViewsQueryPart'; + +export type MaterializedViewColumnType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; + +export interface MaterializedViewColumn { + name: string; + expandedType: string; + type: MaterializedViewColumnType; + comment: string | null; + defaultValue: any; + isArray: boolean; + maxLength: number | null; + generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; + isUpdatable: boolean; + isIdentity: boolean; + ordinalPosition: number; + + /** + * This will contain a "link" to the source table or view and column, + * if it can be determined. + */ + source?: { schema: string; table: string; column: string }; + + /** + * If views are resolved, this will contain the reference from the source + * column in the table that this view references. Note that if the source + * is another view, that view in turn will be resolved if possible, leading + * us to a table in the end. + */ + reference?: ColumnReference | null; + indices?: Index[]; + isNullable?: boolean; + isPrimaryKey?: boolean; + + /** + * The Postgres information_schema views do not contain info about materialized views. + * This value is the result of a query that matches the one for regular views. + * Use with caution, not all fields are guaranteed to be meaningful and/or accurate. + */ + fakeInformationSchemaValue: InformationSchemaColumn; +} + +export interface MaterializedViewDetails extends PgType<'materializedView'> { + definition: string; + columns: MaterializedViewColumn[]; + + /** + * The Postgres information_schema views do not contain info about materialized views. + * This value is the result of a query that matches the one for regular views. + * Use with caution, not all fields are guaranteed to be meaningful and/or accurate. + */ + fakeInformationSchemaValue: InformationSchemaView; +} + +// NOTE: This is NOT identical for the one for tables. +// The dimension field is not present for materialized views, so we +// deduce whether or not it is an array by checking the type. +const typeMapQueryPart = ` +select + pg_attribute.attname as "column_name", + typnamespace::regnamespace::text||'.'||(case when (t.typelem <> 0::oid AND t.typlen = '-1'::integer) then substring(typname, 2)||'[]' else typname end)::text as "expanded_name", + json_build_object( + 'fullName', typnamespace::regnamespace::text||'.'||substring(typname, (case when (t.typelem <> 0::oid AND t.typlen = '-1'::integer) then 2 else 1 end))::text, + 'kind', case + when typtype = 'd' then 'domain' + when typtype = 'r' then 'range' + when typtype = 'c' then 'composite' + when typtype = 'e' then 'enum' + when typtype = 'b' then COALESCE((select case + when i.typtype = 'r' then 'range' + when i.typtype = 'd' then 'domain' + when i.typtype = 'c' then 'composite' + when i.typtype = 'e' then 'enum' + end as inner_kind from pg_type i where i.oid = t.typelem), 'base') + ELSE 'unknown' + end + ) as "type_info" +from pg_type t +join pg_attribute on pg_attribute.atttypid = t.oid +join pg_class on pg_attribute.attrelid = pg_class.oid +join pg_namespace on pg_class.relnamespace = pg_namespace.oid +WHERE + pg_namespace.nspname = :schema_name + and pg_class.relname = :table_name +`; + +const extractMaterializedView = async ( + db: Knex, + materializedView: PgType<'materializedView'> +): Promise => { + const fakeInformationSchemaValueQuery = await db.raw( + fakeInformationSchemaViewsQueryPart + ); + const fakeInformationSchemaValue: InformationSchemaView = + fakeInformationSchemaValueQuery.rows[0]; + + // const [{ definition }] = await db + // .select<{ definition: string }[]>('definition') + // .from('pg_matviews') + // .where({ + // matviewname: view.name, + // schemaname: view.schemaName, + // }); + + const columnsQuery = await db.raw( + ` + WITH + fake_info_schema_columns AS ( + ${fakeInformationSchemaColumnsQueryPart} + ), + type_map AS ( + ${typeMapQueryPart} + ), + comment_map AS ( + ${commentMapQueryPart} + ) + SELECT + columns.column_name AS "name", + type_map.expanded_name AS "expandedType", + type_map.type_info AS "type", + comment_map.comment AS "comment", + character_maximum_length AS "maxLength", + column_default AS "defaultValue", + is_nullable = 'YES' AS "isNullable", + data_type = 'ARRAY' AS "isArray", + is_identity = 'YES' AS "isIdentity", + is_updatable = 'YES' AS "isUpdatable", + ordinal_position AS "ordinalPosition", + CASE WHEN is_identity = 'YES' THEN + identity_generation + ELSE + is_generated + END AS "generated", + + row_to_json(columns.*) AS "fakeInformationSchemaValue" + FROM + fake_info_schema_columns columns + LEFT JOIN type_map ON type_map.column_name = columns.column_name + LEFT JOIN comment_map ON comment_map.column_name = columns.column_name + WHERE + table_name = :table_name + AND table_schema = :schema_name; + `, + { + table_name: materializedView.name, + schema_name: materializedView.schemaName, + } + ); + + const columns = columnsQuery.rows; + + return { + ...materializedView, + definition: fakeInformationSchemaValue.view_definition, + columns, + fakeInformationSchemaValue, + }; +}; + +export default extractMaterializedView; diff --git a/src/kinds/extractRange.test.ts b/src/kinds/extractRange.test.ts new file mode 100644 index 00000000..251851c1 --- /dev/null +++ b/src/kinds/extractRange.test.ts @@ -0,0 +1,38 @@ +import { expect, it } from 'vitest'; + +import { describe } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import extractRange, { RangeDetails } from './extractRange'; +import PgType from './PgType'; + +const makePgType = ( + name: string, + schemaName: string = 'test' +): PgType<'range'> => ({ + schemaName, + name, + kind: 'range', + comment: null, +}); + +describe('extractRange', () => { + const [getKnex] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should extract range values', async () => { + const db = getKnex(); + await db.raw('create type test.some_range as range(subtype=timestamptz)'); + + const result = await extractRange(db, makePgType('some_range')); + + const expected: RangeDetails = { + name: 'some_range', + schemaName: 'test', + kind: 'range', + comment: null, + innerType: 'timestamptz', + }; + expect(result).toStrictEqual(expected); + }); +}); diff --git a/src/kinds/extractRange.ts b/src/kinds/extractRange.ts new file mode 100644 index 00000000..56a7f5de --- /dev/null +++ b/src/kinds/extractRange.ts @@ -0,0 +1,35 @@ +import { Knex } from 'knex'; + +import PgType from './PgType'; + +export interface RangeDetails extends PgType<'range'> { + innerType: string; +} + +const extractRange = async ( + db: Knex, + range: PgType<'range'> +): Promise => { + const query = await db.raw( + ` + SELECT + subtype.typname as "innerType" + FROM + pg_type range_type + JOIN pg_namespace ON range_type.typnamespace = pg_namespace.oid + JOIN pg_range ON range_type.oid = pg_range.rngtypid + JOIN pg_type subtype ON pg_range.rngsubtype = subtype.oid + WHERE + pg_namespace.nspname = :schema_name + AND range_type.typname = :type_name + `, + { type_name: range.name, schema_name: range.schemaName } + ); + + return { + ...range, + ...query.rows[0], + }; +}; + +export default extractRange; diff --git a/src/kinds/extractTable.test.ts b/src/kinds/extractTable.test.ts new file mode 100644 index 00000000..a14ec629 --- /dev/null +++ b/src/kinds/extractTable.test.ts @@ -0,0 +1,327 @@ +import * as R from 'ramda'; +import { expect, it } from 'vitest'; + +import { describe } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import extractTable, { + ColumnReference, + TableColumn, + TableDetails, +} from './extractTable'; +import PgType from './PgType'; + +const makePgType = ( + name: string, + schemaName: string = 'test' +): PgType<'table'> => ({ + schemaName, + name, + kind: 'table', + comment: null, +}); + +describe('extractTable', () => { + const [getKnex, databaseName] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should extract simplified as well as full information_schema information', async () => { + const db = getKnex(); + await db.raw('create table test.some_table (id integer)'); + + const result = await extractTable(db, makePgType('some_table')); + + const expected: TableDetails = { + name: 'some_table', + schemaName: 'test', + kind: 'table', + comment: null, + informationSchemaValue: { + table_catalog: databaseName, + table_schema: 'test', + table_name: 'some_table', + table_type: 'BASE TABLE', + self_referencing_column_name: null, + reference_generation: null, + user_defined_type_catalog: null, + user_defined_type_schema: null, + user_defined_type_name: null, + is_insertable_into: 'YES', + is_typed: 'NO', + commit_action: null, + }, + columns: [ + { + name: 'id', + expandedType: 'pg_catalog.int4', + type: { fullName: 'pg_catalog.int4', kind: 'base' }, + isArray: false, + dimensions: 0, + reference: null, + defaultValue: null, + indices: [], + isNullable: true, + isPrimaryKey: false, + generated: 'NEVER', + isUpdatable: true, + isIdentity: false, + ordinalPosition: 1, + maxLength: null, + comment: null, + + informationSchemaValue: { + table_catalog: databaseName, + table_schema: 'test', + table_name: 'some_table', + column_name: 'id', + ordinal_position: 1, + column_default: null, + is_nullable: 'YES', + data_type: 'integer', + character_maximum_length: null, + character_octet_length: null, + numeric_precision: 32, + numeric_precision_radix: 2, + numeric_scale: 0, + datetime_precision: null, + interval_type: null, + interval_precision: null, + character_set_catalog: null, + character_set_schema: null, + character_set_name: null, + collation_catalog: null, + collation_schema: null, + collation_name: null, + domain_catalog: null, + domain_schema: null, + domain_name: null, + udt_catalog: databaseName, + udt_schema: 'pg_catalog', + udt_name: 'int4', + scope_catalog: null, + scope_schema: null, + scope_name: null, + maximum_cardinality: null, + dtd_identifier: '1', + is_self_referencing: 'NO', + is_identity: 'NO', + identity_generation: null, + identity_start: null, + identity_increment: null, + identity_maximum: null, + identity_minimum: null, + identity_cycle: 'NO', + is_generated: 'NEVER', + generation_expression: null, + is_updatable: 'YES', + }, + }, + ], + }; + + expect(result).toStrictEqual(expected); + }); + + it('should fetch column comments', async () => { + const db = getKnex(); + await db.raw('create table test.some_table (id integer)'); + await db.raw("comment on column test.some_table.id is 'id column'"); + + const result = await extractTable(db, makePgType('some_table')); + + expect(result.columns[0].comment).toBe('id column'); + }); + + it('should handle arrays of primitive types', async () => { + const db = getKnex(); + await db.raw( + 'create table test.some_table (array_of_ints integer[], array_of_strings text[], two_dimensional_array integer[][])' + ); + + const result = await extractTable(db, makePgType('some_table')); + const actual = R.map( + R.pick(['name', 'expandedType', 'type', 'dimensions']), + result.columns + ); + + const expected: Partial[] = [ + { + name: 'array_of_ints', + expandedType: 'pg_catalog.int4[]', + type: { fullName: 'pg_catalog.int4', kind: 'base' }, + dimensions: 1, + }, + { + name: 'array_of_strings', + expandedType: 'pg_catalog.text[]', + type: { fullName: 'pg_catalog.text', kind: 'base' }, + dimensions: 1, + }, + { + name: 'two_dimensional_array', + expandedType: 'pg_catalog.int4[][]', + type: { fullName: 'pg_catalog.int4', kind: 'base' }, + dimensions: 2, + }, + ]; + expect(actual).toEqual(expected); + }); + + it('should handle domains, composite types, ranges and enums as well as arrays of those', async () => { + const db = getKnex(); + await db.raw('create domain test.some_domain as text'); + await db.raw('create type test.some_composite as (id integer, name text)'); + await db.raw('create type test.some_range as range(subtype=timestamptz)'); + await db.raw("create type test.some_enum as enum ('a', 'b', 'c')"); + + await db.raw( + `create table test.some_table ( + d test.some_domain, + c test.some_composite, + r test.some_range, + e test.some_enum, + d_a test.some_domain[], + c_a test.some_composite[], + r_a test.some_range[], + e_a test.some_enum[] + )` + ); + + const result = await extractTable(db, makePgType('some_table')); + const actual = R.map( + R.pick(['name', 'expandedType', 'type', 'dimensions']), + result.columns + ); + + const expected: Partial[] = [ + { + name: 'd', + expandedType: 'test.some_domain', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + dimensions: 0, + }, + { + name: 'c', + expandedType: 'test.some_composite', + type: { fullName: 'test.some_composite', kind: 'composite' }, + dimensions: 0, + }, + { + name: 'r', + expandedType: 'test.some_range', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + dimensions: 0, + }, + { + name: 'e', + expandedType: 'test.some_enum', + type: { fullName: 'test.some_enum', kind: 'enum' }, + dimensions: 0, + }, + { + name: 'd_a', + expandedType: 'test.some_domain[]', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + dimensions: 1, + }, + { + name: 'c_a', + expandedType: 'test.some_composite[]', + type: { fullName: 'test.some_composite', kind: 'composite' }, + dimensions: 1, + }, + { + name: 'r_a', + expandedType: 'test.some_range[]', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + dimensions: 1, + }, + { + name: 'e_a', + expandedType: 'test.some_enum[]', + type: { fullName: 'test.some_enum', kind: 'enum' }, + dimensions: 1, + }, + ]; + + expect(actual).toEqual(expected); + }); + + describe('references', () => { + useSchema(getKnex, 'secondary_schema'); + + it('should extract a simple foreign key', async () => { + const db = getKnex(); + + await db.raw('create table test.some_table (id integer primary key)'); + await db.raw( + 'create table test.linking_table (some_table_id integer references test.some_table(id))' + ); + + const result = await extractTable(db, makePgType('linking_table')); + + const expected: ColumnReference = { + schemaName: 'test', + tableName: 'some_table', + columnName: 'id', + onDelete: 'NO ACTION', + onUpdate: 'NO ACTION', + }; + expect(result.columns[0].reference).toEqual(expected); + }); + + it('should extract a foreign key with a different schema', async () => { + const db = getKnex(); + + await db.raw( + 'create table secondary_schema.some_table (id integer primary key)' + ); + await db.raw( + 'create table test.linking_table (some_table_id integer references secondary_schema.some_table(id))' + ); + + const result = await extractTable(db, makePgType('linking_table')); + + const expected: ColumnReference = { + schemaName: 'secondary_schema', + tableName: 'some_table', + columnName: 'id', + onDelete: 'NO ACTION', + onUpdate: 'NO ACTION', + }; + expect(result.columns[0].reference).toEqual(expected); + }); + + it('should get the onDelete and onUpdate actions', async () => { + const db = getKnex(); + + await db.raw('create table test.some_table (id integer primary key)'); + await db.raw( + 'create table test.linking_table (some_table_id integer references test.some_table(id) on delete cascade on update set null)' + ); + + const result = await extractTable(db, makePgType('linking_table')); + + const expected: ColumnReference = { + schemaName: 'test', + tableName: 'some_table', + columnName: 'id', + onDelete: 'CASCADE', + onUpdate: 'SET NULL', + }; + expect(result.columns[0].reference).toEqual(expected); + }); + }); +}); diff --git a/src/kinds/extractTable.ts b/src/kinds/extractTable.ts new file mode 100644 index 00000000..7daf1a03 --- /dev/null +++ b/src/kinds/extractTable.ts @@ -0,0 +1,210 @@ +import { Knex } from 'knex'; + +import InformationSchemaColumn from '../information_schema/InformationSchemaColumn'; +import InformationSchemaTable from '../information_schema/InformationSchemaTable'; +import PgType from './PgType'; +import commentMapQueryPart from './query-parts/commentMapQueryPart'; +import indexMapQueryPart from './query-parts/indexMapQueryPart'; + +export const updateActionMap = { + a: 'NO ACTION', + r: 'RESTRICT', + c: 'CASCADE', + n: 'SET NULL', + d: 'SET DEFAULT', +} as const; + +export type UpdateAction = typeof updateActionMap[keyof typeof updateActionMap]; + +export type ColumnReference = { + schemaName: string; + tableName: string; + columnName: string; + onDelete: UpdateAction; + onUpdate: UpdateAction; +}; + +export type Index = { + name: string; + isPrimary: boolean; +}; + +export type TableColumnType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; + +export interface TableColumn { + name: string; + expandedType: string; + type: TableColumnType; + comment: string | null; + defaultValue: any; + isArray: boolean; + dimensions: number; + reference: ColumnReference | null; + indices: Index[]; + maxLength: number | null; + isNullable: boolean; + isPrimaryKey: boolean; + generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; + isUpdatable: boolean; + isIdentity: boolean; + ordinalPosition: number; + + informationSchemaValue: InformationSchemaColumn; +} + +export interface TableDetails extends PgType<'table'> { + columns: TableColumn[]; + informationSchemaValue: InformationSchemaTable; +} + +const referenceMapQueryPart = ` + SELECT + source_attr.attname AS "column_name", + json_build_object( + 'schemaName', expanded_constraint.target_schema, + 'tableName', expanded_constraint.target_table, + 'columnName', target_attr.attname, + 'onUpdate', case expanded_constraint.confupdtype + ${Object.entries(updateActionMap) + .map(([key, action]) => `when '${key}' then '${action}'`) + .join('\n')} + end, + 'onDelete', case expanded_constraint.confdeltype + ${Object.entries(updateActionMap) + .map(([key, action]) => `when '${key}' then '${action}'`) + .join('\n')} + end + ) AS reference + FROM ( + SELECT + unnest(conkey) AS "source_attnum", + unnest(confkey) AS "target_attnum", + target_namespace.nspname as "target_schema", + target_class.relname as "target_table", + confrelid, + conrelid, + conname, + confupdtype, + confdeltype + FROM + pg_constraint + JOIN pg_class source_class ON conrelid = source_class.oid + JOIN pg_namespace source_namespace ON source_class.relnamespace = source_namespace.oid + + JOIN pg_class target_class ON confrelid = target_class.oid + JOIN pg_namespace target_namespace ON target_class.relnamespace = target_namespace.oid + WHERE + source_class.relname = :table_name + AND source_namespace.nspname = :schema_name + AND contype = 'f') expanded_constraint + JOIN pg_attribute target_attr ON target_attr.attrelid = expanded_constraint.confrelid + AND target_attr.attnum = expanded_constraint.target_attnum + JOIN pg_attribute source_attr ON source_attr.attrelid = expanded_constraint.conrelid + AND source_attr.attnum = expanded_constraint.source_attnum + JOIN pg_class target_class ON target_class.oid = expanded_constraint.confrelid + WHERE + target_class.relispartition = FALSE +`; + +const typeMapQueryPart = ` +select + pg_attribute.attname as "column_name", + typnamespace::regnamespace::text||'.'||substring(typname, (case when attndims > 0 then 2 else 1 end))::text||repeat('[]', attndims) as "expanded_name", + attndims as "dimensions", + json_build_object( + 'fullName', typnamespace::regnamespace::text||'.'||substring(typname, (case when attndims > 0 then 2 else 1 end))::text, + 'kind', case + when typtype = 'd' then 'domain' + when typtype = 'r' then 'range' + when typtype = 'c' then 'composite' + when typtype = 'e' then 'enum' + when typtype = 'b' then COALESCE((select case + when i.typtype = 'r' then 'range' + when i.typtype = 'd' then 'domain' + when i.typtype = 'c' then 'composite' + when i.typtype = 'e' then 'enum' + end as inner_kind from pg_type i where i.oid = t.typelem), 'base') + ELSE 'unknown' + end + ) as "type_info" +from pg_type t +join pg_attribute on pg_attribute.atttypid = t.oid +join pg_class on pg_attribute.attrelid = pg_class.oid +join pg_namespace on pg_class.relnamespace = pg_namespace.oid +WHERE + pg_namespace.nspname = :schema_name + and pg_class.relname = :table_name +`; + +const extractTable = async ( + db: Knex, + table: PgType<'table'> +): Promise => { + const [informationSchemaValue] = await db + .from('information_schema.tables') + .where({ + table_name: table.name, + table_schema: table.schemaName, + }) + .select('*'); + + const columnsQuery = await db.raw( + ` + WITH + reference_map AS ( + ${referenceMapQueryPart} + ), + index_map AS ( + ${indexMapQueryPart} + ), + type_map AS ( + ${typeMapQueryPart} + ), + comment_map AS ( + ${commentMapQueryPart} + ) + SELECT + columns.column_name AS "name", + type_map.expanded_name AS "expandedType", + type_map.dimensions AS "dimensions", + type_map.type_info AS "type", + comment_map.comment AS "comment", + character_maximum_length AS "maxLength", + column_default AS "defaultValue", + is_nullable = 'YES' AS "isNullable", + data_type = 'ARRAY' AS "isArray", + is_identity = 'YES' AS "isIdentity", + is_updatable = 'YES' AS "isUpdatable", + ordinal_position AS "ordinalPosition", + CASE WHEN is_identity = 'YES' THEN + identity_generation + ELSE + is_generated + END AS "generated", + COALESCE(index_map.is_primary, FALSE) AS "isPrimaryKey", + COALESCE(index_map.indices, '[]'::json) AS "indices", + reference_map.reference AS "reference", + + row_to_json(columns.*) AS "informationSchemaValue" + FROM + information_schema.columns + LEFT JOIN index_map ON index_map.column_name = columns.column_name + LEFT JOIN reference_map ON reference_map.column_name = columns.column_name + LEFT JOIN type_map ON type_map.column_name = columns.column_name + LEFT JOIN comment_map ON comment_map.column_name = columns.column_name + WHERE + table_name = :table_name + AND table_schema = :schema_name; + `, + { table_name: table.name, schema_name: table.schemaName } + ); + + const columns = columnsQuery.rows; + + return { ...table, informationSchemaValue, columns }; +}; + +export default extractTable; diff --git a/src/kinds/extractView.test.ts b/src/kinds/extractView.test.ts new file mode 100644 index 00000000..66ddb2cf --- /dev/null +++ b/src/kinds/extractView.test.ts @@ -0,0 +1,221 @@ +import * as R from 'ramda'; +import { expect, it } from 'vitest'; + +import { describe } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import extractView, { ViewColumn, ViewDetails } from './extractView'; +import PgType from './PgType'; + +const makePgType = ( + name: string, + schemaName: string = 'test' +): PgType<'view'> => ({ + schemaName, + name, + kind: 'view', + comment: null, +}); + +describe('extractView', () => { + const [getKnex, databaseName] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should extract simplified as well as full information_schema information', async () => { + const db = getKnex(); + await db.raw('create view test.some_view as select 1 as id'); + + const result = await extractView(db, makePgType('some_view')); + + const expected: ViewDetails = { + name: 'some_view', + schemaName: 'test', + kind: 'view', + comment: null, + definition: ' SELECT 1 AS id;', + informationSchemaValue: { + table_catalog: databaseName, + table_schema: 'test', + table_name: 'some_view', + view_definition: ' SELECT 1 AS id;', + check_option: 'NONE', + is_updatable: 'NO', + is_insertable_into: 'NO', + is_trigger_updatable: 'NO', + is_trigger_deletable: 'NO', + is_trigger_insertable_into: 'NO', + }, + columns: [ + { + name: 'id', + expandedType: 'pg_catalog.int4', + isArray: false, + type: { + fullName: 'pg_catalog.int4', + kind: 'base', + }, + comment: null, + maxLength: null, + defaultValue: null, + isIdentity: false, + isUpdatable: false, + ordinalPosition: 1, + generated: 'NEVER', + source: null, + informationSchemaValue: { + table_catalog: databaseName, + table_schema: 'test', + table_name: 'some_view', + column_name: 'id', + ordinal_position: 1, + column_default: null, + is_nullable: 'YES', + data_type: 'integer', + character_maximum_length: null, + character_octet_length: null, + numeric_precision: 32, + numeric_precision_radix: 2, + numeric_scale: 0, + datetime_precision: null, + interval_type: null, + interval_precision: null, + character_set_catalog: null, + character_set_schema: null, + character_set_name: null, + collation_catalog: null, + collation_schema: null, + collation_name: null, + domain_catalog: null, + domain_schema: null, + domain_name: null, + udt_catalog: databaseName, + udt_schema: 'pg_catalog', + udt_name: 'int4', + scope_catalog: null, + scope_schema: null, + scope_name: null, + maximum_cardinality: null, + dtd_identifier: '1', + is_self_referencing: 'NO', + is_identity: 'NO', + identity_generation: null, + identity_start: null, + identity_increment: null, + identity_maximum: null, + identity_minimum: null, + identity_cycle: 'NO', + is_generated: 'NEVER', + generation_expression: null, + is_updatable: 'NO', + }, + }, + ], + }; + + expect(result).toStrictEqual(expected); + }); + + it('should fetch column comments', async () => { + const db = getKnex(); + await db.raw('create view test.some_view as select 1 as id'); + await db.raw("comment on column test.some_view.id is 'id column'"); + + const result = await extractView(db, makePgType('some_view')); + + expect(result.columns[0].comment).toBe('id column'); + }); + + it('should handle domains, composite types, ranges and enums as well as arrays of those', async () => { + const db = getKnex(); + await db.raw('create domain test.some_domain as text'); + await db.raw('create type test.some_composite as (id integer, name text)'); + await db.raw('create type test.some_range as range(subtype=timestamptz)'); + await db.raw("create type test.some_enum as enum ('a', 'b', 'c')"); + + await db.raw( + `create table test.some_table ( + d test.some_domain, + c test.some_composite, + r test.some_range, + e test.some_enum, + d_a test.some_domain[], + c_a test.some_composite[], + r_a test.some_range[], + e_a test.some_enum[] + )` + ); + + await db.raw('create view test.some_view as select * from test.some_table'); + + const result = await extractView(db, makePgType('some_view')); + const actual = R.map( + R.pick(['name', 'expandedType', 'type', 'isArray']), + result.columns + ); + + const expected: Partial[] = [ + { + name: 'd', + expandedType: 'test.some_domain', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + isArray: false, + }, + { + name: 'c', + expandedType: 'test.some_composite', + type: { fullName: 'test.some_composite', kind: 'composite' }, + isArray: false, + }, + { + name: 'r', + expandedType: 'test.some_range', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + isArray: false, + }, + { + name: 'e', + expandedType: 'test.some_enum', + type: { fullName: 'test.some_enum', kind: 'enum' }, + isArray: false, + }, + { + name: 'd_a', + expandedType: 'test.some_domain[]', + type: { + fullName: 'test.some_domain', + kind: 'domain', + }, + isArray: true, + }, + { + name: 'c_a', + expandedType: 'test.some_composite[]', + type: { fullName: 'test.some_composite', kind: 'composite' }, + isArray: true, + }, + { + name: 'r_a', + expandedType: 'test.some_range[]', + type: { + fullName: 'test.some_range', + kind: 'range', + }, + isArray: true, + }, + { + name: 'e_a', + expandedType: 'test.some_enum[]', + type: { fullName: 'test.some_enum', kind: 'enum' }, + isArray: true, + }, + ]; + + expect(actual).toEqual(expected); + }); +}); diff --git a/src/kinds/extractView.ts b/src/kinds/extractView.ts new file mode 100644 index 00000000..52c6b482 --- /dev/null +++ b/src/kinds/extractView.ts @@ -0,0 +1,171 @@ +import { Knex } from 'knex'; +import * as R from 'ramda'; + +import InformationSchemaColumn from '../information_schema/InformationSchemaColumn'; +import InformationSchemaView from '../information_schema/InformationSchemaView'; +import { ColumnReference, Index } from './extractTable'; +import parseViewDefinition, { ViewReference } from './parseViewDefinition'; +import PgType from './PgType'; +import commentMapQueryPart from './query-parts/commentMapQueryPart'; + +export type ViewColumnType = { + fullName: string; + kind: 'base' | 'range' | 'domain' | 'composite' | 'enum'; +}; + +export interface ViewColumn { + name: string; + expandedType: string; + type: ViewColumnType; + comment: string | null; + defaultValue: any; + isArray: boolean; + maxLength: number | null; + generated: 'ALWAYS' | 'NEVER' | 'BY DEFAULT'; + isUpdatable: boolean; + isIdentity: boolean; + ordinalPosition: number; + + /** + * This will contain a "link" to the source table or view and column, + * if it can be determined. + */ + source: { schema: string; table: string; column: string } | null; + + /** + * If views are resolved, this will contain the reference from the source + * column in the table that this view references. Note that if the source + * is another view, that view in turn will be resolved if possible, leading + * us to a table in the end. + */ + reference?: ColumnReference | null; + indices?: Index[]; + isNullable?: boolean; + isPrimaryKey?: boolean; + + informationSchemaValue: InformationSchemaColumn; +} + +export interface ViewDetails extends PgType<'view'> { + definition: string; + informationSchemaValue: InformationSchemaView; + columns: ViewColumn[]; +} + +// NOTE: This is NOT identical for the one for tables. +// The dimension field is not present for materialized views, so we +// deduce whether or not it is an array by checking the type. +const typeMapQueryPart = ` +select + pg_attribute.attname as "column_name", + typnamespace::regnamespace::text||'.'||(case when (t.typelem <> 0::oid AND t.typlen = '-1'::integer) then substring(typname, 2)||'[]' else typname end)::text as "expanded_name", + json_build_object( + 'fullName', typnamespace::regnamespace::text||'.'||substring(typname, (case when (t.typelem <> 0::oid AND t.typlen = '-1'::integer) then 2 else 1 end))::text, + 'kind', case + when typtype = 'd' then 'domain' + when typtype = 'r' then 'range' + when typtype = 'c' then 'composite' + when typtype = 'e' then 'enum' + when typtype = 'b' then COALESCE((select case + when i.typtype = 'r' then 'range' + when i.typtype = 'd' then 'domain' + when i.typtype = 'c' then 'composite' + when i.typtype = 'e' then 'enum' + end as inner_kind from pg_type i where i.oid = t.typelem), 'base') + ELSE 'unknown' + end + ) as "type_info" +from pg_type t +join pg_attribute on pg_attribute.atttypid = t.oid +join pg_class on pg_attribute.attrelid = pg_class.oid +join pg_namespace on pg_class.relnamespace = pg_namespace.oid +WHERE + pg_namespace.nspname = :schema_name + and pg_class.relname = :table_name +`; + +const resolveSource = ( + column: ViewColumn, + sourceMapping?: Record +): ViewColumn => ({ + ...column, + source: sourceMapping?.[column.name].source ?? null, +}); + +const extractView = async ( + db: Knex, + view: PgType<'view'> +): Promise => { + const [informationSchemaValue] = await db + .from('information_schema.views') + .where({ + table_name: view.name, + table_schema: view.schemaName, + }) + .select('*'); + + const columnsQuery = await db.raw( + ` + WITH + type_map AS ( + ${typeMapQueryPart} + ), + comment_map AS ( + ${commentMapQueryPart} + ) + SELECT + columns.column_name AS "name", + type_map.expanded_name AS "expandedType", + type_map.type_info AS "type", + comment_map.comment AS "comment", + character_maximum_length AS "maxLength", + column_default AS "defaultValue", + data_type = 'ARRAY' AS "isArray", + is_identity = 'YES' AS "isIdentity", + is_updatable = 'YES' AS "isUpdatable", + ordinal_position AS "ordinalPosition", + CASE WHEN is_identity = 'YES' THEN + identity_generation + ELSE + is_generated + END AS "generated", + + row_to_json(columns.*) AS "informationSchemaValue" + FROM + information_schema.columns + LEFT JOIN type_map ON type_map.column_name = columns.column_name + LEFT JOIN comment_map ON comment_map.column_name = columns.column_name + WHERE + table_name = :table_name + AND table_schema = :schema_name; + `, + { table_name: view.name, schema_name: view.schemaName } + ); + + const unresolvedColumns: ViewColumn[] = columnsQuery.rows; + let sourceMapping: Record | undefined; + try { + const viewReferences = await parseViewDefinition( + informationSchemaValue.view_definition, + view.schemaName + ); + sourceMapping = R.indexBy(R.prop('viewColumn'), viewReferences); + } catch (e) { + console.warn( + `Error parsing view definition for "${view.name}". Falling back to raw data` + ); + } + + const columns = unresolvedColumns.map((column) => + resolveSource(column, sourceMapping) + ); + + return { + ...view, + definition: informationSchemaValue.view_definition, + informationSchemaValue, + columns, + }; +}; + +export default extractView; diff --git a/src/kinds/fetchTypes.test.ts b/src/kinds/fetchTypes.test.ts new file mode 100644 index 00000000..10cae0fa --- /dev/null +++ b/src/kinds/fetchTypes.test.ts @@ -0,0 +1,88 @@ +import { expect, it } from 'vitest'; + +import { describe } from '../tests/fixture'; +import useSchema from '../tests/useSchema'; +import useTestKnex from '../tests/useTestKnex'; +import fetchTypes from './fetchTypes'; + +describe('fetchTypes', () => { + const [getKnex] = useTestKnex(); + useSchema(getKnex, 'test'); + + it('should fetch a simple type', async () => { + const db = getKnex(); + await db.raw('create table test.some_table (id integer)'); + + const types = await fetchTypes(db, ['test']); + + expect(types).toHaveLength(1); + expect(types[0]).toEqual({ + name: 'some_table', + schemaName: 'test', + kind: 'table', + comment: null, + }); + }); + + it('should fetch all kinds', async () => { + const db = getKnex(); + await db.raw('create table test.some_table (id integer)'); + await db.raw('create view test.some_view as select 1 as id'); + await db.raw( + 'create materialized view test.some_materialized_view as select 1 as id' + ); + await db.raw('create type test.some_composite_type as (id integer)'); + await db.raw("create type test.some_enum as enum ('a', 'b')"); + await db.raw('create domain test.some_domain as text'); + await db.raw('create type test.some_range as range (subtype = integer)'); + // await db.raw( + // 'create procedure test.some_procedure() language sql as $$ select 1 as id $$' + // ); + // await db.raw( + // 'create function test.some_function() returns integer language sql as $$ select 1 as id $$' + // ); + // await db.raw( + // "create aggregate test.some_aggregate (numeric) ( sfunc = numeric_add, stype = numeric, initcond = '0');" + // ); + + const types = await fetchTypes(db, ['test']); + expect(types.map((t) => [t.name, t.kind])).toEqual([ + ['some_table', 'table'], + ['some_view', 'view'], + ['some_materialized_view', 'materializedView'], + ['some_composite_type', 'compositeType'], + ['some_enum', 'enum'], + ['some_domain', 'domain'], + ['some_range', 'range'], + // ['some_multirange', 'multiRange'], + // ['some_procedure', 'procedure'], + // ['some_function', 'function'], + // ['some_aggregate', 'aggregate'], + ]); + }); + + it('should fetch comments', async () => { + const db = getKnex(); + + // Tables are a "class" in postgres. + await db.raw('create table test.some_table (id integer)'); + await db.raw("comment on table test.some_table is 'some table comment'"); + + // Domains are "types", which is different. Make sure we get those commments as well. + await db.raw('create domain test.some_domain as text'); + await db.raw("comment on domain test.some_domain is 'some domain comment'"); + + // Composite types are both types and classes. The comment comes from the class. + await db.raw('create type test.some_composite_type as (id integer)'); + await db.raw( + "comment on type test.some_composite_type is 'some composite type comment'" + ); + + const types = await fetchTypes(db, ['test']); + expect(types.map((t) => [t.name, t.comment])).toEqual([ + ['some_table', 'some table comment'], + ['some_domain', 'some domain comment'], + ['some_composite_type', 'some composite type comment'], + ]); + }); +}); diff --git a/src/kinds/fetchTypes.ts b/src/kinds/fetchTypes.ts new file mode 100644 index 00000000..21d09b3e --- /dev/null +++ b/src/kinds/fetchTypes.ts @@ -0,0 +1,54 @@ +import { Knex } from 'knex'; + +import fetchExtensionItemIds from '../fetchExtensionItemIds'; +import PgType, { classKindMap, typeKindMap } from './PgType'; + +const fetchTypes = async ( + db: Knex, + schemaNames: string[] +): Promise => { + // We want to ignore everything belonging to etensions. (Maybe this should be optional?) + const { extClassOids, extTypeOids } = await fetchExtensionItemIds(db); + + return db + .select( + 'typname as name', + 'nspname as schemaName', + db.raw(`case typtype + when 'c' then case relkind + ${Object.entries(classKindMap) + .map(([key, classKind]) => `when '${key}' then '${classKind}'`) + .join('\n')} + end + ${Object.entries(typeKindMap) + .map(([key, typeKind]) => `when '${key}' then '${typeKind}'`) + .join('\n')} + end as kind`), + db.raw( + // Comments on the class take prescedent, but for composite types, + // they will reside on the type itself. + `COALESCE( + obj_description(COALESCE(pg_class.oid, pg_type.oid)), + obj_description(pg_type.oid) + ) as comment` + ) + ) + .from('pg_catalog.pg_type') + .join('pg_catalog.pg_namespace', 'pg_namespace.oid', 'pg_type.typnamespace') + .fullOuterJoin('pg_catalog.pg_class', 'pg_type.typrelid', 'pg_class.oid') + .where((b1) => + b1 + .where('pg_class.oid', 'is', null) + .orWhere((b2) => + b2 + .where('pg_class.relispartition', false) + .whereNotIn('pg_class.relkind', ['S']) + .whereNotIn('pg_class.oid', extClassOids) + ) + ) + .whereNotIn('pg_type.oid', extTypeOids) + .whereIn('pg_type.typtype', ['c', ...Object.keys(typeKindMap)]) + .whereIn('pg_namespace.nspname', schemaNames); +}; + +export default fetchTypes; diff --git a/src/kinds/parseViewDefinition.test.ts b/src/kinds/parseViewDefinition.test.ts new file mode 100644 index 00000000..61bd934e --- /dev/null +++ b/src/kinds/parseViewDefinition.test.ts @@ -0,0 +1,197 @@ +import { describe, expect, it } from '../tests/fixture'; +import parseViewDefinition from './parseViewDefinition'; + +describe('parseViewDefinition', () => { + it('should understand a trivial select', () => { + const query = `SELECT id FROM service`; + + const def = parseViewDefinition(query, 'public'); + expect(def).toEqual([ + { + viewColumn: 'id', + source: { + schema: 'public', + table: 'service', + column: 'id', + }, + }, + ]); + }); + + it('should understand a select with explicit schema', () => { + const query = `SELECT id FROM store.service`; + + const def = parseViewDefinition(query, 'public'); + expect(def).toEqual([ + { + viewColumn: 'id', + source: { + schema: 'store', + table: 'service', + column: 'id', + }, + }, + ]); + }); + + it('should understand a select with join', () => { + const query = `SELECT service.id, + service."createdAt", + service.name, + "oauthConnection"."createdBy" AS owner + FROM service + LEFT JOIN "oauthConnection" ON service."oauthConnectionId" = "oauthConnection".id;`; + + const def = parseViewDefinition(query, 'public'); + expect(def).toEqual([ + { + viewColumn: 'id', + source: { + schema: 'public', + table: 'service', + column: 'id', + }, + }, + { + viewColumn: 'createdAt', + source: { + schema: 'public', + table: 'service', + column: 'createdAt', + }, + }, + { + viewColumn: 'name', + source: { + schema: 'public', + table: 'service', + column: 'name', + }, + }, + { + viewColumn: 'owner', + source: { + schema: 'public', + table: 'oauthConnection', + column: 'createdBy', + }, + }, + ]); + }); + + it('should work with multiple schemas and with aliases', () => { + const query = ` + select u.id as uid, um.id as umid + from test1.users u + join test2.user_managers um + on um.user_id = u.id;`; + + const def = parseViewDefinition(query, 'public'); + expect(def).toEqual([ + { + viewColumn: 'uid', + source: { + schema: 'test1', + table: 'users', + column: 'id', + }, + }, + { + viewColumn: 'umid', + source: { + schema: 'test2', + table: 'user_managers', + column: 'id', + }, + }, + ]); + }); + + it('should return undefined for unresolvable columns', () => { + const query = ` + SELECT cu.customer_id AS id, + (cu.first_name::text || ' '::text) || cu.last_name::text AS name, + a.address, + a.postal_code AS "zip code", + a.phone, + city.city, + country.country, + CASE + WHEN cu.activebool THEN 'active'::text + ELSE ''::text + END AS notes, + cu.store_id AS sid + FROM customer cu + JOIN address a ON cu.address_id = a.address_id + JOIN city ON a.city_id = city.city_id + JOIN country ON city.country_id = country.country_id;`; + + const def = parseViewDefinition(query, 'public'); + expect(def).toEqual([ + { + viewColumn: 'id', + source: { + schema: 'public', + table: 'customer', + column: 'customer_id', + }, + }, + { + viewColumn: 'name', + source: undefined, + }, + { + viewColumn: 'address', + source: { + schema: 'public', + table: 'address', + column: 'address', + }, + }, + { + viewColumn: 'zip code', + source: { + schema: 'public', + table: 'address', + column: 'postal_code', + }, + }, + { + viewColumn: 'phone', + source: { + schema: 'public', + table: 'address', + column: 'phone', + }, + }, + { + viewColumn: 'city', + source: { + schema: 'public', + table: 'city', + column: 'city', + }, + }, + { + viewColumn: 'country', + source: { + schema: 'public', + table: 'country', + column: 'country', + }, + }, + { + viewColumn: 'notes', + source: undefined, + }, + { + viewColumn: 'sid', + source: { + schema: 'public', + table: 'customer', + column: 'store_id', + }, + }, + ]); + }); +}); diff --git a/src/parse-view-definition.js b/src/kinds/parseViewDefinition.ts similarity index 51% rename from src/parse-view-definition.js rename to src/kinds/parseViewDefinition.ts index e6886eb0..93dd8f91 100644 --- a/src/parse-view-definition.js +++ b/src/kinds/parseViewDefinition.ts @@ -2,7 +2,21 @@ import jp from 'jsonpath'; import pgQuery from 'pg-query-emscripten'; import { last } from 'ramda'; -function parseViewDefinition(selectStatement) { +export type ViewReference = { + viewColumn: string; + source: + | { + schema: string; + table: string; + column: string; + } + | undefined; +}; + +function parseViewDefinition( + selectStatement: string, + defaultSchema: string +): ViewReference[] { const ast = pgQuery.parse(selectStatement).parse_tree[0]; const selectAst = ast.RawStmt?.stmt?.SelectStmt; @@ -31,29 +45,36 @@ function parseViewDefinition(selectStatement) { ast, '$.RawStmt.stmt.SelectStmt.targetList[*].ResTarget' ); - const viewColumns = selectTargets.map((selectTarget) => { + const viewReferences = selectTargets.map((selectTarget) => { const fields = jp.query(selectTarget, '$.val[*].fields[*].String.str'); - let table = firstFromTable?.relname; - let schema = firstFromTable?.schemaname; + let sourceTable = firstFromTable?.relname; + let sourceSchema = firstFromTable?.schemaname; if (fields.length === 2) { const tableRel = fields[0]; if (tableRel in aliases) { - table = aliases[tableRel].table; - schema = aliases[tableRel].schema ?? schema; + sourceTable = aliases[tableRel].table; + sourceSchema = aliases[tableRel].schema ?? sourceSchema; } else { - table = tableRel; + sourceTable = tableRel; } } - return { - name: selectTarget.name || last(fields), - schema, - table, - column: last(fields), - // x, + const sourceColumn = last(fields); + + const viewReference: ViewReference = { + viewColumn: selectTarget.name || last(fields), + source: + sourceTable && sourceColumn + ? { + schema: sourceSchema ?? defaultSchema, + table: sourceTable, + column: last(fields), + } + : undefined, }; + return viewReference; }); - return viewColumns; + return viewReferences; } export default parseViewDefinition; diff --git a/src/kinds/query-parts/commentMapQueryPart.ts b/src/kinds/query-parts/commentMapQueryPart.ts new file mode 100644 index 00000000..7425643e --- /dev/null +++ b/src/kinds/query-parts/commentMapQueryPart.ts @@ -0,0 +1,16 @@ +// Extract comments from attributes. Used for tables, views, materialized views and composite types. + +const commentMapQueryPart = ` + SELECT + a.attname as "column_name", + col_description(c.oid, a.attnum::int) as "comment" + FROM + pg_class c + JOIN pg_attribute a on a.attrelid=c.oid + JOIN pg_namespace n ON c.relnamespace = n.oid + WHERE + n.nspname = :schema_name + AND c.relname = :table_name +`; + +export default commentMapQueryPart; diff --git a/src/kinds/query-parts/fakeInformationSchemaColumnsQueryPart.ts b/src/kinds/query-parts/fakeInformationSchemaColumnsQueryPart.ts new file mode 100644 index 00000000..3f0500bc --- /dev/null +++ b/src/kinds/query-parts/fakeInformationSchemaColumnsQueryPart.ts @@ -0,0 +1,106 @@ +// This is a modified version of the information_schema.columns definition in PostgreSQL v10.17. +// It allows materialized views and composite types to be queried. +// BEWARE: I am not sure that all of the fields return valid data. + +const fakeInformationSchemaColumnsQueryPart = ` + SELECT current_database()::information_schema.sql_identifier AS table_catalog, + nc.nspname::information_schema.sql_identifier AS table_schema, + c.relname::information_schema.sql_identifier AS table_name, + a.attname::information_schema.sql_identifier AS column_name, + a.attnum::information_schema.cardinal_number AS ordinal_position, + pg_get_expr(ad.adbin, ad.adrelid)::information_schema.character_data AS column_default, + CASE + WHEN a.attnotnull OR t.typtype = 'd'::"char" AND t.typnotnull THEN 'NO'::text + ELSE 'YES'::text + END::information_schema.yes_or_no AS is_nullable, + CASE + WHEN t.typtype = 'd'::"char" THEN + CASE + WHEN bt.typelem <> 0::oid AND bt.typlen = '-1'::integer THEN 'ARRAY'::text + WHEN nbt.nspname = 'pg_catalog'::name THEN format_type(t.typbasetype, NULL::integer) + ELSE 'USER-DEFINED'::text + END + ELSE + CASE + WHEN t.typelem <> 0::oid AND t.typlen = '-1'::integer THEN 'ARRAY'::text + WHEN nt.nspname = 'pg_catalog'::name THEN format_type(a.atttypid, NULL::integer) + ELSE 'USER-DEFINED'::text + END + END::information_schema.character_data AS data_type, + information_schema._pg_char_max_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*))::information_schema.cardinal_number AS character_maximum_length, + information_schema._pg_char_octet_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*))::information_schema.cardinal_number AS character_octet_length, + information_schema._pg_numeric_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*))::information_schema.cardinal_number AS numeric_precision, + information_schema._pg_numeric_precision_radix(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*))::information_schema.cardinal_number AS numeric_precision_radix, + information_schema._pg_numeric_scale(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*))::information_schema.cardinal_number AS numeric_scale, + information_schema._pg_datetime_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*))::information_schema.cardinal_number AS datetime_precision, + information_schema._pg_interval_type(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*))::information_schema.character_data AS interval_type, + NULL::integer::information_schema.cardinal_number AS interval_precision, + NULL::character varying::information_schema.sql_identifier AS character_set_catalog, + NULL::character varying::information_schema.sql_identifier AS character_set_schema, + NULL::character varying::information_schema.sql_identifier AS character_set_name, + CASE + WHEN nco.nspname IS NOT NULL THEN current_database() + ELSE NULL::name + END::information_schema.sql_identifier AS collation_catalog, + nco.nspname::information_schema.sql_identifier AS collation_schema, + co.collname::information_schema.sql_identifier AS collation_name, + CASE + WHEN t.typtype = 'd'::"char" THEN current_database() + ELSE NULL::name + END::information_schema.sql_identifier AS domain_catalog, + CASE + WHEN t.typtype = 'd'::"char" THEN nt.nspname + ELSE NULL::name + END::information_schema.sql_identifier AS domain_schema, + CASE + WHEN t.typtype = 'd'::"char" THEN t.typname + ELSE NULL::name + END::information_schema.sql_identifier AS domain_name, + current_database()::information_schema.sql_identifier AS udt_catalog, + COALESCE(nbt.nspname, nt.nspname)::information_schema.sql_identifier AS udt_schema, + COALESCE(bt.typname, t.typname)::information_schema.sql_identifier AS udt_name, + NULL::character varying::information_schema.sql_identifier AS scope_catalog, + NULL::character varying::information_schema.sql_identifier AS scope_schema, + NULL::character varying::information_schema.sql_identifier AS scope_name, + NULL::integer::information_schema.cardinal_number AS maximum_cardinality, + a.attnum::information_schema.sql_identifier AS dtd_identifier, + 'NO'::character varying::information_schema.yes_or_no AS is_self_referencing, + CASE + WHEN a.attidentity = ANY (ARRAY['a'::"char", 'd'::"char"]) THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS is_identity, + CASE a.attidentity + WHEN 'a'::"char" THEN 'ALWAYS'::text + WHEN 'd'::"char" THEN 'BY DEFAULT'::text + ELSE NULL::text + END::information_schema.character_data AS identity_generation, + seq.seqstart::information_schema.character_data AS identity_start, + seq.seqincrement::information_schema.character_data AS identity_increment, + seq.seqmax::information_schema.character_data AS identity_maximum, + seq.seqmin::information_schema.character_data AS identity_minimum, + CASE + WHEN seq.seqcycle THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS identity_cycle, + 'NEVER'::character varying::information_schema.character_data AS is_generated, + NULL::character varying::information_schema.character_data AS generation_expression, + CASE + WHEN (c.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) OR (c.relkind = ANY (ARRAY['v'::"char", 'f'::"char"])) AND pg_column_is_updatable(c.oid::regclass, a.attnum, false) THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS is_updatable + FROM pg_attribute a + LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum + JOIN (pg_class c + JOIN pg_namespace nc ON c.relnamespace = nc.oid) ON a.attrelid = c.oid + JOIN (pg_type t + JOIN pg_namespace nt ON t.typnamespace = nt.oid) ON a.atttypid = t.oid + LEFT JOIN (pg_type bt + JOIN pg_namespace nbt ON bt.typnamespace = nbt.oid) ON t.typtype = 'd'::"char" AND t.typbasetype = bt.oid + LEFT JOIN (pg_collation co + JOIN pg_namespace nco ON co.collnamespace = nco.oid) ON a.attcollation = co.oid AND (nco.nspname <> 'pg_catalog'::name OR co.collname <> 'default'::name) + LEFT JOIN (pg_depend dep + JOIN pg_sequence seq ON dep.classid = 'pg_class'::regclass::oid AND dep.objid = seq.seqrelid AND dep.deptype = 'i'::"char") ON dep.refclassid = 'pg_class'::regclass::oid AND dep.refobjid = c.oid AND dep.refobjsubid = a.attnum + WHERE NOT pg_is_other_temp_schema(nc.oid) AND a.attnum > 0 AND NOT a.attisdropped AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char", 'm'::"char", 'c'::"char"])) AND (pg_has_role(c.relowner, 'USAGE'::text) OR has_column_privilege(c.oid, a.attnum, 'SELECT, INSERT, UPDATE, REFERENCES'::text)) +`; + +export default fakeInformationSchemaColumnsQueryPart; diff --git a/src/kinds/query-parts/fakeInformationSchemaViewsQueryPart.ts b/src/kinds/query-parts/fakeInformationSchemaViewsQueryPart.ts new file mode 100644 index 00000000..d569b920 --- /dev/null +++ b/src/kinds/query-parts/fakeInformationSchemaViewsQueryPart.ts @@ -0,0 +1,49 @@ +// This is a modified version of the information_schema.views definition in PostgreSQL v10.17. +// It allows materialized views to be queried. +// BEWARE: I am not sure that all of the fields return valid data. + +const fakeInformationSchemaViewsQueryPart = ` + SELECT current_database()::information_schema.sql_identifier AS table_catalog, + nc.nspname::information_schema.sql_identifier AS table_schema, + c.relname::information_schema.sql_identifier AS table_name, + CASE + WHEN pg_has_role(c.relowner, 'USAGE'::text) THEN pg_get_viewdef(c.oid) + ELSE NULL::text + END::information_schema.character_data AS view_definition, + CASE + WHEN 'check_option=cascaded'::text = ANY (c.reloptions) THEN 'CASCADED'::text + WHEN 'check_option=local'::text = ANY (c.reloptions) THEN 'LOCAL'::text + ELSE 'NONE'::text + END::information_schema.character_data AS check_option, + CASE + WHEN (pg_relation_is_updatable(c.oid::regclass, false) & 20) = 20 THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS is_updatable, + CASE + WHEN (pg_relation_is_updatable(c.oid::regclass, false) & 8) = 8 THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS is_insertable_into, + CASE + WHEN (EXISTS ( SELECT 1 + FROM pg_trigger + WHERE pg_trigger.tgrelid = c.oid AND (pg_trigger.tgtype::integer & 81) = 81)) THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS is_trigger_updatable, + CASE + WHEN (EXISTS ( SELECT 1 + FROM pg_trigger + WHERE pg_trigger.tgrelid = c.oid AND (pg_trigger.tgtype::integer & 73) = 73)) THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS is_trigger_deletable, + CASE + WHEN (EXISTS ( SELECT 1 + FROM pg_trigger + WHERE pg_trigger.tgrelid = c.oid AND (pg_trigger.tgtype::integer & 69) = 69)) THEN 'YES'::text + ELSE 'NO'::text + END::information_schema.yes_or_no AS is_trigger_insertable_into + FROM pg_namespace nc, + pg_class c + WHERE c.relnamespace = nc.oid AND c.relkind = ANY (ARRAY['v'::"char", 'm'::"char"]) AND NOT pg_is_other_temp_schema(nc.oid) AND (pg_has_role(c.relowner, 'USAGE'::text) OR has_table_privilege(c.oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(c.oid, 'SELECT, INSERT, UPDATE, REFERENCES'::text)) +`; + +export default fakeInformationSchemaViewsQueryPart; diff --git a/src/kinds/query-parts/indexMapQueryPart.ts b/src/kinds/query-parts/indexMapQueryPart.ts new file mode 100644 index 00000000..3ad58ef7 --- /dev/null +++ b/src/kinds/query-parts/indexMapQueryPart.ts @@ -0,0 +1,25 @@ +const indexMapQueryPart = ` + SELECT + a.attname AS column_name, + bool_or(ix.indisprimary) AS is_primary, + json_agg(json_build_object( + 'name', i.relname, + 'isPrimary', ix.indisprimary) + ) AS indices + FROM + pg_class t, + pg_class i, + pg_index ix, + pg_attribute a + WHERE + t.oid = ix.indrelid + AND i.oid = ix.indexrelid + AND a.attrelid = t.oid + AND a.attnum = ANY (ix.indkey) + AND t.relkind = 'r' + AND t.relname = :table_name + GROUP BY + a.attname +`; + +export default indexMapQueryPart; diff --git a/src/parse-comment.test.js b/src/parse-comment.test.js deleted file mode 100644 index 22627ed7..00000000 --- a/src/parse-comment.test.js +++ /dev/null @@ -1,35 +0,0 @@ -import { describe, expect, it } from 'vitest'; - -import parseComment from './parse-comment'; - -describe('parseComment', () => { - it('should return a simple string', () => { - expect(parseComment('Hello')).toEqual({ comment: 'Hello', tags: {} }); - }); - - it('should return sane values for undefined', () => { - expect(parseComment(undefined)).toEqual({ comment: undefined, tags: {} }); - }); - - it('should extract tags', () => { - expect(parseComment('Organization member @fixed')).toEqual({ - comment: 'Organization member', - tags: { fixed: true }, - }); - - expect(parseComment('@fixed Organization member')).toEqual({ - comment: 'Organization member', - tags: { fixed: true }, - }); - - expect(parseComment('Organization member @order:1 @key:yellow')).toEqual({ - comment: 'Organization member', - tags: { order: '1', key: 'yellow' }, - }); - - expect(parseComment('Organization member @order:1 @order:2')).toEqual({ - comment: 'Organization member', - tags: { order: '2' }, - }); - }); -}); diff --git a/src/parse-comment.ts b/src/parse-comment.ts deleted file mode 100644 index 1fb420e0..00000000 --- a/src/parse-comment.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Parse a possibly tagged string. - * Example: "This is a comment that has tags @a @b:123" - * returns: { comment: "This is a comment that has tags", tags: { a: true, b: '123' }} - */ -const parseComment = ( - source: string | undefined -): { - comment: string | undefined; - tags: { [index: string]: string | boolean }; -} => { - if (!source) { - return { comment: undefined, tags: {} }; - } - - const matches = source.match(/(@(\S*))/g) ?? []; - const tags = matches.reduce((acc, elem) => { - const [name, value = true] = elem.substr(1).split(':'); - acc[name] = value; - return acc; - }, {} as { [index: string]: string | boolean }); - const comment = matches - .reduce((acc, match) => acc.replace(match, ''), source) - .trim(); - - return { - comment, - tags, - }; -}; - -export default parseComment; diff --git a/src/parse-view-definition.test.js b/src/parse-view-definition.test.js deleted file mode 100644 index 5a617960..00000000 --- a/src/parse-view-definition.test.js +++ /dev/null @@ -1,64 +0,0 @@ -import { describe, expect, it } from 'vitest'; - -import parseViewDefinition from './parse-view-definition'; - -describe('parseViewDefinition', () => { - it('should understand a trivial select', () => { - const query = `SELECT id FROM service`; - - const def = parseViewDefinition(query); - expect(def).toEqual([ - { name: 'id', schema: undefined, table: 'service', column: 'id' }, - ]); - }); - - it('should understand a select with explicit schema', () => { - const query = `SELECT id FROM public.service`; - - const def = parseViewDefinition(query); - expect(def).toEqual([ - { name: 'id', schema: 'public', table: 'service', column: 'id' }, - ]); - }); - - it('should understand a select with join', () => { - const query = `SELECT service.id, - service."createdAt", - service.name, - "oauthConnection"."createdBy" AS owner - FROM service - LEFT JOIN "oauthConnection" ON service."oauthConnectionId" = "oauthConnection".id;`; - - const def = parseViewDefinition(query); - expect(def).toEqual([ - { name: 'id', schema: undefined, table: 'service', column: 'id' }, - { - name: 'createdAt', - schema: undefined, - table: 'service', - column: 'createdAt', - }, - { name: 'name', schema: undefined, table: 'service', column: 'name' }, - { - name: 'owner', - schema: undefined, - table: 'oauthConnection', - column: 'createdBy', - }, - ]); - }); - - it('should work with multiple schemas and with aliases', () => { - const query = ` - select u.id as uid, um.id as umid - from test1.users u - join test2.user_managers um - on um.user_id = u.id;`; - - const def = parseViewDefinition(query); - expect(def).toEqual([ - { name: 'uid', schema: 'test1', table: 'users', column: 'id' }, - { name: 'umid', schema: 'test2', table: 'user_managers', column: 'id' }, - ]); - }); -}); diff --git a/src/pg-query-emscripten.d.ts b/src/pg-query-emscripten.d.ts new file mode 100644 index 00000000..c2f170b5 --- /dev/null +++ b/src/pg-query-emscripten.d.ts @@ -0,0 +1 @@ +declare module 'pg-query-emscripten'; diff --git a/src/resolve-view-columns.ts b/src/resolve-view-columns.ts deleted file mode 100644 index a637d287..00000000 --- a/src/resolve-view-columns.ts +++ /dev/null @@ -1,54 +0,0 @@ -import * as R from 'ramda'; - -import { TableOrView } from './types'; - -const resolveViewColumns = ( - views: TableOrView[], - tables: TableOrView[], - schemaName: string -): TableOrView[] => { - const everything = R.indexBy(R.prop('name'), [...tables, ...views]); - - return views.map((view) => { - const columns = view.columns.map((column) => { - let source = column.source; - while (source) { - if (source.schema && source.schema !== schemaName) { - console.error( - `Could not follow source of ${schemaName}.${view.name}.${column.name} because it references a different schema: ${source.schema}.` - ); - source = undefined; - } else { - const sourceColumn = everything[source.table].columns.find( - (col) => col.name === source!.column - ); - if (!sourceColumn) { - throw new Error( - `Column ${source.schema ?? schemaName}.${source.table}.${ - source.column - } was not found..` - ); - } - if (sourceColumn.source) { - source = sourceColumn.source; - } else { - return { - ...column, - nullable: sourceColumn.nullable, - reference: sourceColumn.reference, - isPrimary: sourceColumn.isPrimary, - indices: sourceColumn.indices, - }; - } - } - } - return column; - }); - return { - ...view, - columns, - }; - }); -}; - -export default resolveViewColumns; diff --git a/src/resolveViewColumns.ts b/src/resolveViewColumns.ts new file mode 100644 index 00000000..ebce43d7 --- /dev/null +++ b/src/resolveViewColumns.ts @@ -0,0 +1,70 @@ +import { Schema } from './extractSchemas'; +import { + MaterializedViewColumn, + MaterializedViewDetails, +} from './kinds/extractMaterializedView'; +import { TableColumn } from './kinds/extractTable'; +import { ViewColumn, ViewDetails } from './kinds/extractView'; + +type Column = TableColumn | ViewColumn | MaterializedViewColumn; + +const resolveViewColumns = ( + schemas: Record +): Record => { + const resolve = ( + view: T + ): T => { + const columns = view.columns.map((column) => { + let source = column.source; + while (source) { + const predicate = (col: Column) => col.name === source!.column; + let sourceColumn: Column | undefined = schemas[source.schema].tables + .find((table) => table.name === source!.table) + ?.columns.find(predicate); + if (!sourceColumn) { + sourceColumn = schemas[source.schema].views + .find((view) => view.name === source!.table) + ?.columns.find(predicate); + } + if (!sourceColumn) { + sourceColumn = schemas[source.schema].materializedViews + .find((view) => view.name === source!.table) + ?.columns.find(predicate); + } + if (!sourceColumn) { + throw new Error( + `Column ${source.schema}.${source.table}.${source.column} was not found..` + ); + } + if ((sourceColumn as ViewColumn | MaterializedViewColumn).source) { + source = (sourceColumn as ViewColumn | MaterializedViewColumn).source; + } else { + return { + ...column, + isNullable: sourceColumn.isNullable, + reference: sourceColumn.reference, + isPrimaryKey: sourceColumn.isPrimaryKey, + indices: sourceColumn.indices, + }; + } + } + return column; + }); + return { + ...view, + columns, + }; + }; + + const result = { ...schemas }; + + Object.keys(result).forEach((schema) => { + result[schema].views = result[schema].views.map(resolve); + result[schema].materializedViews = + result[schema].materializedViews.map(resolve); + }); + + return result; +}; + +export default resolveViewColumns; diff --git a/src/tests/fixture.ts b/src/tests/fixture.ts new file mode 100644 index 00000000..c91eb1d7 --- /dev/null +++ b/src/tests/fixture.ts @@ -0,0 +1,66 @@ +import { + afterAll as viAfterAll, + afterEach as viAfterEach, + beforeAll as viBeforeAll, + beforeEach as viBeforeEach, + describe as viDescribe, +} from 'vitest'; + +export { expect, it, test } from 'vitest'; + +export let describe: (name: string, fn: () => void) => void; + +let globalScope = ''; +const makeDescribeForScope = + (scope: string) => (name: string, fn: () => void) => { + viDescribe(name, () => { + const previousD = describe; + globalScope = `${scope}/${name}`; + describe = makeDescribeForScope(globalScope); + fn(); + describe = previousD; + }); + }; + +describe = makeDescribeForScope(''); + +type HookMap = Record Promise) | (() => void))[]>; + +const makeHook = + ( + map: HookMap, + viFunc: (p: () => Promise, timeout?: number) => void, + type: 'before' | 'after' + ) => + (fn: (() => Promise) | (() => void), timeout?: number) => { + if (!map[globalScope]) { + map[globalScope] = []; + + // Call the function with the scope that is *currently* set, + // not what it will be when we reach it. + const closureScope = globalScope; + + viFunc(async () => { + for (const fn of map[closureScope]) { + await fn(); + } + }, timeout); + } + if (type === 'after') { + map[globalScope].unshift(fn); + } else { + map[globalScope].push(fn); + } + }; + +const beforeEachMap: HookMap = {}; +export const beforeEach = makeHook(beforeEachMap, viBeforeEach, 'before'); + +const afterEachMap: HookMap = {}; +export const afterEach = makeHook(afterEachMap, viAfterEach, 'after'); + +const beforeAllMap: HookMap = {}; +export const beforeAll = makeHook(beforeAllMap, viBeforeAll, 'before'); + +const afterAllMap: HookMap = {}; +export const afterAll = makeHook(afterAllMap, viAfterAll, 'after'); diff --git a/src/tests/globalSetup.ts b/src/tests/globalSetup.ts new file mode 100644 index 00000000..2f0ed085 --- /dev/null +++ b/src/tests/globalSetup.ts @@ -0,0 +1,29 @@ +import { StartedTestContainer } from 'testcontainers'; + +import startTestContainer from './startTestContainer'; + +const containerLogPrefix = 'postgres-container>>> '; +let container: StartedTestContainer; + +export const setup = async () => { + if (process.arch === 'arm64') { + // Ryuk doesn't work on arm64 at the time of writing. + // Disable and prune docker images manually + // eslint-disable-next-line no-process-env + process.env['TESTCONTAINERS_RYUK_DISABLED'] = 'true'; + } + + container = await startTestContainer('postgres'); + + const stream = await container.logs(); + stream + // .on('data', (line) => console.log(containerLogPrefix + line)) + .on('err', (line) => console.error(containerLogPrefix + line)) + .on('end', () => console.info(containerLogPrefix + 'Stream closed')); +}; + +export const teardown = async () => { + await container.stop({ + timeout: 10000, + }); +}; diff --git a/src/tests/startTestContainer.ts b/src/tests/startTestContainer.ts new file mode 100644 index 00000000..3e4c9d27 --- /dev/null +++ b/src/tests/startTestContainer.ts @@ -0,0 +1,15 @@ +import { GenericContainer } from 'testcontainers'; + +const timeout = 5 * 60 * 1000; + +const startTestContainer = async (image: string) => + // Starting this with withReuse() enabled will spin up the container + // on the first call and then reuse it on subsequent calls. + new GenericContainer(image) + .withReuse() + .withExposedPorts(5432) + .withEnv('POSTGRES_PASSWORD', 'postgres') + .withStartupTimeout(timeout) + .start(); + +export default startTestContainer; diff --git a/src/tests/usePostgresContainer.ts b/src/tests/usePostgresContainer.ts new file mode 100644 index 00000000..18e98fd8 --- /dev/null +++ b/src/tests/usePostgresContainer.ts @@ -0,0 +1,18 @@ +import { StartedTestContainer } from 'testcontainers'; + +import { beforeAll } from './fixture'; +import startTestContainer from './startTestContainer'; + +const timeout = 5 * 60 * 1000; + +const usePostgresContainer = (image: string = 'postgres') => { + let container: StartedTestContainer; + + beforeAll(async () => { + container = await startTestContainer(image); + }, timeout); + + return () => container; +}; + +export default usePostgresContainer; diff --git a/src/tests/useSchema.ts b/src/tests/useSchema.ts new file mode 100644 index 00000000..a4b33e18 --- /dev/null +++ b/src/tests/useSchema.ts @@ -0,0 +1,17 @@ +import { Knex } from 'knex'; + +import { afterEach, beforeEach } from './fixture'; + +const useSchema = (getKnex: () => Knex, schemaName: string) => { + beforeEach(async () => { + const db = getKnex(); + await db.schema.createSchemaIfNotExists(schemaName); + }); + + afterEach(async () => { + const db = getKnex(); + await db.schema.dropSchemaIfExists(schemaName, true); + }); +}; + +export default useSchema; diff --git a/src/tests/useTestKnex.ts b/src/tests/useTestKnex.ts new file mode 100644 index 00000000..8c5f2547 --- /dev/null +++ b/src/tests/useTestKnex.ts @@ -0,0 +1,58 @@ +import knex, { Knex } from 'knex'; + +import { afterAll, beforeAll } from './fixture'; +import usePostgresContainer from './usePostgresContainer'; + +const useTestKnex = () => { + let knexInstance: Knex; + const databaseName = `test_${Math.ceil(Math.random() * 1000)}`; + + const getContainer = usePostgresContainer(); + + beforeAll(async () => { + const container = getContainer(); + const connection = { + host: container.getHost(), + port: container.getMappedPort(5432), + password: 'postgres', + user: 'postgres', + }; + + const setupKnexInstance = knex({ + client: 'postgres', + connection: { ...connection, database: 'postgres' }, + }); + await setupKnexInstance.raw('create database ??', [databaseName]); + await setupKnexInstance.destroy(); + + knexInstance = knex({ + client: 'postgres', + connection: { ...connection, database: databaseName }, + }); + }); + + afterAll(async () => { + const container = getContainer(); + const connection = { + host: container.getHost(), + port: container.getMappedPort(5432), + password: 'postgres', + user: 'postgres', + }; + + const setupKnexInstance = knex({ + client: 'postgres', + connection: { ...connection, database: 'postgres' }, + }); + + setupKnexInstance + .raw(`drop database ${databaseName} with (force)`) + .then(() => setupKnexInstance.destroy()); + + await knexInstance.destroy(); + }); + + return [() => knexInstance, databaseName] as const; +}; + +export default useTestKnex; diff --git a/src/types.ts b/src/types.ts deleted file mode 100644 index a8627c0c..00000000 --- a/src/types.ts +++ /dev/null @@ -1,93 +0,0 @@ -export type Index = { name: string; isPrimary: boolean }; - -export type TagMap = { [index: string]: string | boolean }; - -export type UpdateAction = - | 'SET NULL' - | 'SET DEFAULT' - | 'RESTRICT' - | 'NO ACTION' - | 'CASCADE'; - -export type GenerationType = 'ALWAYS' | 'BY DEFAULT' | 'NEVER'; - -export type Reference = { - schema: string; - table: string; - column: string; - onDelete: UpdateAction; - onUpdate: UpdateAction; -}; - -export type Column = { - name: string; - - /** @deprecated use reference instead, this will be removed in the future */ - parent: string; - - reference?: Reference; - indices: Index[]; - maxLength: number; - nullable: boolean; - defaultValue: any; - isPrimary: boolean; - isIdentity: boolean; - isArray: boolean; - generated: GenerationType; - isUpdatable: boolean; - type: string; - subType: string; - comment: string; - tags: TagMap; - - /** - * For views, this will contain the original column, if it could be determined. - * If schema is undefined, it means "same schema as the view". - */ - source?: { schema: string | undefined; table: string; column: string }; - - rawInfo: object; -}; - -export type Attribute = { - name: string; - - maxLength: number; - nullable: boolean; - defaultValue: any; - type: string; - comment: string; - tags: TagMap; - rawInfo: object; -}; - -export type TableOrView = { - name: string; - columns: Column[]; - comment: string; - tags: TagMap; -}; - -export type Type = EnumType | CompositeType; - -export type EnumType = { - name: string; - type: 'enum'; - values: string[]; - comment: string; - tags: TagMap; -}; - -export type CompositeType = { - name: string; - type: 'composite'; - attributes: Attribute[]; - comment: string; - tags: TagMap; -}; - -export type Schema = { - tables: TableOrView[]; - views: TableOrView[]; - types: Type[]; -}; diff --git a/vitest.config.ts b/vitest.config.ts index e287a202..c96ce042 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,5 +4,6 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + globalSetup: 'src/tests/globalSetup.ts', }, }); diff --git a/yarn.lock b/yarn.lock index 0ba18010..1c37dda0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,129 @@ # yarn lockfile v1 +"@algolia/autocomplete-core@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz#025538b8a9564a9f3dd5bcf8a236d6951c76c7d1" + integrity sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg== + dependencies: + "@algolia/autocomplete-shared" "1.7.1" + +"@algolia/autocomplete-preset-algolia@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz#7dadc5607097766478014ae2e9e1c9c4b3f957c8" + integrity sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg== + dependencies: + "@algolia/autocomplete-shared" "1.7.1" + +"@algolia/autocomplete-shared@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz#95c3a0b4b78858fed730cf9c755b7d1cd0c82c74" + integrity sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg== + +"@algolia/cache-browser-local-storage@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.13.1.tgz#ffacb9230119f77de1a6f163b83680be999110e4" + integrity sha512-UAUVG2PEfwd/FfudsZtYnidJ9eSCpS+LW9cQiesePQLz41NAcddKxBak6eP2GErqyFagSlnVXe/w2E9h2m2ttg== + dependencies: + "@algolia/cache-common" "4.13.1" + +"@algolia/cache-common@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.13.1.tgz#c933fdec9f73b4f7c69d5751edc92eee4a63d76b" + integrity sha512-7Vaf6IM4L0Jkl3sYXbwK+2beQOgVJ0mKFbz/4qSxKd1iy2Sp77uTAazcX+Dlexekg1fqGUOSO7HS4Sx47ZJmjA== + +"@algolia/cache-in-memory@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.13.1.tgz#c19baa67b4597e1a93e987350613ab3b88768832" + integrity sha512-pZzybCDGApfA/nutsFK1P0Sbsq6fYJU3DwIvyKg4pURerlJM4qZbB9bfLRef0FkzfQu7W11E4cVLCIOWmyZeuQ== + dependencies: + "@algolia/cache-common" "4.13.1" + +"@algolia/client-account@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.13.1.tgz#fea591943665477a23922ab31863ad0732e26c66" + integrity sha512-TFLiZ1KqMiir3FNHU+h3b0MArmyaHG+eT8Iojio6TdpeFcAQ1Aiy+2gb3SZk3+pgRJa/BxGmDkRUwE5E/lv3QQ== + dependencies: + "@algolia/client-common" "4.13.1" + "@algolia/client-search" "4.13.1" + "@algolia/transporter" "4.13.1" + +"@algolia/client-analytics@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.13.1.tgz#5275956b2d0d16997148f2085f1701b6c39ecc32" + integrity sha512-iOS1JBqh7xaL5x00M5zyluZ9+9Uy9GqtYHv/2SMuzNW1qP7/0doz1lbcsP3S7KBbZANJTFHUOfuqyRLPk91iFA== + dependencies: + "@algolia/client-common" "4.13.1" + "@algolia/client-search" "4.13.1" + "@algolia/requester-common" "4.13.1" + "@algolia/transporter" "4.13.1" + +"@algolia/client-common@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.13.1.tgz#3bf9e3586f20ef85bbb56ccca390f7dbe57c8f4f" + integrity sha512-LcDoUE0Zz3YwfXJL6lJ2OMY2soClbjrrAKB6auYVMNJcoKZZ2cbhQoFR24AYoxnGUYBER/8B+9sTBj5bj/Gqbg== + dependencies: + "@algolia/requester-common" "4.13.1" + "@algolia/transporter" "4.13.1" + +"@algolia/client-personalization@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.13.1.tgz#438a1f58576ef19c4ad4addb8417bdacfe2fce2e" + integrity sha512-1CqrOW1ypVrB4Lssh02hP//YxluoIYXAQCpg03L+/RiXJlCs+uIqlzC0ctpQPmxSlTK6h07kr50JQoYH/TIM9w== + dependencies: + "@algolia/client-common" "4.13.1" + "@algolia/requester-common" "4.13.1" + "@algolia/transporter" "4.13.1" + +"@algolia/client-search@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.13.1.tgz#5501deed01e23c33d4aaa9f9eb96a849f0fce313" + integrity sha512-YQKYA83MNRz3FgTNM+4eRYbSmHi0WWpo019s5SeYcL3HUan/i5R09VO9dk3evELDFJYciiydSjbsmhBzbpPP2A== + dependencies: + "@algolia/client-common" "4.13.1" + "@algolia/requester-common" "4.13.1" + "@algolia/transporter" "4.13.1" + +"@algolia/logger-common@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.13.1.tgz#4221378e701e3f1eacaa051bcd4ba1f25ddfaf4d" + integrity sha512-L6slbL/OyZaAXNtS/1A8SAbOJeEXD5JcZeDCPYDqSTYScfHu+2ePRTDMgUTY4gQ7HsYZ39N1LujOd8WBTmM2Aw== + +"@algolia/logger-console@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.13.1.tgz#423d358e4992dd4bceab0d9a4e99d1fd68107043" + integrity sha512-7jQOTftfeeLlnb3YqF8bNgA2GZht7rdKkJ31OCeSH2/61haO0tWPoNRjZq9XLlgMQZH276pPo0NdiArcYPHjCA== + dependencies: + "@algolia/logger-common" "4.13.1" + +"@algolia/requester-browser-xhr@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.13.1.tgz#f8ea79233cf6f0392feaf31e35a6b40d68c5bc9e" + integrity sha512-oa0CKr1iH6Nc7CmU6RE7TnXMjHnlyp7S80pP/LvZVABeJHX3p/BcSCKovNYWWltgTxUg0U1o+2uuy8BpMKljwA== + dependencies: + "@algolia/requester-common" "4.13.1" + +"@algolia/requester-common@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.13.1.tgz#daea143d15ab6ed3909c4c45877f1b6c36a16179" + integrity sha512-eGVf0ID84apfFEuXsaoSgIxbU3oFsIbz4XiotU3VS8qGCJAaLVUC5BUJEkiFENZIhon7hIB4d0RI13HY4RSA+w== + +"@algolia/requester-node-http@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.13.1.tgz#32c63d4c009f22d97e396406de7af9b66fb8e89d" + integrity sha512-7C0skwtLdCz5heKTVe/vjvrqgL/eJxmiEjHqXdtypcE5GCQCYI15cb+wC4ytYioZDMiuDGeVYmCYImPoEgUGPw== + dependencies: + "@algolia/requester-common" "4.13.1" + +"@algolia/transporter@4.13.1": + version "4.13.1" + resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.13.1.tgz#509e03e9145102843d5be4a031c521f692d4e8d6" + integrity sha512-pICnNQN7TtrcYJqqPEXByV8rJ8ZRU2hCiIKLTLRyNpghtQG3VAFk6fVtdzlNfdUGZcehSKGarPIZEHlQXnKjgw== + dependencies: + "@algolia/cache-common" "4.13.1" + "@algolia/logger-common" "4.13.1" + "@algolia/requester-common" "4.13.1" + "@ampproject/remapping@^2.1.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" @@ -177,6 +300,11 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/parser@^7.16.4": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.6.tgz#845338edecad65ebffef058d3be851f1d28a63bc" + integrity sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw== + "@babel/parser@^7.16.7", "@babel/parser@^7.18.0": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.0.tgz#10a8d4e656bc01128d299a787aa006ce1a91e112" @@ -220,6 +348,29 @@ resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q== +"@docsearch/css@3.1.1", "@docsearch/css@^3.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.1.1.tgz#e0976bf995e383f8ee8657306311b9cb95016330" + integrity sha512-utLgg7E1agqQeqCJn05DWC7XXMk4tMUUnL7MZupcknRu2OzGN13qwey2qA/0NAKkVBGugiWtON0+rlU0QIPojg== + +"@docsearch/js@^3.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docsearch/js/-/js-3.1.1.tgz#fbcf85d034b11ae15397310ef117c7d6fb4e6871" + integrity sha512-bt7l2aKRoSnLUuX+s4LVQ1a7AF2c9myiZNv5uvQCePG5tpvVGpwrnMwqVXOUJn9q6FwVVhOrQMO/t+QmnnAEUw== + dependencies: + "@docsearch/react" "3.1.1" + preact "^10.0.0" + +"@docsearch/react@3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.1.1.tgz#3dffb5db8cf9eb95d6e732cf038264bfc10191ed" + integrity sha512-cfoql4qvtsVRqBMYxhlGNpvyy/KlCoPqjIsJSZYqYf9AplZncKjLBTcwBu6RXFMVCe30cIFljniI4OjqAU67pQ== + dependencies: + "@algolia/autocomplete-core" "1.7.1" + "@algolia/autocomplete-preset-algolia" "1.7.1" + "@docsearch/css" "3.1.1" + algoliasearch "^4.0.0" + "@eslint/eslintrc@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" @@ -305,6 +456,61 @@ eslint-plugin-simple-import-sort "^7.0.0" typescript "4.6.4" +"@microsoft/api-documenter@^7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.18.0.tgz#d81de81dab98b675d23adf2868d16da84fb36dee" + integrity sha512-O2IlE1G6xpa5xoTw1fDflSJBrTT5zMkZj9nMNFXhIYpU5YgpCet+ugnC/cGTjH+0W2lu69asBWJZiMUZ7F1a4w== + dependencies: + "@microsoft/api-extractor-model" "7.21.0" + "@microsoft/tsdoc" "0.14.1" + "@rushstack/node-core-library" "3.49.0" + "@rushstack/ts-command-line" "4.12.1" + colors "~1.2.1" + js-yaml "~3.13.1" + resolve "~1.17.0" + +"@microsoft/api-extractor-model@7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.21.0.tgz#2138682e738a14038d40165ec77362e69853f200" + integrity sha512-NN4mXzoQWTuzznIcnLWeV6tGyn6Os9frDK6M/mmTXZ73vUYOvSWoKQ5SYzyzP7HF3YtvTmr1Rs+DsBb0HRx7WQ== + dependencies: + "@microsoft/tsdoc" "0.14.1" + "@microsoft/tsdoc-config" "~0.16.1" + "@rushstack/node-core-library" "3.49.0" + +"@microsoft/api-extractor@^7.28.2": + version "7.28.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.28.2.tgz#41612a15d98b46fc5aeadd3e27198f572bafb770" + integrity sha512-sl97erZ5Zh3ov5dvV/rMSt45//dYf7C5Y6PCpIXpFidDYMyRwN+pizZ543g2d8D5/WbthGvsZoYcYSzG7CkjHQ== + dependencies: + "@microsoft/api-extractor-model" "7.21.0" + "@microsoft/tsdoc" "0.14.1" + "@microsoft/tsdoc-config" "~0.16.1" + "@rushstack/node-core-library" "3.49.0" + "@rushstack/rig-package" "0.3.13" + "@rushstack/ts-command-line" "4.12.1" + colors "~1.2.1" + lodash "~4.17.15" + resolve "~1.17.0" + semver "~7.3.0" + source-map "~0.6.1" + typescript "~4.6.3" + +"@microsoft/tsdoc-config@~0.16.1": + version "0.16.1" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.16.1.tgz#4de11976c1202854c4618f364bf499b4be33e657" + integrity sha512-2RqkwiD4uN6MLnHFljqBlZIXlt/SaUT6cuogU1w2ARw4nKuuppSmR0+s+NC+7kXBQykd9zzu0P4HtBpZT5zBpQ== + dependencies: + "@microsoft/tsdoc" "0.14.1" + ajv "~6.12.6" + jju "~1.4.0" + resolve "~1.19.0" + +"@microsoft/tsdoc@0.14.1": + version "0.14.1" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz#155ef21065427901994e765da8a0ba0eaae8b8bd" + integrity sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw== + "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -326,6 +532,39 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@rushstack/node-core-library@3.49.0": + version "3.49.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.49.0.tgz#0324c1a5ba5e469967b70e9718d1a90750648503" + integrity sha512-yBJRzGgUNFwulVrwwBARhbGaHsxVMjsZ9JwU1uSBbqPYCdac+t2HYdzi4f4q/Zpgb0eNbwYj2yxgHYpJORNEaw== + dependencies: + "@types/node" "12.20.24" + colors "~1.2.1" + fs-extra "~7.0.1" + import-lazy "~4.0.0" + jju "~1.4.0" + resolve "~1.17.0" + semver "~7.3.0" + timsort "~0.3.0" + z-schema "~5.0.2" + +"@rushstack/rig-package@0.3.13": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.13.tgz#80d7b34bc9b7a7feeba133f317df8dbd1f65a822" + integrity sha512-4/2+yyA/uDl7LQvtYtFs1AkhSWuaIGEKhP9/KK2nNARqOVc5eCXmu1vyOqr5mPvNq7sHoIR+sG84vFbaKYGaDA== + dependencies: + resolve "~1.17.0" + strip-json-comments "~3.1.1" + +"@rushstack/ts-command-line@4.12.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.1.tgz#4437ffae6459eb88791625ad9e89b2f0ba254476" + integrity sha512-S1Nev6h/kNnamhHeGdp30WgxZTA+B76SJ/P721ctP7DrnC+rrjAc6h/R80I4V0cA2QuEEcMdVOQCtK2BTjsOiQ== + dependencies: + "@types/argparse" "1.0.38" + argparse "~1.0.9" + colors "~1.2.1" + string-argv "~0.3.1" + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" @@ -376,6 +615,11 @@ dependencies: "@types/glob" "*" +"@types/argparse@1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== + "@types/cacheable-request@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976" @@ -437,6 +681,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== +"@types/jsonpath@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@types/jsonpath/-/jsonpath-0.2.0.tgz#13c62db22a34d9c411364fac79fd374d63445aa1" + integrity sha512-v7qlPA0VpKUlEdhghbDqRoKMxFB3h3Ch688TApBJ6v+XLDdvWCGLJIYiPKGZnS6MAOie+IorCfNYVHOPIHSWwQ== + "@types/keyv@*", "@types/keyv@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" @@ -459,6 +708,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.18.tgz#5111b2285659442f9f95697386a2b42b875bd7e9" integrity sha512-0Z3nS5acM0cIV4JPzrj9g/GH0Et5vmADWtip3YOXOp1NpOLU8V3KoZDc8ny9c1pe/YSYYzQkAWob6dyV/EWg4g== +"@types/node@12.20.24": + version "12.20.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" + integrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -507,6 +761,11 @@ "@types/node" "*" "@types/ssh2-streams" "*" +"@types/web-bluetooth@^0.0.14": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz#94e175b53623384bff1f354cdb3197a8d63cdbe5" + integrity sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A== + "@typescript-eslint/eslint-plugin@^5.0.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.6.0.tgz#efd8668b3d6627c46ce722c2afe813928fe120a0" @@ -657,6 +916,128 @@ "@typescript-eslint/types" "5.6.0" eslint-visitor-keys "^3.0.0" +"@vitejs/plugin-vue@^2.3.2": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-2.3.3.tgz#fbf80cc039b82ac21a1acb0f0478de8f61fbf600" + integrity sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw== + +"@vue/compiler-core@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.37.tgz#b3c42e04c0e0f2c496ff1784e543fbefe91e215a" + integrity sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/shared" "3.2.37" + estree-walker "^2.0.2" + source-map "^0.6.1" + +"@vue/compiler-dom@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.37.tgz#10d2427a789e7c707c872da9d678c82a0c6582b5" + integrity sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ== + dependencies: + "@vue/compiler-core" "3.2.37" + "@vue/shared" "3.2.37" + +"@vue/compiler-sfc@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.37.tgz#3103af3da2f40286edcd85ea495dcb35bc7f5ff4" + integrity sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/compiler-core" "3.2.37" + "@vue/compiler-dom" "3.2.37" + "@vue/compiler-ssr" "3.2.37" + "@vue/reactivity-transform" "3.2.37" + "@vue/shared" "3.2.37" + estree-walker "^2.0.2" + magic-string "^0.25.7" + postcss "^8.1.10" + source-map "^0.6.1" + +"@vue/compiler-ssr@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.37.tgz#4899d19f3a5fafd61524a9d1aee8eb0505313cff" + integrity sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw== + dependencies: + "@vue/compiler-dom" "3.2.37" + "@vue/shared" "3.2.37" + +"@vue/devtools-api@^6.1.4": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.2.0.tgz#e3dc98a0cce8e87292745e2d24c9ee8c274a023b" + integrity sha512-pF1G4wky+hkifDiZSWn8xfuLOJI1ZXtuambpBEYaf7Xaf6zC/pM29rvAGpd3qaGXnr4BAXU1Pxz/VfvBGwexGA== + +"@vue/reactivity-transform@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.37.tgz#0caa47c4344df4ae59f5a05dde2a8758829f8eca" + integrity sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/compiler-core" "3.2.37" + "@vue/shared" "3.2.37" + estree-walker "^2.0.2" + magic-string "^0.25.7" + +"@vue/reactivity@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.37.tgz#5bc3847ac58828e2b78526e08219e0a1089f8848" + integrity sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A== + dependencies: + "@vue/shared" "3.2.37" + +"@vue/runtime-core@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.37.tgz#7ba7c54bb56e5d70edfc2f05766e1ca8519966e3" + integrity sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ== + dependencies: + "@vue/reactivity" "3.2.37" + "@vue/shared" "3.2.37" + +"@vue/runtime-dom@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.37.tgz#002bdc8228fa63949317756fb1e92cdd3f9f4bbd" + integrity sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw== + dependencies: + "@vue/runtime-core" "3.2.37" + "@vue/shared" "3.2.37" + csstype "^2.6.8" + +"@vue/server-renderer@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.37.tgz#840a29c8dcc29bddd9b5f5ffa22b95c0e72afdfc" + integrity sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA== + dependencies: + "@vue/compiler-ssr" "3.2.37" + "@vue/shared" "3.2.37" + +"@vue/shared@3.2.37": + version "3.2.37" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.37.tgz#8e6adc3f2759af52f0e85863dfb0b711ecc5c702" + integrity sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw== + +"@vueuse/core@^8.5.0": + version "8.7.5" + resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-8.7.5.tgz#e74a888251ea11a9d432068ce18cbdfc4f810251" + integrity sha512-tqgzeZGoZcXzoit4kOGLWJibDMLp0vdm6ZO41SSUQhkhtrPhAg6dbIEPiahhUu6sZAmSYvVrZgEr5aKD51nrLA== + dependencies: + "@types/web-bluetooth" "^0.0.14" + "@vueuse/metadata" "8.7.5" + "@vueuse/shared" "8.7.5" + vue-demi "*" + +"@vueuse/metadata@8.7.5": + version "8.7.5" + resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-8.7.5.tgz#c7f2b21d873d1604a8860ed9c5728d8f3295f00a" + integrity sha512-emJZKRQSaEnVqmlu39NpNp8iaW+bPC2kWykWoWOZMSlO/0QVEmO/rt8A5VhOEJTKLX3vwTevqbiRy9WJRwVOQg== + +"@vueuse/shared@8.7.5": + version "8.7.5" + resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-8.7.5.tgz#06fb08f6f8fc9e90be9d1e033fa443de927172b0" + integrity sha512-THXPvMBFmg6Gf6AwRn/EdTh2mhqwjGsB2Yfp374LNQSQVKRHtnJ0I42bsZTn7nuEliBxqUrGQm/lN6qUHmhJLw== + dependencies: + vue-demi "*" + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -685,7 +1066,7 @@ ajv@^6.10.0: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.12.4: +ajv@^6.12.4, ajv@~6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -695,6 +1076,26 @@ ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +algoliasearch@^4.0.0: + version "4.13.1" + resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.13.1.tgz#54195c41c9e4bd13ed64982248cf49d4576974fe" + integrity sha512-dtHUSE0caWTCE7liE1xaL+19AFf6kWEcyn76uhcitWpntqvicFHXKFoZe5JJcv9whQOTRM6+B8qJz6sFj+rDJA== + dependencies: + "@algolia/cache-browser-local-storage" "4.13.1" + "@algolia/cache-common" "4.13.1" + "@algolia/cache-in-memory" "4.13.1" + "@algolia/client-account" "4.13.1" + "@algolia/client-analytics" "4.13.1" + "@algolia/client-common" "4.13.1" + "@algolia/client-personalization" "4.13.1" + "@algolia/client-search" "4.13.1" + "@algolia/logger-common" "4.13.1" + "@algolia/logger-console" "4.13.1" + "@algolia/requester-browser-xhr" "4.13.1" + "@algolia/requester-common" "4.13.1" + "@algolia/requester-node-http" "4.13.1" + "@algolia/transporter" "4.13.1" + ansi-align@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" @@ -798,6 +1199,13 @@ archiver@^5.3.1: tar-stream "^2.2.0" zip-stream "^4.1.0" +argparse@^1.0.7, argparse@~1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -861,6 +1269,11 @@ bl@^4.0.1, bl@^4.0.3: inherits "^2.0.4" readable-stream "^3.4.0" +body-scroll-lock@^4.0.0-beta.0: + version "4.0.0-beta.0" + resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz#4f78789d10e6388115c0460cd6d7d4dd2bbc4f7e" + integrity sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ== + boxen@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" @@ -1139,6 +1552,16 @@ colorette@2.0.16: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== +colors@~1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" + integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg== + +commander@^2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-9.1.0.tgz#a6b263b2327f2e188c6402c42623327909f2dbec" @@ -1238,6 +1661,11 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +csstype@^2.6.8: + version "2.6.20" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.20.tgz#9229c65ea0b260cf4d3d997cb06288e36a8d6dda" + integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA== + date-fns@^1.27.2: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" @@ -1723,7 +2151,7 @@ esprima@1.2.2: resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.2.tgz#76a0fd66fcfe154fd292667dc264019750b1657b" integrity sha1-dqD9Zvz+FU/SkmZ9wmQBl1CxZXs= -esprima@^4.0.1: +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -1757,6 +2185,11 @@ estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== +estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -1911,6 +2344,15 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@~7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2104,6 +2546,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.0, graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== +graceful-fs@^4.1.6: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -2215,6 +2662,11 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= +import-lazy@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" + integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== + import-local@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" @@ -2503,6 +2955,11 @@ issue-regex@^3.1.0: resolved "https://registry.yarnpkg.com/issue-regex/-/issue-regex-3.1.0.tgz#0671f094d6449c5b712fac3c9562aecb727d709e" integrity sha512-0RHjbtw9QXeSYnIEY5Yrp2QZrdtz21xBDV9C/GIlY2POmgoS6a7qjkYS5siRKXScnuAj5/SPv1C3YForNCHTJA== +jju@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" + integrity sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -2515,6 +2972,14 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +js-yaml@~3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -2550,6 +3015,18 @@ json5@^2.2.1: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +jsonc-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" + integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + jsonpath@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/jsonpath/-/jsonpath-1.0.2.tgz#e6aae681d03e9a77b4651d5d96eac5fc63b1fd13" @@ -2721,7 +3198,7 @@ lodash.flatten@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= -lodash.get@^4.3.0: +lodash.get@^4.3.0, lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= @@ -2751,7 +3228,7 @@ lodash.zip@^4.2.0: resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA= -lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: +lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@~4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -2803,6 +3280,13 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +magic-string@^0.25.7: + version "0.25.9" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" + integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== + dependencies: + sourcemap-codec "^1.4.8" + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -3423,7 +3907,7 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -postcss@^8.4.13: +postcss@^8.1.10, postcss@^8.4.13: version "8.4.14" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== @@ -3454,6 +3938,11 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" +preact@^10.0.0: + version "10.8.2" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.8.2.tgz#b8a614f5cc8ab0cd9e63337a3d60dc80410f4ed4" + integrity sha512-AKGt0BsDSiAYzVS78jZ9qRwuorY2CoSZtf1iOC6gLb/3QyZt+fLT09aYJBjRc/BEcRc4j+j3ggERMdNE43i1LQ== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -3647,14 +4136,14 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.10.0: +resolve@^1.10.0, resolve@~1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" -resolve@^1.17.0: +resolve@^1.17.0, resolve@~1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== @@ -3795,7 +4284,7 @@ semver@^7.3.5: dependencies: lru-cache "^6.0.0" -semver@^7.3.7: +semver@^7.3.7, semver@~7.3.0: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -3814,6 +4303,15 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shiki@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.10.1.tgz#6f9a16205a823b56c072d0f1a0bcd0f2646bef14" + integrity sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng== + dependencies: + jsonc-parser "^3.0.0" + vscode-oniguruma "^1.6.1" + vscode-textmate "5.2.0" + signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -3834,11 +4332,16 @@ source-map-js@^1.0.2: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map@~0.6.1: +source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +sourcemap-codec@^1.4.8: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -3877,6 +4380,11 @@ split@^1.0.0, split@^1.0.1: dependencies: through "2" +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + ssh-remote-port-forward@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/ssh-remote-port-forward/-/ssh-remote-port-forward-1.0.4.tgz#72b0c5df8ec27ca300c75805cc6b266dee07e298" @@ -3903,6 +4411,11 @@ static-eval@2.0.2: dependencies: escodegen "^1.8.1" +string-argv@~0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -4004,7 +4517,7 @@ strip-json-comments@^3.1.0: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== -strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -4056,6 +4569,11 @@ symbol-observable@^3.0.0: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-3.0.0.tgz#eea8f6478c651018e059044268375c408c15c533" integrity sha512-6tDOXSHiVjuCaasQSWTmHUWn4PuG7qa3+1WT031yTc/swT7+rLiw3GOrFxaH1E3lLP09dH3bVuVDf2gK5rxG3Q== +tagged-comment-parser@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tagged-comment-parser/-/tagged-comment-parser-1.1.1.tgz#d834d382783bf37e716f3835367c926c8e0dec26" + integrity sha512-YU/dkS7zCqrlrvhY/4xDnMWvYsXxwPlndEIzfn7pq29MjnJSiQcMtPZqO6rBBf6F1V47LnctNrsMo2pPIgWv5A== + tar-fs@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" @@ -4160,6 +4678,11 @@ tildify@2.0.0: resolved "https://registry.yarnpkg.com/tildify/-/tildify-2.0.0.tgz#f205f3674d677ce698b7067a99e949ce03b4754a" integrity sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw== +timsort@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A== + tinypool@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.1.3.tgz#b5570b364a1775fd403de5e7660b325308fee26b" @@ -4292,7 +4815,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@4.6.4: +typescript@4.6.4, typescript@~4.6.3: version "4.6.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== @@ -4314,6 +4837,11 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + update-notifier@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.0.1.tgz#1f92d45fb1f70b9e33880a72dd262bc12d22c20d" @@ -4378,6 +4906,23 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +validator@^13.7.0: + version "13.7.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" + integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw== + +vite@^2.9.7: + version "2.9.13" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.13.tgz#859cb5d4c316c0d8c6ec9866045c0f7858ca6abc" + integrity sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw== + dependencies: + esbuild "^0.14.27" + postcss "^8.4.13" + resolve "^1.22.0" + rollup "^2.59.0" + optionalDependencies: + fsevents "~2.3.2" + vite@^2.9.9: version "2.9.9" resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.9.tgz#8b558987db5e60fedec2f4b003b73164cb081c5e" @@ -4390,6 +4935,21 @@ vite@^2.9.9: optionalDependencies: fsevents "~2.3.2" +vitepress@^1.0.0-alpha.4: + version "1.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.0.0-alpha.4.tgz#2d9929e2cade3d98f57f61848c01968fb386cee0" + integrity sha512-bOAA4KW6vYGlkbcrPLZLTKWTgXVroObU+o9xj9EENyEl6yg26WWvfN7DGA4BftjdM5O8nR93Z5khPQ3W/tFE7Q== + dependencies: + "@docsearch/css" "^3.0.0" + "@docsearch/js" "^3.0.0" + "@vitejs/plugin-vue" "^2.3.2" + "@vue/devtools-api" "^6.1.4" + "@vueuse/core" "^8.5.0" + body-scroll-lock "^4.0.0-beta.0" + shiki "^0.10.1" + vite "^2.9.7" + vue "^3.2.33" + vitest@0.14.2: version "0.14.2" resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.14.2.tgz#ac07b46d3cd3b5667d2bb803962f759a1b8f3f89" @@ -4404,6 +4964,32 @@ vitest@0.14.2: tinyspy "^0.3.2" vite "^2.9.9" +vscode-oniguruma@^1.6.1: + version "1.6.2" + resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz#aeb9771a2f1dbfc9083c8a7fdd9cccaa3f386607" + integrity sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA== + +vscode-textmate@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" + integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== + +vue-demi@*: + version "0.13.1" + resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.13.1.tgz#7604904c88be338418a10abbc94d5b8caa14cb8c" + integrity sha512-xmkJ56koG3ptpLnpgmIzk9/4nFf4CqduSJbUM0OdPoU87NwRuZ6x49OLhjSa/fC15fV+5CbEnrxU4oyE022svg== + +vue@^3.2.33, vue@^3.2.37: + version "3.2.37" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.37.tgz#da220ccb618d78579d25b06c7c21498ca4e5452e" + integrity sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ== + dependencies: + "@vue/compiler-dom" "3.2.37" + "@vue/compiler-sfc" "3.2.37" + "@vue/runtime-dom" "3.2.37" + "@vue/server-renderer" "3.2.37" + "@vue/shared" "3.2.37" + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -4476,6 +5062,17 @@ yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== +z-schema@~5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-5.0.3.tgz#68fafb9b735fc7f3c89eabb3e5a6353b4d7b4935" + integrity sha512-sGvEcBOTNum68x9jCpCVGPFJ6mWnkD0YxOcddDlJHRx3tKdB2q8pCHExMVZo/AV/6geuVJXG7hljDaWG8+5GDw== + dependencies: + lodash.get "^4.4.2" + lodash.isequal "^4.5.0" + validator "^13.7.0" + optionalDependencies: + commander "^2.20.3" + zip-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79"