samir
02/06/2019, 10:28 AMSET @total = 2;
PREPARE STMT FROM "SELECT * FROM my_table LIMIT ?";
EXECUTE STMT USING @total;
I know that this is not type safe and that it is better to use DSL/DAO but the requirements is that statements should be defined as strings from an admin interface.
Exception in thread "main" org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLSyntaxErrorException: 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 'PREPARE STMT FROM "SELECT * FROM my_table LIMIT ?";
EXECUTE STMT USING @total' at line 2
SQL: [SET @total = 2;
PREPARE STMT FROM "SELECT * FROM my_table LIMIT ?";
EXECUTE STMT USING @total;]
tapac
02/06/2019, 6:39 PMsamir
02/07/2019, 10:02 AM