feat: add isAdmin column to token entity; implement migration for isAdmin; enhance logging and error handling in query execution; update query plugin to support new logging structure
This commit is contained in:
@ -5,6 +5,8 @@ import "module/squel";
|
||||
import "plugin/db";
|
||||
import "plugin/axios";
|
||||
import "plugin/session";
|
||||
import "plugin/query";
|
||||
import { query } from "express";
|
||||
|
||||
function createSQL(id) {
|
||||
return squel.select().from("test").where("id = ?", id).toString();
|
||||
@ -15,6 +17,8 @@ async function main(input, headers) {
|
||||
|
||||
await db.query("START TRANSACTION");
|
||||
|
||||
await query.run("d079b709-eba3-49be-9f84-08ac6a64a8a8", input);
|
||||
|
||||
// log(await db.query('insert into test (name) values ("Test")'));
|
||||
|
||||
log(new Date().toISOString());
|
||||
@ -28,9 +32,9 @@ async function main(input, headers) {
|
||||
|
||||
await session.set("test", 1);
|
||||
|
||||
const res = await db.query(`
|
||||
SELECT SLEEP(10000);
|
||||
`);
|
||||
// const res = await db.query(`
|
||||
// SELECT SLEEP(10000);
|
||||
// `);
|
||||
|
||||
log(new Date().toISOString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user