2020-03-14 09:38:10 +00:00
|
|
|
module.exports = `
|
2020-02-02 19:28:27 +00:00
|
|
|
select
|
2020-02-02 19:33:02 +00:00
|
|
|
table_schema as "schemaName",
|
|
|
|
table_name as "pureName",
|
|
|
|
column_name as "columnName",
|
|
|
|
is_nullable as "isNullable",
|
2020-06-26 13:28:44 +00:00
|
|
|
data_type as "dataType",
|
|
|
|
character_maximum_length as "charMaxLength",
|
|
|
|
numeric_precision as "numericPrecision",
|
|
|
|
numeric_scale as "numericScale",
|
|
|
|
column_default as "defaultValue"
|
2020-02-02 19:28:27 +00:00
|
|
|
from information_schema.columns
|
|
|
|
where
|
|
|
|
table_schema <> 'information_schema'
|
|
|
|
and table_schema <> 'pg_catalog'
|
|
|
|
and table_schema !~ '^pg_toast'
|
|
|
|
and 'table:' || table_schema || '.' || table_name =[OBJECT_ID_CONDITION]
|
|
|
|
order by ordinal_position
|
2020-03-14 09:38:10 +00:00
|
|
|
`;
|