60 lines
687 B
JavaScript
Raw Normal View History

2021-09-13 16:14:33 +02:00
'use strict';
class Dialect {
constructor(db) {
this.db = db;
}
configure() {}
2022-08-08 15:50:34 +02:00
2021-09-13 16:14:33 +02:00
initialize() {}
2021-09-15 12:25:09 +02:00
getSqlType(type) {
return type;
}
canAlterConstraints() {
return true;
}
2021-09-13 16:14:33 +02:00
usesForeignKeys() {
return false;
}
useReturning() {
return false;
}
2021-09-15 12:25:09 +02:00
supportsUnsigned() {
return false;
}
supportsWindowFunctions() {
2022-11-21 14:46:06 +01:00
return true;
}
2022-08-08 23:33:39 +02:00
async startSchemaUpdate() {
// noop
}
2022-08-08 15:50:34 +02:00
2022-08-08 23:33:39 +02:00
async endSchemaUpdate() {
// noop
}
2021-09-13 16:14:33 +02:00
transformErrors(error) {
if (error instanceof Error) {
throw error;
}
throw new Error(error.message);
}
canAddIncrements() {
return true;
}
2021-09-13 16:14:33 +02:00
}
module.exports = {
Dialect,
};