Upgrades
This commit is contained in:
parent
cc65ea23b8
commit
32785f9caa
@ -72,10 +72,13 @@ module.exports = async function dbHandler({ query, values, database }) {
|
|||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
results = await new Promise((resolve, reject) => {
|
results = await new Promise((resolve, reject) => {
|
||||||
if (values) {
|
if (values?.[0]) {
|
||||||
connection.query(query, values, (error, results, fields) => {
|
connection.query(query, values, (error, results, fields) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log("DB handler error:", error.message);
|
console.log("DB handler error with values array:", error.message);
|
||||||
|
console.log("SQL:", error.sql);
|
||||||
|
console.log("State:", error.sqlState, error.sqlMessage);
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
error: error.message,
|
error: error.message,
|
||||||
});
|
});
|
||||||
@ -91,6 +94,9 @@ module.exports = async function dbHandler({ query, values, database }) {
|
|||||||
connection.query(query, (error, results, fields) => {
|
connection.query(query, (error, results, fields) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log("DB handler error:", error.message);
|
console.log("DB handler error:", error.message);
|
||||||
|
console.log("SQL:", error.sql);
|
||||||
|
console.log("State:", error.sqlState, error.sqlMessage);
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
error: error.message,
|
error: error.message,
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "datasquirel",
|
"name": "datasquirel",
|
||||||
"version": "1.5.9",
|
"version": "1.6.0",
|
||||||
"description": "Cloud-based SQL data management tool",
|
"description": "Cloud-based SQL data management tool",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
Loading…
Reference in New Issue
Block a user