Skip to content

Commit

Permalink
fix mysql driver in bundled releases (disable minification)
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Jan 4, 2024
1 parent 42f2e31 commit c2a723e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/db/driver/MySQLDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export class MySQLDriver extends BaseDriver<IMySQLOptions> {
return new Promise((resolve, reject) => {
this.pool.getConnection((err, connection) => {
if(err)
return reject("sqlite exec() error: could not aquire connection: " + err.toString());
return reject("mysql exec() error: could not aquire connection: " + err.toString());

connection.query(sql, (error, results) => {
if(error)
reject("sqlite exec() error [" + sql + "]: " + error.toString());
reject("mysql exec() error [" + sql + "]: " + error.toString());
else
resolve();
connection.release();
Expand All @@ -51,11 +51,11 @@ export class MySQLDriver extends BaseDriver<IMySQLOptions> {
return new Promise((resolve, reject) => {
this.pool.getConnection((err, connection) => {
if(err)
return reject("sqlite run() error: could not aquire connection: " + err.toString());
return reject("mysql run() error: could not aquire connection: " + err.toString());

connection.query(sql, values, (error, results) => {
if(error)
reject("sqlite run() error [" + sql + "]: " + error.toString());
reject("mysql run() error [" + sql + "]: " + error.toString());
else {
resolve({
changes: results.affectedRows,
Expand All @@ -72,11 +72,11 @@ export class MySQLDriver extends BaseDriver<IMySQLOptions> {
return new Promise((resolve, reject) => {
this.pool.getConnection((err, connection) => {
if(err)
return reject("sqlite all() error: could not aquire connection: " + err.toString());
return reject("mysql all() error: could not aquire connection: " + err.toString());

connection.query(sql, values, (error, results) => {
if(error)
reject("sqlite all() error [" + sql + "]: " + error.toString());
reject("mysql all() error [" + sql + "]: " + error.toString());
else {
resolve(results);
}
Expand All @@ -90,11 +90,11 @@ export class MySQLDriver extends BaseDriver<IMySQLOptions> {
return new Promise((resolve, reject) => {
this.pool.getConnection((err, connection) => {
if(err)
return reject("sqlite get() error: could not aquire connection: " + err.toString());
return reject("mysql get() error: could not aquire connection: " + err.toString());

connection.query(sql, values, (error, results) => {
if(error)
reject("sqlite get() error [" + sql + "]: " + error.toString());
reject("mysql get() error [" + sql + "]: " + error.toString());
else {
resolve(results.length > 0 ? results[0] : null);
}
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ export default {
POWFAUCET_VERSION: JSON.stringify(packageJson.version),
}),
],
optimization: {
minimize: false
}
};

0 comments on commit c2a723e

Please sign in to comment.