mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 06:46:00 +00:00
WIP
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
module.exports = `
|
||||
SELECT
|
||||
table_name as "pureName",
|
||||
column_name as "columnName",
|
||||
type as "dataType",
|
||||
kind as "kind"
|
||||
FROM system_schema.columns
|
||||
WHERE keyspace_name = '#DATABASE#'
|
||||
`;
|
||||
9
plugins/dbgate-plugin-cassandra/src/backend/sql/index.js
Normal file
9
plugins/dbgate-plugin-cassandra/src/backend/sql/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const columns = require('./columns');
|
||||
const tables = require('./tables');
|
||||
const views = require('./views');
|
||||
|
||||
module.exports = {
|
||||
columns,
|
||||
tables,
|
||||
views,
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = `
|
||||
SELECT table_name as "pureName"
|
||||
FROM system_schema.tables
|
||||
WHERE keyspace_name='#DATABASE#';
|
||||
`;
|
||||
10
plugins/dbgate-plugin-cassandra/src/backend/sql/views.js
Normal file
10
plugins/dbgate-plugin-cassandra/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