44import java .sql .PreparedStatement ;
55import java .sql .ResultSet ;
66import java .sql .SQLException ;
7-
87import org .h2 .test .TestBase ;
98
109/**
11- * Test for check compatibility with posgresql function string_agg()
12- *
13- * */
10+ * Test for check compatibility with PostgreSQL function string_agg()
11+ */
1412public class TestStringAggCompatibility extends TestBase {
1513
1614 public static final String STRING_AGG_DB = "stringAgg" ;
@@ -29,10 +27,6 @@ public void test() throws Exception {
2927
3028 prepareDb ();
3129
32-
33-
34-
35-
3630 testWhenOrderByMissing ();
3731 testWithOrderBy ();
3832 }
@@ -51,7 +45,6 @@ private void testWhenOrderByMissing() throws SQLException {
5145 assertEquals ("1, 2, 3" , result .getString (1 ));
5246 }
5347
54-
5548 private ResultSet query (String q ) throws SQLException {
5649 PreparedStatement st = conn .prepareStatement (q );
5750
@@ -61,14 +54,11 @@ private ResultSet query(String q) throws SQLException {
6154 }
6255
6356 private void prepareDb () throws SQLException {
64- exec ("create table stringAgg(\n " +
65- " a int not null,\n " +
66- " b varchar(50) not null\n " +
67- ");" );
68-
69- exec ("insert into stringAgg values(1, '1')" );
70- exec ("insert into stringAgg values(1, '2')" );
71- exec ("insert into stringAgg values(1, '3')" );
57+ exec ("create table stringAgg(\n " + " a int not null,\n " + " b varchar(50) not null\n " + ");" );
58+
59+ exec ("insert into stringAgg values(1, '1')" );
60+ exec ("insert into stringAgg values(1, '2')" );
61+ exec ("insert into stringAgg values(1, '3')" );
7262
7363 }
7464
0 commit comments