我正在使用 mysql2 包。我在节点中做简单的 sql 查询。那为什么会转
public async getTests(req: Request, res: Response): Promise<void> {
const pool = await connect();
const stmt = 'SELECT test, test2 FROM testTable';
const tests = await pool.query(stmt);
res.json({ tests});
}
查询结果:
{ foo,foo1 },列定义 { _buf:<缓冲区 01 00 00 01 0a 51 00 00 02 03 64 65 66 13 61 75 72 6f 72 61 5f 61 75 64 69 74 5f 73 69 67 6e 61 6c 6 0a 66 67 65 6d 65 6e 74 0a 65 6e 67 61 67 ... 1200 更多字节>,