use of com.alibaba.druid.sql.dialect.postgresql.parser.PGExprParser in project druid by alibaba.
the class TimestampTest method test_timestamp_with_timezone.
public void test_timestamp_with_timezone() throws Exception {
String sql = "TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'";
PGExprParser parser = new PGExprParser(sql);
SQLTimestampExpr expr = (SQLTimestampExpr) parser.expr();
System.out.println(expr.toString());
}
use of com.alibaba.druid.sql.dialect.postgresql.parser.PGExprParser in project druid by alibaba.
the class PolygonTest2 method test_timestamp.
public void test_timestamp() throws Exception {
String sql = "polygon '((0,0),(1,1))'";
PGExprParser parser = new PGExprParser(sql);
PGPolygonExpr expr = (PGPolygonExpr) parser.expr();
Assert.assertEquals("polygon '((0,0),(1,1))'", expr.toString());
}
use of com.alibaba.druid.sql.dialect.postgresql.parser.PGExprParser in project druid by alibaba.
the class ArrayTest method test_timestamp.
public void test_timestamp() throws Exception {
String sql = "cast(xx as varchar(12)[])";
PGExprParser parser = new PGExprParser(sql);
SQLExpr expr = parser.expr();
Assert.assertEquals("CAST(xx AS varchar(12)[])", SQLUtils.toPGString(expr));
}
use of com.alibaba.druid.sql.dialect.postgresql.parser.PGExprParser in project druid by alibaba.
the class InetTest method test_timestamp.
public void test_timestamp() throws Exception {
String sql = "inet '0.0.0.255'";
PGExprParser parser = new PGExprParser(sql);
PGInetExpr expr = (PGInetExpr) parser.expr();
Assert.assertEquals("inet '0.0.0.255'", expr.toString());
}
Aggregations