mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 00:16:00 +00:00
fix: use keyspace and replication in createDatabase command for cassandra
This commit is contained in:
@@ -22,7 +22,16 @@ class Dumper extends SqlDumper {
|
|||||||
dropColumn(column) {
|
dropColumn(column) {
|
||||||
this.putCmd('^alter ^table %f ^drop %i', column, column.columnName);
|
this.putCmd('^alter ^table %f ^drop %i', column, column.columnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createDatabase(name, replicationCalss = 'SimpleStrategy', replicationFactor = 1) {
|
||||||
|
this.putCmd(
|
||||||
|
"^create ^keyspace %s ^with replication = {'class': '%s','replication_factor': %s}",
|
||||||
|
name,
|
||||||
|
replicationCalss,
|
||||||
|
replicationFactor
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
putValue(value, dataType) {
|
putValue(value, dataType) {
|
||||||
if (
|
if (
|
||||||
dataType?.toLowerCase() === 'uuid' &&
|
dataType?.toLowerCase() === 'uuid' &&
|
||||||
|
|||||||
Reference in New Issue
Block a user