oracle: import data works

This commit is contained in:
Jan Prochazka
2024-06-01 14:35:40 +02:00
parent cafe0e68c3
commit a812ff510d
16 changed files with 68 additions and 45 deletions

View File

@@ -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
`;

View File

@@ -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
`;

View File

@@ -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,

View File

@@ -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
`;

View File

@@ -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
`;

View File

@@ -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
`;

View File

@@ -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
`;

View File

@@ -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
`;