mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
mariadb version parsing
This commit is contained in:
parent
c5605d63ca
commit
21ceaecec6
@ -171,6 +171,16 @@ const drivers = driverBases.map(driverBase => ({
|
||||
async getVersion(connection) {
|
||||
const { rows } = await this.query(connection, "show variables like 'version'");
|
||||
const version = rows[0].Value;
|
||||
if (version) {
|
||||
const m = version.match(/(.*)-MariaDB-/);
|
||||
if (m) {
|
||||
return {
|
||||
version,
|
||||
versionText: `MariaDB ${m[1]}`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
version,
|
||||
versionText: `MySQL ${version}`,
|
||||
|
Loading…
Reference in New Issue
Block a user