mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 12:35:59 +00:00
zap fastmode as IN =OBJECT_ID_CONDITION does not work
This commit is contained in:
@@ -1,36 +1,12 @@
|
||||
module.exports = `
|
||||
select
|
||||
table_name as "pure_name",
|
||||
table_schema as "schema_name",
|
||||
table_name as "create_sql",
|
||||
ora_hash(view_definition, 3768421) as "hash_code" -- fixme
|
||||
select avv.*,
|
||||
ora_hash("create_sql") as "hash_code"
|
||||
from (select
|
||||
sys_context('userenv', 'DB_NAME') table_catalog,
|
||||
owner table_schema,
|
||||
view_name table_name,
|
||||
text view_definition,
|
||||
'VIEW' table_type,
|
||||
(select max( case when uuc.updatable = 'YES' or
|
||||
uuc.deletable = 'YES' or
|
||||
uuc.insertable = 'YES' then 'YES' else 'NO' end
|
||||
)
|
||||
from
|
||||
user_updatable_columns uuc
|
||||
where
|
||||
uuc.owner = av.owner and
|
||||
uuc.table_name = av.view_name
|
||||
) is_updatable,
|
||||
decode(
|
||||
(select 1
|
||||
from
|
||||
all_constraints ac
|
||||
where
|
||||
ac.owner = av.owner and
|
||||
ac.table_name = av.view_name and
|
||||
ac.constraint_type = 'V'), 1, 'CASCADE', 'NONE') check_option
|
||||
from
|
||||
all_views av
|
||||
where text is not null
|
||||
) views
|
||||
where table_name =OBJECT_ID_CONDITION
|
||||
view_name as "pure_name",
|
||||
owner as "schema_name",
|
||||
SUBSTR(text_vc, 1, 3900) AS "create_sql"
|
||||
from all_views av
|
||||
where text_vc is not null
|
||||
) avv
|
||||
where "pure_name" =OBJECT_ID_CONDITION
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user