mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 04:56:00 +00:00
feat: add dropDatabse to cassandra dumper
This commit is contained in:
@@ -23,6 +23,11 @@ class Dumper extends SqlDumper {
|
|||||||
this.putCmd('^alter ^table %f ^drop %i', column, column.columnName);
|
this.putCmd('^alter ^table %f ^drop %i', column, column.columnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {import('dbgate-types').ColumnInfo} column
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
createDatabase(name, replicationCalss = 'SimpleStrategy', replicationFactor = 1) {
|
createDatabase(name, replicationCalss = 'SimpleStrategy', replicationFactor = 1) {
|
||||||
this.putCmd(
|
this.putCmd(
|
||||||
"^create ^keyspace %s ^with replication = {'class': '%s','replication_factor': %s}",
|
"^create ^keyspace %s ^with replication = {'class': '%s','replication_factor': %s}",
|
||||||
@@ -32,6 +37,21 @@ class Dumper extends SqlDumper {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {import('dbgate-types').NamedObjectInfo} obj
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
dropDatabase(name) {
|
||||||
|
this.putCmd('^drop ^keyspace %s', name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @param {string} dataType
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
putValue(value, dataType) {
|
putValue(value, dataType) {
|
||||||
if (
|
if (
|
||||||
dataType?.toLowerCase() === 'uuid' &&
|
dataType?.toLowerCase() === 'uuid' &&
|
||||||
|
|||||||
Reference in New Issue
Block a user