public Query parseQuery( String gql, Object... params) {
fo = null;
try {
GqlDynamicLexer lexer = new GqlDynamicLexer( new ANTLRStringStream( gql ));
GqlDynamicParser parser = new GqlDynamicParser( new CommonTokenStream( lexer ));
Query ret = parser.gql( params );
fo = FetchOptions.Builder.withOffset( parser.getOffset() != null ? parser.getOffset() : 0);
if (parser.getLimit() != null) {
fo = fo.limit( parser.getLimit());
}
multipleQueries = parser.wasMultipleQueries();
keysOnly = parser.wasKeysOnly();
return ret;
}
catch (RecognitionException e) {
log.error("parseQuery(): " + formatError( gql, e ));