2021-09-16 11:37:44 +02:00

47 lines
615 B
JavaScript

'use strict';
class Dialect {
constructor(db) {
this.db = db;
}
configure() {}
initialize() {}
getSqlType(type) {
return type;
}
canAlterConstraints() {
return true;
}
usesForeignKeys() {
return false;
}
useReturning() {
return false;
}
supportsUnsigned() {
return false;
}
async startSchemaUpdate() {}
async endSchemaUpdate() {}
// TODO: pass query info to display some more metadata
transformErrors(error) {
if (error instanceof Error) {
throw error;
}
throw new Error(error.message);
}
}
module.exports = {
Dialect,
};