Upgrades
This commit is contained in:
parent
32785f9caa
commit
f0feaf508b
@ -44,9 +44,9 @@ module.exports = async function varDatabaseDbHandler({ queryString, queryValuesA
|
||||
* @description Fetch data from db if no cache
|
||||
*/
|
||||
try {
|
||||
if (queryString && queryValuesArray && Array.isArray(queryValuesArray) && queryValuesArray[0]) {
|
||||
if (queryString && Array.isArray(queryValuesArray) && queryValuesArray[0]) {
|
||||
results = await dbHandler({ query: queryString, values: queryValuesArray, database: database });
|
||||
} else {
|
||||
} else if (queryString && !Array.isArray(queryValuesArray)) {
|
||||
results = await dbHandler({ query: queryString, database: database });
|
||||
}
|
||||
|
||||
|
@ -30,20 +30,11 @@ const runQuery = require("./utils/runQuery");
|
||||
*/
|
||||
async function localGet({ options, dbSchema }) {
|
||||
try {
|
||||
const { query } = options;
|
||||
const { query, queryValues } = options;
|
||||
|
||||
/** @type {string | undefined | any } */
|
||||
const tableName = options?.tableName ? options.tableName : undefined;
|
||||
|
||||
/** @type {string[] | undefined } */
|
||||
let queryValues;
|
||||
|
||||
if (options?.queryValues && typeof options?.queryValues === "string") {
|
||||
try {
|
||||
queryValues = JSON.parse(options.queryValues);
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
const dbFullName = process.env.DSQL_DB_NAME || "";
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "datasquirel",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user