mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 03:53:57 +00:00
clickhouse - view support, incremental structure update
This commit is contained in:
10
plugins/dbgate-plugin-clickhouse/src/backend/sql/views.js
Normal file
10
plugins/dbgate-plugin-clickhouse/src/backend/sql/views.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = `
|
||||
select
|
||||
tables.name as "pureName",
|
||||
tables.uuid as "objectId",
|
||||
views.view_definition as "viewDefinition",
|
||||
tables.metadata_modification_time as "contentHash"
|
||||
from information_schema.views
|
||||
inner join system.tables on views.table_name = tables.name and views.table_schema = tables.database
|
||||
where views.table_schema='#DATABASE#' and tables.uuid =OBJECT_ID_CONDITION
|
||||
`;
|
||||
Reference in New Issue
Block a user