Skip to content

Commit 062536f

Browse files
committed
soda 1.0.5
keyLike and bug fixes
1 parent 10bf5b0 commit 062536f

File tree

71 files changed

+3484
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3484
-263
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# SODA 1.0.4
2-
Simple Oracle Document Access (SODA) is an API from Oracle for working with JSON in the Oracle Database. Although SODA is particularly powerful when it comes to JSON data, data of any other type is supported as well.
1+
# SODA 1.0.5
2+
Simple Oracle Document Access (SODA) is an API which allows you to use the Oracle Database as a NoSQL JSON document store. Although SODA is particularly powerful when it comes to JSON data, data of any other type is supported as well.
33

44
With the SODA architecture, your data is stored as documents, and documents are organized into collections. Each document contains the actual data, as well as additional information automatically maintained by SODA, such as unique key, last-modified timestamp, version, type, etc. SODA lets you create and store such collections of documents in the Oracle Database, and perform create, retrive, update, and delete (CRUD) operations on these documents, without needing to know Structured Query Language (SQL), or JDBC, or how the data is stored in the database. Essentially SODA provides a virtual NoSQL document store on top of your Oracle Database. Under the covers, a collection is stored as a regular Oracle Database table, and each document is stored as a row in the table. SQL access to the table using standard tools is still allowed.
55

build.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22

33
<!--
4-
Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2014, 2015, 2016, 2017 Oracle and/or its affiliates. All rights reserved.
55
66
DESCRIPTION
77
The main ant build for json.
@@ -59,6 +59,7 @@
5959
use="true"
6060
author="false"
6161
failonerror="true"
62+
executable="${javac.java.home}/bin/javadoc"
6263
/>
6364
</target>
6465

@@ -76,7 +77,7 @@
7677
<fileset dir="${classes.dir}"/>
7778
<fileset dir="${resources.dir}"/>
7879
<manifest>
79-
<attribute name="Repository-Id" value="XDK_SODA1.0.4A_LINUX.X64_RELEASE GITHUB"/>
80+
<attribute name="Repository-Id" value="XDK_SODA1.0.5A_LINUX.X64_RELEASE GITHUB"/>
8081
</manifest>
8182
</jar>
8283
</target>

doc/Building-and-running-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ the patch, including the post-installation step.
1010
The test framework is located in the /test directory under the root SODA directory (the root SODA directory is the one containing LICENSE.txt file). It's built with JUnit and driven by Ant. The actual Java test files are in /test/src/oracle/json/tests/soda. To configure the database instance and the test framework, follow these steps (note that some of them require sysdba access).
1111

