mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 18:46:00 +00:00
oracle: import data works
This commit is contained in:
@@ -10,6 +10,6 @@ select
|
||||
data_scale as "numeric_scale",
|
||||
data_default as "default_value"
|
||||
FROM all_tab_columns av
|
||||
where OWNER='$owner' AND TABLE_NAME =OBJECT_ID_CONDITION
|
||||
where OWNER='$owner' AND 'tables:' || TABLE_NAME =OBJECT_ID_CONDITION
|
||||
order by column_id
|
||||
`;
|
||||
@@ -19,6 +19,6 @@ and basecol.table_name = fk.table_name
|
||||
and refcol.owner = ref.owner
|
||||
and refcol.constraint_name = ref.constraint_name
|
||||
and refcol.table_name = ref.table_name
|
||||
AND fk.constraint_name =OBJECT_ID_CONDITION
|
||||
AND 'tables:' || fk.table_name =OBJECT_ID_CONDITION
|
||||
order by basecol.position
|
||||
`;
|
||||
|
||||
@@ -9,7 +9,7 @@ select i.table_name as "tableName",
|
||||
from all_ind_columns ic, all_indexes i
|
||||
where INDEX_OWNER = '$owner' AND ic.index_owner = i.owner
|
||||
and ic.index_name = i.index_name
|
||||
and i.index_name =OBJECT_ID_CONDITION
|
||||
and 'tables:' || i.table_name =OBJECT_ID_CONDITION
|
||||
order by i.table_owner,
|
||||
i.table_name,
|
||||
i.index_name,
|
||||
|
||||
@@ -14,6 +14,6 @@ SELECT -- owner as schema_name,
|
||||
'//text()'
|
||||
)) definition
|
||||
FROM all_mviews
|
||||
where OWNER = '$owner' AND mview_name=OBJECT_ID_CONDITION
|
||||
where OWNER = '$owner' AND 'matviews:' || mview_name=OBJECT_ID_CONDITION
|
||||
order by owner, mview_name
|
||||
`;
|
||||
@@ -11,7 +11,7 @@ where constraint_type = 'P'
|
||||
and basecol.owner = pk.owner
|
||||
and basecol.constraint_name = pk.constraint_name
|
||||
and basecol.table_name = pk.table_name
|
||||
and pk.constraint_name =OBJECT_ID_CONDITION
|
||||
and 'tables:' || basecol.table_name =OBJECT_ID_CONDITION
|
||||
and pk.owner = '$owner'
|
||||
order by basecol.position
|
||||
`;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module.exports = `
|
||||
select
|
||||
-- owner "schema_name",
|
||||
table_name "pure_name"
|
||||
-- owner "schema_name",
|
||||
table_name "pure_name"
|
||||
from
|
||||
all_tables
|
||||
where OWNER='$owner' AND TABLE_NAME =OBJECT_ID_CONDITION
|
||||
where OWNER='$owner' AND 'tables:' || TABLE_NAME =OBJECT_ID_CONDITION
|
||||
`;
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@ module.exports = `
|
||||
select constraint_name as "constraintName"
|
||||
from all_constraints
|
||||
where owner='$owner' and constraint_type = 'U'
|
||||
and constraint_name =OBJECT_ID_CONDITION
|
||||
and 'tables:' || table_name =OBJECT_ID_CONDITION
|
||||
`;
|
||||
|
||||
@@ -8,5 +8,5 @@ from (select
|
||||
from all_views av
|
||||
where owner = '$owner' and text_vc is not null
|
||||
) avv
|
||||
where "pure_name" =OBJECT_ID_CONDITION
|
||||
where 'views:' || "pure_name" =OBJECT_ID_CONDITION
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user