use of com.questdb.parser.sql.model.ParsedModel in project questdb by bluestreak01.
the class AbstractQueryContext method executeQuery.
private RecordSource executeQuery(ChunkedResponse r, Factory factory) throws ParserException, DisconnectedChannelException, SlowWritableChannelException {
QueryCompiler compiler = COMPILER.get();
ParsedModel model = compiler.parse(query);
switch(model.getModelType()) {
case ParsedModel.QUERY:
return compiler.compile(factory, model);
default:
try {
compiler.execute(factory, model);
} catch (JournalException e) {
error().$("Server error executing statement ").$(query).$(e).$();
sendException(r, 0, e.getMessage(), 500);
}
return null;
}
}
Aggregations