I'm encountering an issue with my Rest call to a MySQL database.
I'm using a JavaScript object and sending it through a REST GET call with a Java back-end.
requestParams: {
pageStart: 0,
results: 10
}
I have configured a query for this request
"get-users" : "SELECT * FROM ${_dbSchema}.${_table} LIMIT ${pageStart}, ${results}"
However, the queryParams are transforming into strings on the back-end, leading to the following error in the response
{"error":500,"reason":"Internal Server Error","message":"DB reported failure executing query SELECT * FROM shema.user LIMIT ?, ? with params: {results=10, pageStart=0} error code: 1064 sqlstate: 42000 message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0', '10'' at line 1"}
Is there a way to resolve this issue within the SQL query?