Skip to content

Commit e16831d

Browse files
committed
refactor: add ID field for column
1 parent e996e3e commit e16831d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/lib/interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export namespace Tables {
8585
table_id: number
8686
schema: string
8787
table: string
88+
id: string
8889
ordinal_position: number
8990
name: string
9091
default_value: string | null

src/lib/sql/columns.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SELECT
33
c.oid AS table_id,
44
table_schema AS schema,
55
table_name AS table,
6+
(c.oid || '.' || ordinal_position) AS id,
67
ordinal_position,
78
column_name AS name,
89
column_default AS default_value,

0 commit comments

Comments
 (0)