1212
**(1)** Build the source code (which includes downloading SODA dependencies), as described
13-
in [Building the source code](https://github.com/oracle/soda-for-java/blob/master/doc/Building-source-code.md). Make sure you perform all steps described in this link. Specifically, make sure that the JAVA6HOME environment variable is set, and that the following jars are located in the /lib directory under the top level SODA directory (the one that contains LICENSE.txt):
13+
in [Building the source code](https://github.com/oracle/soda-for-java/blob/master/doc/Building-source-code.md). Make sure you perform all steps described in this link. Specifically, make sure that the JAVA_HOME environment variable is set, and that the following jars are located in the /lib directory under the top level SODA directory (the one that contains LICENSE.txt):
1414

15-
* ojdbc6.jar (the JDBC jar that ships with Oracle database version 12.1.0.2)
15+
* JDBC jar
1616
* javax.json-1.0.4.jar (JSR353 jar)
1717
* junit-3.8.1.jar (JUnit jar)
1818
* orajsoda.jar (SODA Java jar)

doc/Building-source-code.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
# Building the source code
22

3-
SODA is built using Ant with Ivy. Make sure you have ant installed and configured.
3+
SODA is built using Ant with Ivy. Make sure you have Ant 1.9 or above installed and configured.
44
It's not required that Ivy is installed - as long as you have an internet connection,
55
the build process will download Ivy and use it to download SODA dependencies.
66

77
The only SODA dependency that must be manually downloaded is the Oracle JDBC jar that ships with
8-
the 12.1.0.2 release of the Oracle database.
8+
the Oracle database.
99

10-
The JDBC jar can be downloaded from here:
10+
JDBC jars for use with JDK 6, 7, and 8 ship with Oracle Database 12.1.0.2 and can be downloaded from here:
1111

1212
[http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html](http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html)
1313

14-
Make sure you pick ojdbc6.jar, out of the different flavors available.
14+
Make sure you pick either ojdbc6.jar (for use with JDK 6), or ojdbc7.jar (for use with JDK 7 and 8),
15+
out of the different flavors available.
1516

16-
Copy the downloaded ojdbc6.jar to the /lib directory under the root SODA directory (the root SODA directory is the one containing LICENSE.txt file).
17+
If you are using JDK 8 and planning to run SODA with Oracle Database 12.2.0.1, you can alternatively download ojdbc8.jar from here:
18+
19+
http://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html
20+
21+
Copy the downloaded JDBC jar to the /lib directory under the root SODA directory (the root SODA directory is the one containing LICENSE.txt file).
1722

1823
Other dependencies will be automatically downloaded by Ivy. You also have the
1924
option to not use Ivy, and to download the dependencies manually (see "Building without Ivy" below).
2025

2126
The following instructions require setting various environment variables. They assume you're on Linux, and using the C Shell (csh). On other OSes, you would set environment variables analogously, using a mechanism appropriate for your specific operating system.
2227

23-
SODA builds using Java 6. Set the JAVA6HOME environment
24-
variable to the JDK install directory. For example, assuming JDK6 is installed
25-
under /jdk6, and you're using the C Shell (csh) on Linux, do:
28+
Set the JAVA_HOME environment variable to the JDK install directory. At a minimum, JDK 6 is required. For example, assuming you are using JDK 8 installed under /jdk8, and you're using the C Shell (csh) on Linux, do:
2629

27-
setenv JAVA6HOME /jdk6
30+
setenv JAVA_HOME /jdk8
2831

2932
### Building with Ivy
3033

doc/Getting-started-example.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ public class testSODA {
7676
// users and the number of friends they have
7777
OracleDocument doc1 =
7878
db.createDocumentFromString(
79-
"{ \"name\" : \"Alex\", \"friends\" : \"50\" }");
79+
"{ \"name\" : \"Alex\", \"friends\" : 50 }");
8080

8181
OracleDocument doc2 =
8282
db.createDocumentFromString(
83-
"{ \"name\" : \"Mia\", \"friends\" : \"300\" }");
83+
"{ \"name\" : \"Mia\", \"friends\" : 300 }");
8484

8585
OracleDocument doc3 =
8686
db.createDocumentFromString(
87-
"{ \"name\" : \"Gloria\", \"friends\" : \"399\" }");
87+
"{ \"name\" : \"Gloria\", \"friends\" : 399 }");
8888

8989
// Insert the documents into a collection, one-by-one.
9090
// The result documents contain auto-generated
@@ -159,27 +159,27 @@ Copy and paste this code into a file called testSODA.java. Then modify the "url"
159159

160160
To compile and run SODA Java applications, you need the following jars:
161161

