use of com.alibaba.druid.sql.dialect.postgresql.ast.expr.PGBoxExpr in project druid by alibaba.
the class BoxTest method test_timestamp.
public void test_timestamp() throws Exception {
String sql = "box '((0,0),(1,1))' + point '(2.0,0)'";
PGExprParser parser = new PGExprParser(sql);
SQLBinaryOpExpr binaryExpr = (SQLBinaryOpExpr) parser.expr();
PGBoxExpr box = (PGBoxExpr) binaryExpr.getLeft();
PGPointExpr point = (PGPointExpr) binaryExpr.getRight();
Assert.assertEquals("BOX '((0,0),(1,1))' + POINT '(2.0,0)'", binaryExpr.toString());
}
Aggregations