Java 类com.facebook.presto.sql.parser.SqlParserOptions 实例源码

项目:rakam    文件:TestQueryMap.java   
@Test
public void testName() throws Exception {
    String sql = "select selami:timestamp, melami:varchar from deneme where ali:timestamp is not null and veli is null group by demo";
    SqlParserOptions options = new SqlParserOptions().allowIdentifierSymbol(IdentifierSymbol.COLON);
    Statement statement = new SqlParser(options).createStatement(sql);

    String s = RakamSqlFormatter.formatSql(statement,
            name -> String.format("(SELECT * FROM events WHERE collection_name = '%s')", name.toString()),
            name -> "\"$data\"['" + name + "']", '"');
    System.out.println(s);
}
项目:presto    文件:PrestoServer.java   
public PrestoServer()
{
    this(new SqlParserOptions());
}
项目:presto    文件:PrestoServer.java   
public PrestoServer(SqlParserOptions sqlParserOptions)
{
    this.sqlParserOptions = requireNonNull(sqlParserOptions, "sqlParserOptions is null");
}
项目:presto    文件:ServerMainModule.java   
public ServerMainModule(SqlParserOptions sqlParserOptions)
{
    this.sqlParserOptions = requireNonNull(sqlParserOptions, "sqlParserOptions is null");
}