Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8</argLine>
<forkedProcessExitTimeoutInSeconds>3</forkedProcessExitTimeoutInSeconds>
<forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
<!--suppress UnresolvedMavenProperty -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public enum ResponseType {

private final ResponseType responseType;
private final DataFormat format;
private final String stringData;
private final byte[] stringData;
private final char rowTerminator;
private final Converter converter;

Expand All @@ -59,7 +59,11 @@ private CopyDataResponse(DataOutputStream output, int length, ResponseType respo
}

public CopyDataResponse(DataOutputStream output, String data, char rowTerminator) {
super(output, data.length() + 5);
this(output, data.getBytes(StandardCharsets.UTF_8), rowTerminator);
}

private CopyDataResponse(DataOutputStream output, byte[] data, char rowTerminator) {
super(output, data.length + 5);
this.responseType = ResponseType.ROW;
this.format = DataFormat.POSTGRESQL_TEXT;
this.stringData = data;
Expand Down Expand Up @@ -87,7 +91,7 @@ public void send(boolean flush) throws Exception {
@Override
protected void sendPayload() throws Exception {
if (this.format == DataFormat.POSTGRESQL_TEXT) {
this.outputStream.write(this.stringData.getBytes(StandardCharsets.UTF_8));
this.outputStream.write(this.stringData);
this.outputStream.write(this.rowTerminator);
} else if (this.format == DataFormat.POSTGRESQL_BINARY) {
if (this.responseType == ResponseType.TRAILER_WITH_HEADER) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public void TestQueryAllDataTypes()
Console.WriteLine($"Value mismatch: Got '{reader.GetDateTime(index)}', Want: '2022-03-29'");
return;
}
if (reader.GetString(++index) != "test")
if (reader.GetString(++index) != "testÄ")
{
Console.WriteLine($"Value mismatch: Got '{reader.GetString(index)}', Want: 'test'");
return;
Expand Down Expand Up @@ -278,7 +278,7 @@ public void TestUpdateAllDataTypes()
new () {Value = DateTime.Parse("2022-04-02"), DbType = DbType.Date},
new () {Value = "test_string"},
new () {Value = JsonDocument.Parse("{\"key\": \"value\"}")},
new () {Value = "test"},
new () {Value = "testÄ"},
}
};
var updateCount = cmd.ExecuteNonQuery();
Expand Down Expand Up @@ -384,7 +384,7 @@ public void TestInsertAllDataTypesReturning()
new () {Value = DateTime.Parse("2022-02-16T13:18:02.123456789Z").ToUniversalTime(), DbType = DbType.DateTimeOffset},
new () {Value = new NpgsqlInterval(14, 3, 14400000000L + 300000000L + 6789000L)},
new () {Value = DateTime.Parse("2022-03-29"), DbType = DbType.Date},
new () {Value = "test"},
new () {Value = "testÄ"},
new () {Value = JsonDocument.Parse("{\"key\":\"value\"}")},
}
};
Expand Down Expand Up @@ -452,7 +452,7 @@ public void TestInsertAllDataTypesReturning()
Console.WriteLine($"Date value mismatch: Got '{reader.GetDateTime(index)}', Want: '2022-03-29'");
return;
}
if (reader.GetString(++index) != "test")
if (reader.GetString(++index) != "testÄ")
{
Console.WriteLine($"Value mismatch: Got '{reader.GetString(index)}', Want: 'test'");
return;
Expand Down Expand Up @@ -871,6 +871,7 @@ public void TestBinaryCopyOut()
using var connection = new NpgsqlConnection(ConnectionString);
connection.Open();

Console.OutputEncoding = Encoding.UTF8;
using (var reader =
connection.BeginBinaryExport("COPY (select col_bigint, col_bool, col_bytea, col_float4, col_float8, col_int, col_numeric, col_timestamptz, col_interval::interval, col_date, col_varchar, col_jsonb, col_array_bigint, col_array_bool, col_array_bytea, col_array_float4, col_array_float8, col_array_int, col_array_numeric, col_array_timestamptz, col_array_interval, col_array_date, col_array_varchar, col_array_jsonb from all_types order by col_bigint) " +
"TO STDOUT (FORMAT BINARY)"))
Expand Down Expand Up @@ -1136,6 +1137,7 @@ public void TestTextCopyOut()
using var connection = new NpgsqlConnection(ConnectionString);
connection.Open();

Console.OutputEncoding = Encoding.UTF8;
using (var reader =
connection.BeginTextExport("COPY (select * from all_types order by col_bigint) " +
"TO STDOUT"))
Expand Down
2 changes: 1 addition & 1 deletion src/test/golang/pgadapter_gorm_tests/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func TestQueryAllDataTypes(connString string) *C.char {
if g, w := *row.ColDate, parseDate("2022-03-29"); !reflect.DeepEqual(g, w) {
return C.CString(fmt.Sprintf("ColDate mismatch\nGot: %v\nWant: %v", g, w))
}
if g, w := *row.ColVarchar, "test"; g != w {
if g, w := *row.ColVarchar, "testÄ"; g != w {
return C.CString(fmt.Sprintf("ColVarchar mismatch\nGot: %v\nWant: %v", g, w))
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/golang/pgadapter_pgx5_tests/pgx.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func TestQueryAllDataTypes(connString string, oid, format int16) *C.char {
if g, w := intervalValue, wantIntervalValue; !reflect.DeepEqual(g, w) {
return C.CString(fmt.Sprintf("interval value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := varcharValue, "test"; g != w {
if g, w := varcharValue, "testÄ"; g != w {
return C.CString(fmt.Sprintf("value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := jsonbValue, "{\"key\": \"value\"}"; g != w {
Expand Down Expand Up @@ -417,7 +417,7 @@ func TestInsertAllDataTypesReturning(connString string) *C.char {
if g, w := intervalValue, wantIntervalValue; !reflect.DeepEqual(g, w) {
return C.CString(fmt.Sprintf("interval value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := varcharValue, "test"; g != w {
if g, w := varcharValue, "testÄ"; g != w {
return C.CString(fmt.Sprintf("value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := jsonbValue, "{\"key\": \"value\"}"; g != w {
Expand Down
4 changes: 2 additions & 2 deletions src/test/golang/pgadapter_pgx_tests/pgx.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func TestQueryAllDataTypes(connString string, oid, format int16) *C.char {
if g, w := timestamptzValue.UTC().String(), wantTimestamptzValue.UTC().String(); g != w {
return C.CString(fmt.Sprintf("value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := varcharValue, "test"; g != w {
if g, w := varcharValue, "testÄ"; g != w {
return C.CString(fmt.Sprintf("value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := jsonbValue, "{\"key\": \"value\"}"; g != w {
Expand Down Expand Up @@ -526,7 +526,7 @@ func TestInsertAllDataTypesReturning(connString string) *C.char {
if g, w := timestamptzValue.UTC().String(), wantTimestamptzValue.UTC().String(); g != w {
return C.CString(fmt.Sprintf("value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := varcharValue, "test"; g != w {
if g, w := varcharValue, "testÄ"; g != w {
return C.CString(fmt.Sprintf("value mismatch\n Got: %v\nWant: %v", g, w))
}
if g, w := jsonbValue, "{\"key\": \"value\"}"; g != w {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public void testQueryWithParameters() throws SQLException {
new PGInterval("14 mons 3 days 4 hours 5 mins 6.789 secs"),
resultSet.getObject(++index, PGInterval.class));
assertEquals(LocalDate.of(2022, 3, 29), resultSet.getObject(++index, LocalDate.class));
assertEquals("test", resultSet.getString(++index));
assertEquals("testÄ", resultSet.getString(++index));
assertEquals("{\"key\": \"value\"}", resultSet.getString(++index));

assertArrayEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ protected static ResultSet createAllTypesResultSet(
.build())
.addValues(Value.newBuilder().setStringValue("P1Y2M3DT4H5M6.789S").build())
.addValues(Value.newBuilder().setStringValue("2022-03-29").build())
.addValues(Value.newBuilder().setStringValue("test").build())
.addValues(Value.newBuilder().setStringValue("testÄ").build())
.addValues(Value.newBuilder().setStringValue("{\"key\": \"value\"}").build())
.addValues(
Value.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void testCopyOut() throws SQLException, IOException {

assertEquals(
"1\tt\t\\\\x74657374\t3.14\t3.14\t100\t6.626\t2022-02-16 13:18:02.123456+00\t"
+ "14 mons 3 days 04:05:6.789000\t2022-03-29\ttest\t{\"key\": \"value\"}\t{1,NULL,2}\t"
+ "14 mons 3 days 04:05:6.789000\t2022-03-29\ttestÄ\t{\"key\": \"value\"}\t{1,NULL,2}\t"
+ "{t,NULL,f}\t{\"\\\\\\\\x627974657331\",NULL,\"\\\\\\\\x627974657332\"}\t{3.14,NULL,-99.99}\t"
+ "{3.14,NULL,-99.99}\t{-100,NULL,-200}\t{6.626,NULL,-3.14}\t"
+ "{\"2022-02-16 16:18:02.123456+00\",NULL,\"2000-01-01 00:00:00+00\"}\t"
Expand Down Expand Up @@ -267,7 +267,7 @@ public void testCopyOutWithColumns() throws SQLException, IOException {

assertEquals(
"1\tt\t\\\\x74657374\t3.14\t3.14\t100\t6.626\t2022-02-16 13:18:02.123456+00\t"
+ "14 mons 3 days 04:05:6.789000\t2022-03-29\ttest\t{\"key\": \"value\"}\t{1,NULL,2}\t"
+ "14 mons 3 days 04:05:6.789000\t2022-03-29\ttestÄ\t{\"key\": \"value\"}\t{1,NULL,2}\t"
+ "{t,NULL,f}\t{\"\\\\\\\\x627974657331\",NULL,\"\\\\\\\\x627974657332\"}\t{3.14,NULL,-99.99}\t"
+ "{3.14,NULL,-99.99}\t{-100,NULL,-200}\t{6.626,NULL,-3.14}\t"
+ "{\"2022-02-16 16:18:02.123456+00\",NULL,\"2000-01-01 00:00:00+00\"}\t"
Expand Down Expand Up @@ -307,7 +307,7 @@ public void testCopyOutCsv() throws SQLException, IOException {

assertEquals(
"1-t-\\x74657374-3.14-3.14-100-6.626-\"2022-02-16 13:18:02.123456+00\"-14 mons 3 days 04:05:6.789000-"
+ "\"2022-03-29\"-test-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-"
+ "\"2022-03-29\"-testÄ-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-"
+ "\"{~\"\\\\x627974657331~\",NULL,~\"\\\\x627974657332~\"}\"-\"{3.14,NULL,-99.99}\"-"
+ "\"{3.14,NULL,-99.99}\"-\"{-100,NULL,-200}\"-\"{6.626,NULL,-3.14}\"-"
+ "\"{~\"2022-02-16 16:18:02.123456+00~\",NULL,~\"2000-01-01 00:00:00+00~\"}\"-"
Expand Down Expand Up @@ -337,8 +337,8 @@ public void testCopyOutCsvWithHeader() throws SQLException, IOException {

assertEquals(
"col_bigint-col_bool-col_bytea-col_float4-col_float8-col_int-col_numeric-col_timestamptz-col_interval-col_date-col_varchar-col_jsonb-col_array_bigint-col_array_bool-col_array_bytea-col_array_float4-col_array_float8-col_array_int-col_array_numeric-col_array_timestamptz-col_array_interval-col_array_date-col_array_varchar-col_array_jsonb\n"
+ "1-t-\\x74657374-3.14-3.14-100-6.626-\"2022-02-16 13:18:02.123456+00\"-14 mons 3 days 04:05:6.789000-\"2022-03-29\"-test-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-\"{~\"\\\\x627974657331~\",NULL,~\"\\\\x627974657332~\"}\"-\"{3.14,NULL,-99.99}\"-\"{3.14,NULL,-99.99}\"-\"{-100,NULL,-200}\"-\"{6.626,NULL,-3.14}\"-\"{~\"2022-02-16 16:18:02.123456+00~\",NULL,~\"2000-01-01 00:00:00+00~\"}\"-\"{-100 mons 0 days 34:17:36.789000,NULL,12 mons 0 days 00:00:0.000000}\"-\"{~\"2023-02-20~\",NULL,~\"2000-01-01~\"}\"-\"{~\"string1~\",NULL,~\"string2~\"}\"-\"{~\"{\\~\"key\\~\": \\~\"value1\\~\"}~\",NULL,~\"{\\~\"key\\~\": \\~\"value2\\~\"}~\"}\"\n"
+ "1-t-\\x74657374-3.14-3.14-100-6.626-\"2022-02-16 13:18:02.123456+00\"-14 mons 3 days 04:05:6.789000-\"2022-03-29\"-test-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-\"{~\"\\\\x627974657331~\",NULL,~\"\\\\x627974657332~\"}\"-\"{3.14,NULL,-99.99}\"-\"{3.14,NULL,-99.99}\"-\"{-100,NULL,-200}\"-\"{6.626,NULL,-3.14}\"-\"{~\"2022-02-16 16:18:02.123456+00~\",NULL,~\"2000-01-01 00:00:00+00~\"}\"-\"{-100 mons 0 days 34:17:36.789000,NULL,12 mons 0 days 00:00:0.000000}\"-\"{~\"2023-02-20~\",NULL,~\"2000-01-01~\"}\"-\"{~\"string1~\",NULL,~\"string2~\"}\"-\"{~\"{\\~\"key\\~\": \\~\"value1\\~\"}~\",NULL,~\"{\\~\"key\\~\": \\~\"value2\\~\"}~\"}\"\n"
+ "1-t-\\x74657374-3.14-3.14-100-6.626-\"2022-02-16 13:18:02.123456+00\"-14 mons 3 days 04:05:6.789000-\"2022-03-29\"-testÄ-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-\"{~\"\\\\x627974657331~\",NULL,~\"\\\\x627974657332~\"}\"-\"{3.14,NULL,-99.99}\"-\"{3.14,NULL,-99.99}\"-\"{-100,NULL,-200}\"-\"{6.626,NULL,-3.14}\"-\"{~\"2022-02-16 16:18:02.123456+00~\",NULL,~\"2000-01-01 00:00:00+00~\"}\"-\"{-100 mons 0 days 34:17:36.789000,NULL,12 mons 0 days 00:00:0.000000}\"-\"{~\"2023-02-20~\",NULL,~\"2000-01-01~\"}\"-\"{~\"string1~\",NULL,~\"string2~\"}\"-\"{~\"{\\~\"key\\~\": \\~\"value1\\~\"}~\",NULL,~\"{\\~\"key\\~\": \\~\"value2\\~\"}~\"}\"\n"
+ "1-t-\\x74657374-3.14-3.14-100-6.626-\"2022-02-16 13:18:02.123456+00\"-14 mons 3 days 04:05:6.789000-\"2022-03-29\"-testÄ-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-\"{~\"\\\\x627974657331~\",NULL,~\"\\\\x627974657332~\"}\"-\"{3.14,NULL,-99.99}\"-\"{3.14,NULL,-99.99}\"-\"{-100,NULL,-200}\"-\"{6.626,NULL,-3.14}\"-\"{~\"2022-02-16 16:18:02.123456+00~\",NULL,~\"2000-01-01 00:00:00+00~\"}\"-\"{-100 mons 0 days 34:17:36.789000,NULL,12 mons 0 days 00:00:0.000000}\"-\"{~\"2023-02-20~\",NULL,~\"2000-01-01~\"}\"-\"{~\"string1~\",NULL,~\"string2~\"}\"-\"{~\"{\\~\"key\\~\": \\~\"value1\\~\"}~\",NULL,~\"{\\~\"key\\~\": \\~\"value2\\~\"}~\"}\"\n"
+ "-----------------------\n",
writer.toString());
}
Expand All @@ -360,7 +360,7 @@ public void testCopyOutCsvWithColumnsAndHeader() throws SQLException, IOExceptio

assertEquals(
"col_bigint\n"
+ "1-t-\\x74657374-3.14-3.14-100-6.626-\"2022-02-16 13:18:02.123456+00\"-14 mons 3 days 04:05:6.789000-\"2022-03-29\"-test-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-\"{~\"\\\\x627974657331~\",NULL,~\"\\\\x627974657332~\"}\"-\"{3.14,NULL,-99.99}\"-\"{3.14,NULL,-99.99}\"-\"{-100,NULL,-200}\"-\"{6.626,NULL,-3.14}\"-\"{~\"2022-02-16 16:18:02.123456+00~\",NULL,~\"2000-01-01 00:00:00+00~\"}\"-\"{-100 mons 0 days 34:17:36.789000,NULL,12 mons 0 days 00:00:0.000000}\"-\"{~\"2023-02-20~\",NULL,~\"2000-01-01~\"}\"-\"{~\"string1~\",NULL,~\"string2~\"}\"-\"{~\"{\\~\"key\\~\": \\~\"value1\\~\"}~\",NULL,~\"{\\~\"key\\~\": \\~\"value2\\~\"}~\"}\"\n",
+ "1-t-\\x74657374-3.14-3.14-100-6.626-\"2022-02-16 13:18:02.123456+00\"-14 mons 3 days 04:05:6.789000-\"2022-03-29\"-testÄ-\"{~\"key~\": ~\"value~\"}\"-{1,NULL,2}-{t,NULL,f}-\"{~\"\\\\x627974657331~\",NULL,~\"\\\\x627974657332~\"}\"-\"{3.14,NULL,-99.99}\"-\"{3.14,NULL,-99.99}\"-\"{-100,NULL,-200}\"-\"{6.626,NULL,-3.14}\"-\"{~\"2022-02-16 16:18:02.123456+00~\",NULL,~\"2000-01-01 00:00:00+00~\"}\"-\"{-100 mons 0 days 34:17:36.789000,NULL,12 mons 0 days 00:00:0.000000}\"-\"{~\"2023-02-20~\",NULL,~\"2000-01-01~\"}\"-\"{~\"string1~\",NULL,~\"string2~\"}\"-\"{~\"{\\~\"key\\~\": \\~\"value1\\~\"}~\",NULL,~\"{\\~\"key\\~\": \\~\"value2\\~\"}~\"}\"\n",
writer.toString());
}
}
Expand All @@ -382,7 +382,7 @@ public void testCopyOutCsvWithQueryAndHeader() throws SQLException, IOException
assertEquals(
"col_bigint|col_bool|col_bytea|col_float4|col_float8|col_int|col_numeric|col_timestamptz|col_interval|col_date|col_varchar|col_jsonb|col_array_bigint|col_array_bool|col_array_bytea|col_array_float4|col_array_float8|col_array_int|col_array_numeric|col_array_timestamptz|col_array_interval|col_array_date|col_array_varchar|col_array_jsonb\n"
+ "1|t|\"\\\\x74657374\"|3.14|3.14|100|6.626|2022-02-16 13:18:02.123456+00|"
+ "14 mons 3 days 04:05:6.789000|2022-03-29|test|\"{\\\"key\\\": \\\"value\\\"}\"|"
+ "14 mons 3 days 04:05:6.789000|2022-03-29|testÄ|\"{\\\"key\\\": \\\"value\\\"}\"|"
+ "{1,NULL,2}|{t,NULL,f}|\"{\\\"\\\\\\\\x627974657331\\\",NULL,\\\"\\\\\\\\x627974657332\\\"}\"|"
+ "{3.14,NULL,-99.99}|{3.14,NULL,-99.99}|{-100,NULL,-200}|{6.626,NULL,-3.14}|"
+ "\"{\\\"2022-02-16 16:18:02.123456+00\\\",NULL,\\\"2000-01-01 00:00:00+00\\\"}\"|"
Expand All @@ -407,7 +407,7 @@ public void testCopyOutCsvWithQuote() throws SQLException, IOException {

assertEquals(
"1|t|\"\\\\x74657374\"|3.14|3.14|100|6.626|2022-02-16 13:18:02.123456+00|"
+ "14 mons 3 days 04:05:6.789000|2022-03-29|test|\"{\\\"key\\\": \\\"value\\\"}\"|"
+ "14 mons 3 days 04:05:6.789000|2022-03-29|testÄ|\"{\\\"key\\\": \\\"value\\\"}\"|"
+ "{1,NULL,2}|{t,NULL,f}|\"{\\\"\\\\\\\\x627974657331\\\",NULL,\\\"\\\\\\\\x627974657332\\\"}\"|"
+ "{3.14,NULL,-99.99}|{3.14,NULL,-99.99}|{-100,NULL,-200}|{6.626,NULL,-3.14}|"
+ "\"{\\\"2022-02-16 16:18:02.123456+00\\\",NULL,\\\"2000-01-01 00:00:00+00\\\"}\"|"
Expand All @@ -433,7 +433,7 @@ public void testCopyOutCsvWithForceQuoteAll() throws SQLException, IOException {

assertEquals(
"\"1\"|\"t\"|\"\\\\x74657374\"|\"3.14\"|\"3.14\"|\"100\"|\"6.626\"|\"2022-02-16 13:18:02.123456+00\"|"
+ "\"14 mons 3 days 04:05:6.789000\"|\"2022-03-29\"|\"test\"|\"{\\\"key\\\": \\\"value\\\"}\"|"
+ "\"14 mons 3 days 04:05:6.789000\"|\"2022-03-29\"|\"testÄ\"|\"{\\\"key\\\": \\\"value\\\"}\"|"
+ "\"{1,NULL,2}\"|\"{t,NULL,f}\"|\"{\\\"\\\\\\\\x627974657331\\\",NULL,\\\"\\\\\\\\x627974657332\\\"}\"|"
+ "\"{3.14,NULL,-99.99}\"|\"{3.14,NULL,-99.99}\"|\"{-100,NULL,-200}\"|\"{6.626,NULL,-3.14}\"|"
+ "\"{\\\"2022-02-16 16:18:02.123456+00\\\",NULL,\\\"2000-01-01 00:00:00+00\\\"}\"|"
Expand Down Expand Up @@ -550,7 +550,7 @@ public void testCopyOutBinaryPsql() throws Exception {
Value.interval(Interval.parseFromString("P1Y2M3DT4H5M6.789S")),
record.getValue(Type.interval(), ++index));
assertEquals(Value.date(Date.parseDate("2022-03-29")), record.getValue(Type.date(), ++index));
assertEquals(Value.string("test"), record.getValue(Type.string(), ++index));
assertEquals(Value.string("testÄ"), record.getValue(Type.string(), ++index));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ public void testQueryWithParameters() throws SQLException {
new PGInterval("14 mons 3 days 4 hours 5 mins 6.789 secs"),
resultSet.getObject(++index, PGInterval.class));
assertEquals(LocalDate.of(2022, 3, 29), resultSet.getObject(++index, LocalDate.class));
assertEquals("test", resultSet.getString(++index));
assertEquals("testÄ", resultSet.getString(++index));
assertEquals("{\"key\": \"value\"}", resultSet.getString(++index));

for (int col = 1; col <= resultSet.getMetaData().getColumnCount(); col++) {
Expand Down
Loading
Loading