use of io.crate.sql.tree.DeallocateStatement in project crate by crate.
the class DeallocateAnalyzerTest method testAnalyzeDeallocateWithWrongExpression.
@Test
public void testAnalyzeDeallocateWithWrongExpression() {
expectedException.expect(AssertionError.class);
expectedException.expectMessage("Expression $1 not supported as preparedStmt expression for DEALLOCATE");
DeallocateAnalyzer.analyze(new DeallocateStatement(new ParameterExpression(1)));
}
use of io.crate.sql.tree.DeallocateStatement in project crate by crate.
the class TestStatementBuilder method testDeallocate.
@Test
public void testDeallocate() {
DeallocateStatement stmt = (DeallocateStatement) SqlParser.createStatement("DEALLOCATE test_prep_stmt");
assertThat(stmt.preparedStmt().toString(), is("'test_prep_stmt'"));
stmt = (DeallocateStatement) SqlParser.createStatement("DEALLOCATE 'test_prep_stmt'");
assertThat(stmt.preparedStmt().toString(), is("'test_prep_stmt'"));
}
use of io.crate.sql.tree.DeallocateStatement in project crate by crate.
the class TestStatementBuilder method testDeallocateAll.
@Test
public void testDeallocateAll() {
Statement stmt = SqlParser.createStatement("DEALLOCATE ALL");
assertTrue(stmt.equals(new DeallocateStatement()));
}
Aggregations