mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 15:25:59 +00:00
fixed import for clickhouse
This commit is contained in:
@@ -6,11 +6,7 @@ const _ = require('lodash');
|
||||
* @param {import('dbgate-types').EngineDriver} driver
|
||||
*/
|
||||
function createOracleBulkInsertStream(driver, stream, pool, name, options) {
|
||||
const writable = createBulkInsertStreamBase(driver, stream, pool, name, {
|
||||
...options,
|
||||
// this is really not used, send method below is used instead
|
||||
commitAfterInsert: true,
|
||||
});
|
||||
const writable = createBulkInsertStreamBase(driver, stream, pool, name, options);
|
||||
|
||||
writable.send = async () => {
|
||||
await pool.insert({
|
||||
|
||||
@@ -17,7 +17,7 @@ class Dumper extends SqlDumper {
|
||||
}
|
||||
|
||||
columnType(dataType) {
|
||||
this.putRaw(dataType);
|
||||
this.putRaw(dataType || this.dialect.fallbackDataType);
|
||||
}
|
||||
|
||||
renameColumn(column, newcol) {
|
||||
|
||||
@@ -189,6 +189,16 @@ const driver = {
|
||||
useDatabaseUrl: 1,
|
||||
};
|
||||
},
|
||||
|
||||
adaptTableInfo(table) {
|
||||
if (!table.primaryKey && !table.sortingKey) {
|
||||
return {
|
||||
...table,
|
||||
tableEngine: 'Log',
|
||||
};
|
||||
}
|
||||
return table;
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = driver;
|
||||
|
||||
Reference in New Issue
Block a user