Reputation: 4398
What is the best way to truncate a table with ActiveJDBC? The Model class only has deleteAll(). So I guess I need to run a native SQL query, is Base.exec("TRUNCATE TABLE table1") the way to go?
Base.exec("TRUNCATE TABLE table1")
Thanks.
Upvotes: 0
Views: 91
Reputation: 5518
Yes, if you want to execute arbitrary SQL, use Base.exec(sql).
Upvotes: 1