SYNC: Limit query result rows #1098

This commit is contained in:
SPRINX0\prochazka
2025-05-12 15:55:19 +02:00
committed by Diflow
parent c3e09ddab0
commit fb036935e6
7 changed files with 136 additions and 15 deletions

View File

@@ -141,7 +141,7 @@ module.exports = {
},
executeQuery_meta: true,
async executeQuery({ sesid, sql, autoCommit }) {
async executeQuery({ sesid, sql, autoCommit, limitRows }) {
const session = this.opened.find(x => x.sesid == sesid);
if (!session) {
throw new Error('Invalid session');
@@ -149,7 +149,7 @@ module.exports = {
logger.info({ sesid, sql }, 'Processing query');
this.dispatchMessage(sesid, 'Query execution started');
session.subprocess.send({ msgtype: 'executeQuery', sql, autoCommit });
session.subprocess.send({ msgtype: 'executeQuery', sql, autoCommit, limitRows });
return { state: 'ok' };
},