Hi... Can anyone please tell me how to set the Limit with FROM and TO. The below query returns more than 10 thousand records, where I would like to Paginate 50 records in a page. Is there any possibility to set limit with range or is there any other option to do this. Thanks in advance..
async function mysqlfunc(req, res) {
client.transport.request({
method: "POST",
path: "/_sql",
body: {
query: "SELECT field1, filed2 FROM myindex limit 10",
fetch_size: 50
}
}, function(error, response) {
if (error) {
console.error('Something does not compute : ' + error);
} else {
console.log("Output : " + response.rows);
res.send(response.rows);
}
});
}