I just can't get the query to simply truncate a table to work with korma:
(korma.core/defentity readings)
(korma.core/exec-raw ["TRUNCATE TABLE ?" [:name readings]])
and I get:
Syntax error in SQL statement "TRUNCATE TABLE ?[*]"; expected "identifier"; SQL statement:
TRUNCATE TABLE ? [42001-191]
As one of the comments suggests, bind parameter substitution is only for values in DML, not for schema in DML or DDL. It's a semantic distinction, not syntactic.
The
form should work, using the vector form even with an empty parameter vec may not.