1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

Improvements

This commit is contained in:
2020-06-16 18:01:22 +02:00
parent 6f03e66ef2
commit a597015f50
10 changed files with 163 additions and 133 deletions

View File

@ -1,7 +1,14 @@
'use strict';
export default class {
static async raw (connection, query, schema) {
if (schema) await connection.raw(`USE \`${schema}\``);
if (schema) {
try {
await connection.use(schema);
}
catch (err) {
return err;
}
}
return connection.raw(query);
}