Skip to content

Commit

Permalink
[#841] Oracle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobe91 committed Jul 22, 2020
1 parent 5dc9cd1 commit 49f6eba
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 12 deletions.
3 changes: 3 additions & 0 deletions core/testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,9 @@
<!-- Careful, we need this otherwise the ordering will be wrong... -->
<user.country>US</user.country>
<user.language>en</user.language>
<!-- Dumb, dumber, Oracle -->
<!-- See https://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12 -->
<oracle.jdbc.DateZeroTime>true</oracle.jdbc.DateZeroTime>
</systemPropertyVariables>
</configuration>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,17 @@ Where `pathSegmentN` is a quoted literal json key or array index.

Returns the json node (scalar, object or array) within the `jsonDocument` designated by the path segments.

Usage examples:

[source]
----
json_get('{ "owner": { "firstName": "John", "lastName": "Smith", hobbies: [ "football", "tennis" ] } }', 'owner', 'firstName')
--> John
json_get('{ "owner": { "firstName": "John", "lastName": "Smith", hobbies: [ "football", "tennis" ] } }', 'owner', 'hobbies', '1')
--> tennis
----

==== JSON_SET

Sytax: `JSON_SET(jsonDocument, newValue, pathSegment1, ..., pathSegmentN)`
Expand All @@ -549,6 +560,17 @@ Returns the modified `jsonDocument` that results from replacing the json node de

Setting JSON `null` is not supported for Oracle.

Usage examples:

[source]
----
json_set('{ "owner": { "firstName": "John", "lastName": "Smith", hobbies: [ "football", "tennis" ] } }', 'James', 'owner', 'firstName')
--> { "owner": { "firstName": "James", "lastName": "Smith", hobbies: [ "football", "tennis" ] } }
json_set('{ "owner": { "firstName": "John", "lastName": "Smith", hobbies: [ "football", "tennis" ] } }', 'table tennis', 'owner', 'hobbies', '1')
--> { "owner": { "firstName": "James", "lastName": "Smith", hobbies: [ "football", "table tennis" ] } }
----

==== STRING_JSON_AGG function

Syntax: `STRING_JSON_AGG ( key1, value1, ..., keyN, valueN )`
Expand Down
9 changes: 6 additions & 3 deletions entity-view/testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,16 @@
<configuration>
<excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups}</excludedGroups>
<systemPropertyVariables>
<jdbc.url>jdbc:oracle:thin:@localhost:1521/xe</jdbc.url>
<jdbc.url>jdbc:oracle:thin:@localhost:1521:XE</jdbc.url>
<jdbc.user>SYSTEM</jdbc.user>
<jdbc.password>oracle</jdbc.password>
<jdbc.password>Oracle18</jdbc.password>
<jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
<!-- Careful, we need this otherwise the ordering will be wrong... -->
<user.country>us</user.country>
<user.country>US</user.country>
<user.language>en</user.language>
<!-- Dumb, dumber, Oracle -->
<!-- See https://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12 -->
<oracle.jdbc.DateZeroTime>true</oracle.jdbc.DateZeroTime>
</systemPropertyVariables>
</configuration>
<dependencies>
Expand Down
10 changes: 8 additions & 2 deletions integration/deltaspike-data/testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,16 @@
<configuration>
<excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups}</excludedGroups>
<systemPropertyVariables>
<jdbc.url>jdbc:oracle:thin:@localhost:1521/xe</jdbc.url>
<jdbc.url>jdbc:oracle:thin:@localhost:1521:XE</jdbc.url>
<jdbc.user>SYSTEM</jdbc.user>
<jdbc.password>oracle</jdbc.password>
<jdbc.password>Oracle18</jdbc.password>
<jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
<!-- Careful, we need this otherwise the ordering will be wrong... -->
<user.country>US</user.country>
<user.language>en</user.language>
<!-- Dumb, dumber, Oracle -->
<!-- See https://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12 -->
<oracle.jdbc.DateZeroTime>true</oracle.jdbc.DateZeroTime>
<activeProfiles>${spring.activeProfiles}</activeProfiles>
</systemPropertyVariables>
</configuration>
Expand Down
7 changes: 5 additions & 2 deletions integration/querydsl/testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,16 @@
<configuration>
<excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups}</excludedGroups>
<systemPropertyVariables>
<jdbc.url>jdbc:oracle:thin:@localhost:1521/xe</jdbc.url>
<jdbc.url>jdbc:oracle:thin:@localhost:1521:XE</jdbc.url>
<jdbc.user>SYSTEM</jdbc.user>
<jdbc.password>oracle</jdbc.password>
<jdbc.password>Oracle18</jdbc.password>
<jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
<!-- Careful, we need this otherwise the ordering will be wrong... -->
<user.country>US</user.country>
<user.language>en</user.language>
<!-- Dumb, dumber, Oracle -->
<!-- See https://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12 -->
<oracle.jdbc.DateZeroTime>true</oracle.jdbc.DateZeroTime>
</systemPropertyVariables>
</configuration>
<dependencies>
Expand Down
10 changes: 8 additions & 2 deletions integration/spring-data/testsuite/webflux/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,16 @@
<configuration>
<excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups}</excludedGroups>
<systemPropertyVariables>
<jdbc.url>jdbc:oracle:thin:@localhost:1521/xe</jdbc.url>
<jdbc.url>jdbc:oracle:thin:@localhost:1521:XE</jdbc.url>
<jdbc.user>SYSTEM</jdbc.user>
<jdbc.password>oracle</jdbc.password>
<jdbc.password>Oracle18</jdbc.password>
<jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
<!-- Careful, we need this otherwise the ordering will be wrong... -->
<user.country>US</user.country>
<user.language>en</user.language>
<!-- Dumb, dumber, Oracle -->
<!-- See https://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12 -->
<oracle.jdbc.DateZeroTime>true</oracle.jdbc.DateZeroTime>
<activeProfiles>${spring.activeProfiles}</activeProfiles>
</systemPropertyVariables>
</configuration>
Expand Down
10 changes: 8 additions & 2 deletions integration/spring-data/testsuite/webmvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,16 @@
<configuration>
<excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups}</excludedGroups>
<systemPropertyVariables>
<jdbc.url>jdbc:oracle:thin:@localhost:1521/xe</jdbc.url>
<jdbc.url>jdbc:oracle:thin:@localhost:1521:XE</jdbc.url>
<jdbc.user>SYSTEM</jdbc.user>
<jdbc.password>oracle</jdbc.password>
<jdbc.password>Oracle18</jdbc.password>
<jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
<!-- Careful, we need this otherwise the ordering will be wrong... -->
<user.country>US</user.country>
<user.language>en</user.language>
<!-- Dumb, dumber, Oracle -->
<!-- See https://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12 -->
<oracle.jdbc.DateZeroTime>true</oracle.jdbc.DateZeroTime>
<activeProfiles>${spring.activeProfiles}</activeProfiles>
</systemPropertyVariables>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>18.3.0.0</version>
<version>19.7.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 49f6eba

Please sign in to comment.