Hi all,
I am using JOOQ as a DSL generator and I am trying to generate a
TRUNCATE statement. However, it seems that it is only possibly to do
that with a connection in place. I did notice that DELETE FROM works
just fine.
Here is the DELETE FROM code which works fine:
Factory sqlFactory = new Factory(SQLDialect.SQLSERVER);
String sql = sqlFactory.delete(Factory.table("table")).getSQL();
Here is the TRUNCATE code which gives me an compile error:
Factory sqlFactory = new Factory(SQLDialect.SQLSERVER);
String sql = sqlFactory.truncate(Factory.table("table")).getSQL();
The exception I get is:
"Bound mismatch: The generic method truncate(Table<R>) of type
FactoryOperations is not applicable for the arguments (Table<Record>).
The inferred type Record is not a valid substitute for the bounded
parameter <R extends TableRecord<R>>"
Any help would be appreciated!