Search in sources :

Example 1 with CreateTableModel

use of com.questdb.griffin.lexer.model.CreateTableModel in project questdb by bluestreak01.

the class SqlLexerOptimiserTest method assertCreateTable.

private void assertCreateTable(String expected, String ddl, TableModel... tableModels) throws ParserException {
    createModelsAndRun(() -> {
        ParsedModel model = parser.parse(ddl);
        Assert.assertEquals(ParsedModel.CREATE_TABLE, model.getModelType());
        Assert.assertTrue(model instanceof CreateTableModel);
        sink.clear();
        ((CreateTableModel) model).toSink(sink);
        TestUtils.assertEquals(expected, sink);
    }, tableModels);
}
Also used : CreateTableModel(com.questdb.griffin.lexer.model.CreateTableModel) ParsedModel(com.questdb.griffin.lexer.model.ParsedModel)

Aggregations

CreateTableModel (com.questdb.griffin.lexer.model.CreateTableModel)1 ParsedModel (com.questdb.griffin.lexer.model.ParsedModel)1