Skip to content

Commit

Permalink
removed advanced_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexradzin committed Nov 30, 2023
1 parent b0d23d5 commit 8ca7cce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ void shouldNotCloseStatementWithCloseOnCompletionIfItHasMoreResults() throws SQL
void shouldGetBooleans() throws SQLException {
try (Connection connection = createConnection()) {
try (Statement statement = connection.createStatement()) {
statement.execute(
"SET advanced_mode=1; SET output_format_firebolt_type_names=1; SET bool_output_format=postgres;");
statement.execute("SET SET bool_output_format=postgres;");
ResultSet resultSet = statement.executeQuery("SELECT true, false, null::boolean;");
resultSet.next();
assertEquals(Boolean.TRUE, resultSet.getObject(1));
Expand Down
8 changes: 4 additions & 4 deletions src/integrationTest/java/integration/tests/TimestampTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void shouldReturnTimestampFromTimestamptz() throws SQLException {
ResultSet resultSetWithTzInQuery = statementWithTzInQuery
.executeQuery("SELECT '1975-05-10 23:01:02.123 EST'::timestamptz;")) {
// Same as: SELECT '1975-05-10 23:01:02.123 Europe/Berlin'::timestamptz;
statement.execute("SET advanced_mode=1;SET time_zone = 'EST';");
statement.execute("SET time_zone = 'EST';");
ResultSet resultSetWithTzAsQueryParam = statement
.executeQuery("SELECT '1975-05-10 23:01:02.123'::timestamptz;");
resultSetWithTzInQuery.next();
Expand Down Expand Up @@ -203,7 +203,7 @@ void shouldReturnTimestampFromTimestamptz() throws SQLException {
@Test
void shouldReturnTimestampFromTimestampTzWithTzWithHoursAndMinutes() throws SQLException {
try (Connection connection = this.createConnection(); Statement statement = connection.createStatement()) {
statement.execute("SET advanced_mode=1;SET time_zone = 'Asia/Calcutta';"); // The server will return a tz in
statement.execute("SET time_zone = 'Asia/Calcutta';"); // The server will return a tz in
// the format +05:30
ResultSet resultSet = statement.executeQuery("SELECT '1975-05-10 23:01:02.123'::timestamptz;");
resultSet.next();
Expand All @@ -215,7 +215,7 @@ void shouldReturnTimestampFromTimestampTzWithTzWithHoursAndMinutes() throws SQLE
@Test
void shouldReturnTimestampFromTimestampTzWithTzWithHoursAndMinutesAndSeconds() throws SQLException {
try (Connection connection = this.createConnection(); Statement statement = connection.createStatement()) {
statement.execute("SET advanced_mode=1;SET time_zone = 'Asia/Calcutta';"); // The server will return a tz in
statement.execute("SET time_zone = 'Asia/Calcutta';"); // The server will return a tz in
// the format +05:30
ResultSet resultSet = statement.executeQuery("SELECT '1111-01-05 17:04:42.123456'::timestamptz");
resultSet.next();
Expand All @@ -232,7 +232,7 @@ void shouldReturnTimestampFromTimestampTzWithTzWithHoursAndMinutesAndSeconds() t
@Test
void shouldReturnTimestampFromDate() throws SQLException {
try (Connection connection = this.createConnection(); Statement statement = connection.createStatement()) {
statement.execute("SET advanced_mode=1; SET time_zone='Europe/Berlin';");
statement.execute("SET time_zone='Europe/Berlin';");
ResultSet resultSet = statement.executeQuery("SELECT '2022-05-10'::pgdate;");
resultSet.next();
ZonedDateTime expectedZdt = ZonedDateTime.of(2022, 5, 10, 0, 0, 0, 0, UTC_TZ.toZoneId());
Expand Down

0 comments on commit 8ca7cce

Please sign in to comment.