@databases/pg-schema-introspect
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -56,4 +56,4 @@ "use strict"; | ||
Object { | ||
"checkConstraint": null, | ||
"classID": "<oid>", | ||
"constraintDescription": "PRIMARY KEY (id)", | ||
"constraintName": "table_a_pkey", | ||
@@ -71,4 +71,4 @@ "constraintType": "p", | ||
Object { | ||
"checkConstraint": null, | ||
"classID": "<oid>", | ||
"constraintDescription": "FOREIGN KEY (a_id) REFERENCES getconstraints.table_a(id)", | ||
"constraintName": "table_b_a_id_fkey", | ||
@@ -88,4 +88,4 @@ "constraintType": "f", | ||
Object { | ||
"checkConstraint": null, | ||
"classID": "<oid>", | ||
"constraintDescription": "PRIMARY KEY (id)", | ||
"constraintName": "table_b_pkey", | ||
@@ -103,4 +103,4 @@ "constraintType": "p", | ||
Object { | ||
"checkConstraint": null, | ||
"classID": "<oid>", | ||
"constraintDescription": "PRIMARY KEY (a, b)", | ||
"constraintName": "table_c_pkey", | ||
@@ -107,0 +107,0 @@ "constraintType": "p", |
@@ -54,3 +54,3 @@ "use strict"; | ||
a.atthasdef AS "hasDefault", | ||
def.adsrc AS "default", | ||
pg_get_expr(def.adbin, def.adrelid, true) AS "default", | ||
col_description(a.attrelid, a.attnum) AS "comment", | ||
@@ -57,0 +57,0 @@ |
@@ -25,3 +25,3 @@ import { Connection } from '@databases/pg'; | ||
foreignKeyMatchType: ForeignKeyMatchType; | ||
checkConstraint: string; | ||
constraintDescription: string; | ||
tableAttributeNumbers: number[]; | ||
@@ -28,0 +28,0 @@ referencedAttributeNumbers: number[]; |
@@ -47,3 +47,3 @@ "use strict"; | ||
confkey AS "referencedAttributeNumbers", | ||
consrc AS "checkConstraint" | ||
pg_get_constraintdef(c.oid, true) AS "constraintDescription" | ||
FROM pg_catalog.pg_constraint c | ||
@@ -50,0 +50,0 @@ INNER JOIN pg_catalog.pg_class cls |
{ | ||
"name": "@databases/pg-schema-introspect", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
87914