mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Improvements
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user