Files
few-line-engine/tests/base/case1-payload.js
Boris D fbbbd61838 DB
2025-09-22 18:35:02 +03:00

29 lines
557 B
JavaScript

/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable no-undef */
async function insert() {
const res = await asyncCall(
db,
squel.insert().into("testTable").set("col", "test me now").toString()
);
return res;
}
function createSQL(id) {
return squel.select().from("testTable").where("id = ?", id).toString();
}
async function main(input) {
const inserted = await insert();
log(inserted);
const sql = createSQL(inserted.rows.insertId);
const res = await asyncCall(db, sql);
log(res.rows);
return res;
}