Update .gitignore, add dist directory
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
import dbHandler from "../db-handler";
|
||||
export default async function runSchemaQuery({ query, values, config, }) {
|
||||
const res = await dbHandler({
|
||||
query,
|
||||
values,
|
||||
config,
|
||||
});
|
||||
if (!res.success) {
|
||||
throw new Error(`Database query failed: ${query} ... ERROR: ${res.error || res.msg}`);
|
||||
}
|
||||
}
|
||||
export async function querySchemaRows({ query, values, config, }) {
|
||||
const res = await dbHandler({
|
||||
query,
|
||||
values,
|
||||
config,
|
||||
});
|
||||
if (!res.success) {
|
||||
throw new Error(`Database query failed: ${query} ... ERROR: ${res.error || res.msg}`);
|
||||
}
|
||||
return (res.payload || []);
|
||||
}
|
||||
Reference in New Issue
Block a user