This commit is contained in:
Nybkox
2025-01-23 15:46:15 +01:00
parent 645a1d35e8
commit bcf89b1f09
33 changed files with 832 additions and 87 deletions

View File

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

View File

@@ -0,0 +1,9 @@
const columns = require('./columns');
const tables = require('./tables');
const views = require('./views');
module.exports = {
columns,
tables,
views,
};

View File

@@ -0,0 +1,5 @@
module.exports = `
SELECT table_name as "pureName"
FROM system_schema.tables
WHERE keyspace_name='#DATABASE#';
`;

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