mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1128 - Allow "2 word SQL" like TRUNCATE t, ANALYSE t etc
This commit is contained in:
@@ -20,6 +20,21 @@ public class TestSqlUpdateInTxn extends BaseTestCase {
|
||||
assertThat(sqlUpdate.getSql()).isEqualTo(sql.trim());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_twoWordSql() {
|
||||
|
||||
if (isH2()) {
|
||||
// 2 word syntax ... means no automatic determination of the type of change
|
||||
// and table effected (so no automatic L2 cache invalidation)
|
||||
String sql = "CHECKPOINT SYNC";
|
||||
|
||||
SqlUpdate sqlUpdate = Ebean.createSqlUpdate(sql);
|
||||
sqlUpdate.execute();
|
||||
|
||||
assertThat(sqlUpdate.getSql()).isEqualTo(sql.trim());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSqlUpdateWithWhitespace() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user