20 lines
451 B
JavaScript
20 lines
451 B
JavaScript
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
/* eslint-disable no-undef */
|
|
|
|
import "module/squel";
|
|
import "module/asyncCall";
|
|
import "plugin/db";
|
|
|
|
function createSQL(id) {
|
|
return squel.select().from("test").where("id = ?", id).toString();
|
|
}
|
|
|
|
async function main(input, headers) {
|
|
const sql = createSQL(input.id);
|
|
const res = await asyncCall(db, sql);
|
|
|
|
log(headers);
|
|
|
|
return { test: 1, array: [1, 2, [{ id: 1, name: "Test" }]] };
|
|
}
|