162-
* ojdbc6.jar that ships with Oracle Database 12.1.0.2. Download it from [this page](http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html).
162+
* ojdbc6.jar (for use with JDK 6) or ojdbc7.jar (for use with JDK 7 or 8) that ship with Oracle Database 12.1.0.2. Download it from [this page](http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html). These jars will work with Oracle Database 12.1.0.2 and above. Alternatively, if you are using JDK 8 and Oracle Database 12.2.0.1 and above, you can use ojdbc8.jar from [this page](http://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html).
163163

164164
* javax.json-1.0.4.jar. This is the JSR353 implementation, download it from [here](http://search.maven.org/remotecontent?filepath=org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar).
165165

166166
* orajsoda-version.jar. The SODA jar. Download the latest version [here](https://github.com/oracle/soda-for-java/releases).
167167

168-
Compile and run testSODA.java, making sure the necessary jars are in the classpath. For example, assuming you're in the directory where the jars are located, do:
168+
Compile and run testSODA.java, making sure the necessary jars are in the classpath. JDK 6 or above is required. For example, assuming you're in the directory where the jars are located, and you are using ojdbc7.jar, do:
169169

170170
javac -classpath "orajsoda.jar" testSODA.java
171-
java -classpath "orajsoda-version.jar:ojdbc6.jar:javax.json-1.0.4.jar:." testSODA
171+
java -classpath "orajsoda-version.jar:ojdbc7.jar:javax.json-1.0.4.jar:." testSODA
172172

173173
You should see the following output:
174174

175175
* Retrieving the first document by its key *
176176

177-
{ "name" : "Alex", "friends" : "50" }
177+
{ "name" : "Alex", "friends" : 50 }
178178

179179
* Retrieving documents representing users with at least 300 friends *
180180

181-
{ "name" : "Mia", "friends" : "300" }
182-
{ "name" : "Gloria", "friends" : "399" }
181+
{ "name" : "Mia", "friends" : 300 }
182+
{ "name" : "Gloria", "friends" : 399 }
183183

184184
This example illustrates two ways of retrieving documents from the collection: by using unique document keys, or by using QBEs. To find all users with at least 300 friends, the following QBE was used in the code above:
185185

json.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22

33
<!--
4-
Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2014, 2015, 2016, 2017 Oracle and/or its affiliates. All rights reserved.
55
66
DESCRIPTION
77
Common tasks & properties for JSON ANT scripts.
@@ -16,13 +16,10 @@
1616

1717
<property environment="env"/>
1818

19-
<!-- Compiles with JDK6 to be compatible with an 12.1.0.2 RDBMS deployment -->
20-
<property name="javac.java.home" value="${env.JAVA6HOME}"/>
21-
<property name="ojdbc6.jar" value="${env.SODA_OJDBC6_JAR}"/>
22-
<property name="jsr353.jar" value="${env.SODA_JSR353_JAR}"/>
19+
<property name="javac.java.home" value="${env.JAVA_HOME}"/>
2320

2421
<property name="xdk.lib.dir" value="${xdk.json.src.dir}/lib"/>
25-
<property name="jar.orajsoda" value="${xdk.lib.dir}/orajsoda-1.0.4.jar"/>
22+
<property name="jar.orajsoda" value="${xdk.lib.dir}/orajsoda-1.0.5.jar"/>
2623

2724
<!--
2825
Generic project layout
@@ -36,8 +33,6 @@
3633
<property name="resources.dir" value="${basedir}/resources"/>
3734

3835
<path id="xdk.json.lib.import">
39-
<pathelement location="${ojdbc6.jar}"/>
40-
<pathelement location="${jsr353.jar}"/>
4136
<fileset dir="${xdk.lib.dir}" includes="*.jar"/>
4237
</path>
4338

resources/oracle/json/parser/Messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
and "text_value".
6767
5062=Items in the value array for {0} cannot be boolean or null.
6868
5063={0} must only be used at the top level, either by itself or under $and.
69+
5064=At most one $id clause allowed.
6970
#
7071
# SQL phase "run-time" errors (5500 to 5999 error code range)
7172
#

resources/oracle/json/parser/Messages_ar.properties

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
33
#
44

55
# Messages used in query-by-example exceptions
@@ -61,7 +61,17 @@
6161
5051=\u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0645 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0639\u0648\u0627\u0645\u0644 \u0627\u0644\u0645\u0633\u0627\u062D\u064A\u0629 \u0641\u064A \u0627\u0644\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0623\u0639\u0644\u0649 \u0641\u0642\u0637.
6262
5052=\u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0645 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 $contains \u0641\u064A \u0627\u0644\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0623\u0639\u0644\u0649 \u0641\u0642\u0637.
6363
5053=\u0644\u0627 \u064A\u0645\u0643\u0646 \u0644\u0644\u0639\u0627\u0645\u0644 {0} \u0639\u0632\u0644 \u0639\u0627\u0645\u0644 {1}.
64-
64+
5054=\u064A\u062A\u0639\u064A\u0646 \u062A\u062D\u062F\u064A\u062F \u0645\u0633\u0627\u0631 \u0641\u064A \u062D\u0642\u0644 $orderby.
65+
5055=\u0644\u0627 \u064A\u0645\u0643\u0646 \u0623\u0646 \u064A\u0634\u062A\u0645\u0644 \u0627\u0644\u062D\u0642\u0644 $orderby \u0639\u0644\u0649 \u0627\u0644\u062E\u0627\u0635\u064A\u0629 "{0}".
66+
5056=\u0644\u0627 \u064A\u0645\u0643\u0646 \u0623\u0646 \u062A\u0634\u062A\u0645\u0644 \u0627\u0644\u062E\u0627\u0635\u064A\u0629 $orderby "{0}" \u0639\u0644\u0649 \u0627\u0644\u0642\u064A\u0645\u0629 "{1}".
67+
5057=\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u062E\u0627\u0635\u064A\u0629 $orderby "{0}" \u0645\u0646 \u0627\u0644\u0646\u0648\u0639 {1}.
68+
5058=\u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u0639\u064A\u064A\u0646 \u0639\u0644\u0627\u0645\u062A\u064A \u0627\u0644\u0641\u0647\u0631\u0633 "Scalar required" (\u0645\u0637\u0644\u0648\u0628 \u0642\u064A\u0645\u0629 \u0623\u062D\u0627\u062F\u064A\u0629) \u0648 "lax" (\u0645\u0631\u0646) \u0643\u0644\u062A\u064A\u0647\u0645\u0627 \u0625\u0644\u0649 true.
69+
5059=\u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u0639\u064A\u064A\u0646 "{0}" \u0645\u0631\u062A\u0628\u0637\u064B\u0627 \u0645\u0639 "{1}".
70+
5060="dataguide" \u0644\u0627 \u064A\u0645\u0643\u0646 \u0623\u0646 \u064A\u0643\u0648\u0646 "{0}". \u0627\u0644\u0642\u064A\u0645\u062A\u0627\u0646 \u0627\u0644\u0635\u0627\u0644\u062D\u062A\u0627\u0646 \u0647\u0645\u0627 "on" \u0623\u0648 "off".
71+
5061="search_on" \u0644\u0627 \u064A\u0645\u0643\u0646 \u0623\u0646 \u064A\u0643\u0648\u0646 "{0}". \u0627\u0644\u0642\u064A\u0645 \u0627\u0644\u0635\u0627\u0644\u062D\u0629 \u0647\u064A "none" \u0648"text" \u0648"text_value".
72+
5062=\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0641\u064A \u0645\u0635\u0641\u0648\u0641\u0629 \u0642\u064A\u0645 {0} \u0645\u0646\u0637\u0642\u064A\u0629 \u0623\u0648 \u0641\u0627\u0631\u063A\u0629.
73+
5063=\u064A\u062C\u0628 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 {0} \u0641\u064A \u0627\u0644\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0623\u0639\u0644\u0649 \u0641\u0642\u0637\u060C \u0628\u0634\u0643\u0644 \u0645\u0646\u0641\u0631\u062F \u0623\u0648 \u0636\u0645\u0646 $and.
74+
5064=\u0645\u0633\u0645\u0648\u062D \u0628\u0641\u0642\u0631\u0629 $id \u0641\u064A \u0627\u0644\u063A\u0627\u0644\u0628.
6575
#
6676
# SQL phase "run-time" errors (5500 to 5999 error code range)
6777
#

resources/oracle/json/parser/Messages_cs.properties

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
33
#
44

55
# Messages used in query-by-example exceptions
@@ -61,7 +61,17 @@
6161
5051=Prostorov\u00E9 oper\u00E1tory se mohou pou\u017E\u00EDvat pouze na nejvy\u0161\u0161\u00ED \u00FArovni.
6262
5052=Parametr $contains se m\u016F\u017Ee pou\u017E\u00EDvat pouze na nejvy\u0161\u0161\u00ED \u00FArovni.
6363
5053=Oper\u00E1tor {0} nem\u016F\u017Ee obalovat oper\u00E1tor {1}.
64-
64+
5054=Pole $orderby mus\u00ED obsahovat cestu.
65+
5055=Pole $orderby nesm\u00ED obsahovat vlastnost "{0}".
66+
5056=Vlastnost $orderby "{0}" nesm\u00ED m\u00EDt hodnotu "{1}".
67+
5057=Vlastnost $orderby "{0}" mus\u00ED m\u00EDt typ {1}.
68+
5058=P\u0159\u00EDznaky indexu "Scalar required" a "lax" nesm\u00ED b\u00FDt oba nastaveny na hodnotu True.
69+
5059="{0}" nelze nastavit sou\u010Dasn\u011B s "{1}".
70+
5060="dataguide" nesm\u00ED b\u00FDt "{0}". Platn\u00E9 hodnoty jsou "on" nebo "off".
71+
5061="search_on" nesm\u00ED b\u00FDt "{0}". Platn\u00E9 hodnoty jsou "none", "text" a "text_value".
72+
5062=Polo\u017Eky v poli hodnot pro {0} nesm\u00ED m\u00EDt booleovskou hodnotu nebo hodnotu null.
73+
5063=Oper\u00E1tor {0} lze pou\u017E\u00EDt pouze na nejvy\u0161\u0161\u00ED \u00FArovni, a to bu\u010F samotn\u00FD, nebo pod oper\u00E1torem $and.
74+
5064=Povolena nanejv\u00FD\u0161 jedna klauzule $id.
6575
#
6676
# SQL phase "run-time" errors (5500 to 5999 error code range)
6777
#

resources/oracle/json/parser/Messages_da.properties

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
33
#
44

55
# Messages used in query-by-example exceptions
@@ -61,7 +61,17 @@
6161
5051=Spatialoperatorer m\u00E5 kun bruges p\u00E5 \u00F8verste niveau.
6262
5052=$contains m\u00E5 kun bruges p\u00E5 \u00F8verste niveau.
6363
5053=Operatoren {0} kan ikke omslutte operatoren {1}.
64-
64+
5054=Et $orderby-felt skal angive en sti.
65+
5055=Et $orderby-felt kan ikke have egenskaben "{0}".
66+
5056=$orderby-egenskaben "{0}" kan ikke have v\u00E6rdien "{1}".
67+
5057=$orderby-egenskaben "{0}" skal v\u00E6re af typen {1}.
68+
5058=Indeksflagene "Skalar er p\u00E5kr\u00E6vet" og "lax" kan ikke begge v\u00E6re sat til sand.
69+
5059="{0}" kan ikke v\u00E6re sat sammen med "{1}".
70+
5060="dataguide" kan ikke v\u00E6re "{0}". Gyldige v\u00E6rdier er "on" eller "off".
71+
5061="search_on" kan ikke v\u00E6re "{0}". Gyldige v\u00E6rdier er "none", "text" og "text_value".
72+
5062=Elementer i v\u00E6rdiarray for {0} kan ikke v\u00E6re booleske eller NULL.
73+
5063={0} m\u00E5 kun bruges p\u00E5 \u00F8verste niveau, enten alene eller under $and.
74+
5064=H\u00F8jst \u00E9n $id-klausul er tilladt.
6575
#
6676
# SQL phase "run-time" errors (5500 to 5999 error code range)
6777
#

0 commit comments

Comments
 (0)