mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 03:06:00 +00:00
28 lines
622 B
JavaScript
28 lines
622 B
JavaScript
const { driverBase } = require('dbgate-tools');
|
|
const Dumper = require('./Dumper');
|
|
|
|
/** @type {import('dbgate-types').SqlDialect} */
|
|
const dialect = {
|
|
rangeSelect: true,
|
|
stringEscapeChar: '\\',
|
|
fallbackDataType: 'longtext',
|
|
enableConstraintsPerTable: false,
|
|
anonymousPrimaryKey: true,
|
|
explicitDropConstraint: true,
|
|
quoteIdentifier(s) {
|
|
return '`' + s + '`';
|
|
},
|
|
};
|
|
|
|
/** @type {import('dbgate-types').EngineDriver} */
|
|
const driver = {
|
|
...driverBase,
|
|
dumperClass: Dumper,
|
|
dialect,
|
|
engine: 'mysql@dbgate-plugin-mysql',
|
|
title: 'MySQL / MariaDB',
|
|
defaultPort: 3306,
|
|
};
|
|
|
|
module.exports = driver;
|