@@ -40,19 +40,9 @@ public class PostgresNamedFunctionParameterTest {
4040 @ Test
4141 public void testExpression () throws JSQLParserException {
4242 String sqlStr =
43- "select dy_api.test_func1('test_user ', is_test := false) as col1 " ;
43+ "SELECT concat_lower_or_upper(a := 'Hello ', uppercase := true, b := 'World') " ;
4444
4545 TestUtils .assertSqlCanBeParsedAndDeparsed (sqlStr , true );
46-
47- sqlStr = "exec dbms_stats.gather_schema_stats(\n "
48- + " ownname := 'COMMON', \n "
49- + " estimate_percent := dbms_stats.auto_sample_size, \n "
50- + " method_opt := 'for all columns size auto', \n "
51- + " degree := DBMS_STATS.DEFAULT_DEGREE,\n "
52- + " cascade := DBMS_STATS.AUTO_CASCADE,\n "
53- + " options := 'GATHER AUTO'\n "
54- + " )" ;
55- TestUtils .assertSqlCanBeParsedAndDeparsed (sqlStr , true );
5646 }
5747
5848 /**
@@ -64,12 +54,12 @@ public void testExpression() throws JSQLParserException {
6454 @ Test
6555 public void testExpressionVisitorAdaptor () throws JSQLParserException {
6656 String sqlStr =
67- "select r.*, test.numeric_function ( p_1 := r.param1, p_2 := r.param2 ) as resultaat2 " ;
57+ "SELECT concat_lower_or_upper(a := 'Hello', uppercase := true, b := 'World') " ;
6858
6959 CCJSqlParserUtil .parse (sqlStr ).accept (new StatementVisitorAdapter ());
7060
7161 // alternatively, for the Expression only
72- CCJSqlParserUtil .parseExpression ("p_1 := r.param1 " ).accept (new ExpressionVisitorAdapter (),
62+ CCJSqlParserUtil .parseExpression ("a := 'Hello' " ).accept (new ExpressionVisitorAdapter (),
7363 null );
7464 }
7565
@@ -82,7 +72,7 @@ public void testExpressionVisitorAdaptor() throws JSQLParserException {
8272 @ Test
8373 public void testTableNamesFinder () throws JSQLParserException {
8474 String sqlStr =
85- "select r.*, test.numeric_function ( p_1 := r.param1, p_2 := r.param2 ) as resultaat2 from test_table" ;
75+ "SELECT concat_lower_or_upper(a := 'Hello', uppercase := true, b := 'World') FROM test_table" ;
8676
8777 Statement statement = CCJSqlParserUtil .parse (sqlStr );
8878 List <String > tables = new TablesNamesFinder <>().getTableList (statement );
@@ -99,7 +89,7 @@ public void testTableNamesFinder() throws JSQLParserException {
9989 @ Test
10090 public void testValidator () throws JSQLParserException {
10191 String sqlStr =
102- "select r.*, test.numeric_function ( p_1 := r.param1, p_2 := r.param2 ) as resultaat2 " ;
92+ "SELECT concat_lower_or_upper(a := 'Hello', uppercase := true, b := 'World') FROM test_table " ;
10393
10494 ValidationTestAsserts .validateNoErrors (sqlStr , 1 , DatabaseType .POSTGRESQL );
10595 }
0 commit comments