Closed i18nsite closed 2 months ago
connection.execute() is a shortcut of SQL PREPARE + SQL EXECUTE. example :
const prepare = await conn.prepare('SELECT * FROM mysql.user where host = ?');
try {
const res = prepare.execute(['localhost']);
} finally {
prepare.close();
}
that can be shortened as :
const res = await conn.execute('SELECT * FROM mysql.user where host = ?', ['localhost']);
In the super rare cases when command are not supported by prepare protocol (for old server there is still some cases) , you can just use connection.query that will do exactly the same without prepare first
closing, since i think this answer the issue. feel free to comment / create new issue if this is not the case
as title