mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 11:56:00 +00:00
Oracle driver first data
This commit is contained in:
@@ -1,23 +1,15 @@
|
||||
module.exports = `
|
||||
select
|
||||
table_schema as "schema_name",
|
||||
table_name as "pure_name",
|
||||
column_name as "column_name",
|
||||
is_nullable as "is_nullable",
|
||||
data_type as "data_type",
|
||||
character_maximum_length as "char_max_length",
|
||||
numeric_precision as "numeric_precision",
|
||||
numeric_scale as "numeric_scale",
|
||||
column_default as "default_value"
|
||||
from information_schema.columns
|
||||
where
|
||||
table_schema <> 'information_schema'
|
||||
and table_schema <> 'pg_catalog'
|
||||
and table_schema !~ '^pg_toast'
|
||||
and (
|
||||
('tables:' || table_schema || '.' || table_name) =OBJECT_ID_CONDITION
|
||||
or
|
||||
('views:' || table_schema || '.' || table_name) =OBJECT_ID_CONDITION
|
||||
)
|
||||
order by ordinal_position
|
||||
select
|
||||
owner as "schema_name",
|
||||
table_name as "pure_name",
|
||||
column_name as "column_name",
|
||||
nullable as "is_nullable",
|
||||
data_type as "data_type",
|
||||
data_length as "char_max_length",
|
||||
data_precision as "numeric_precision",
|
||||
data_scale as "numeric_scale",
|
||||
data_default as "default_value"
|
||||
FROM all_tab_columns av
|
||||
where TABLE_NAME =OBJECT_ID_CONDITION
|
||||
order by column_id
|
||||
`;
|
||||
Reference in New Issue
Block a user