You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ This repository stores a variety of examples demonstrating how to use the Oracle
7
7
|[quickstart](./quickstart)| Classic QuickStart and Scaleout samples. See the README file in that directory for more information. |
8
8
|[cloud](./cloud)| Scripts to simplify deployment of TimesTen Scaleout in Oracle Cloud. See the README file in that directory for more information. |
9
9
|[languages](./languages)| Open Source language support samples (Python and Node.js) |
10
-
10
+
11
+
## Supported TimesTen Releases
12
+
These samples require a _minimum_ of **TimesTen 18.1.4.1.0** but our recommendation is to always use the most recent release available for your platform.
11
13
12
14
## More information
13
15
You can find more information about the Oracle TimesTen In-Memory Database on our [Product Portal](https://www.oracle.com/database/technologies/related/timesten.html)
Linux 64-bit | 12.7.0 |4.0.1 | 18.1.3.1.0+ | 18.1.3.1.0+
13
-
macOS | 12.7.0 |4.0.1| 18.1.3.1.0+ | N/A
14
-
MS Windows 64-bit | 12.7.0 | 4.0.1 | 18.1.3.1.0+ | N/A
12
+
Linux 64-bit | 12.7.0 |4.0.1+ | 18.1.4.1.0+ | 18.1.4.1.0+
13
+
macOS | 12.7.0 |4.0.1+ | 18.1.4.1.0+ | N/A
14
+
MS Windows 64-bit | 12.7.0 | 4.0.1+ | 18.1.4.1.0+ | N/A
15
15
16
-
**NOTE**: Access to TimesTen Databases on any supported TimesTen server platforms can be achieved using the TimesTen client driver from any of the platforms listed above. For more information on supported TimesTen platforms, see [TimesTen Release Notes](https://docs.oracle.com/database/timesten-18.1/TTREL/toc.htm).
16
+
**NOTE**: Access to TimesTen Databases on any supported TimesTen server platforms can be achieved using the TimesTen client driver from any of the platforms listed above. For more information on supported TimesTen platforms, see [TimesTen Release Notes](https://www.oracle.com/a/tech/docs/readme.html
17
+
).
17
18
18
19
19
20
## PRE-REQUISITES
20
-
21
+
21
22
1. Node.js language is installed.
22
23
2. The node-oracledb driver is installed.
23
24
3. A TimesTen database is created and data source is setup to access that database.
@@ -26,14 +27,14 @@ MS Windows 64-bit | 12.7.0 | 4.0.1 | 18.1.3.1.0+ | N/A
26
27
For more information on setup, see [TimesTen In-Memory Database Open Source Languages Support Guide](https://docs.oracle.com/database/timesten-18.1/TTOSL/toc.htm).
27
28
28
29
## Known Problems and Limitations
29
-
* REF CURSORs are currently not supported.
30
-
*Using the NVARCHAR/NCHAR data types for input parameters in a PL/SQL procedure is currently not supported.
31
-
*Large objects (LOBs) are currently not supported.
30
+
31
+
* NVARCHAR/NCHAR data types in a Node.js application are encoded as UTF-16, the [same difference between Oracle and TimesTen](https://docs.oracle.com/database/timesten-18.1/TTCAC/oracle_tt.htm#TTCAC353) as noted in the TimesTen Documentation.
32
+
*Fetching a clob inside a stored procedure through a Node.js application can result in error ORA-00600.
32
33
* DML statements with RETURN INTO are currently not supported.
33
34
* The value returned for the sub-second field of a PL/SQL output parameter of type Timestamp may be incorrect.
34
35
35
-
36
-
36
+
37
+
37
38
## Node.js sample programs
38
39
### Download Samples
39
40
@@ -68,7 +69,7 @@ Table has been dropped
68
69
Connection has been released
69
70
```
70
71
71
-
72
+
72
73
### sql.js
73
74
The sql sample program connects to a TimesTen database and performs the following operations:
74
75
@@ -123,7 +124,7 @@ The queriesAndPlsql sample program connects to a TimesTen database and performs
123
124
* Calls a PL/SQL procedure to update a row
124
125
* Calls a PL/SQL procedure to delete a row
125
126
* Drops the table
126
-
* Disconnects from the database
127
+
* Disconnects from the database
127
128
128
129
Example:
129
130
@@ -142,8 +143,41 @@ Delete a row using an anonymous block ...
142
143
Connection has been released
143
144
144
145
```
146
+
### lobs.js
147
+
148
+
The lobs sample program connects to a TimesTen database and performs a number of database operations against a CLOB data type table:
149
+
150
+
151
+
* Creates a table named "CLOB"
152
+
* Populates the table
153
+
* Performs Select/fetching row
154
+
* Disconnects from the database
155
+
156
+
Example:
157
+
158
+
```
159
+
% node lobs.js -u username -p password
160
+
> Connecting
161
+
> Creating table with CLOB column
162
+
> Reading file
163
+
> Populating CLOB from file
164
+
> Querying CLOB column
165
+
> Reading CLOB
166
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce facilisis lacinia mauris et sodales. Ut non ligula eget lorem elementum maximus. Fusce pretium, felis a ultrices sodales, ligula augue ullamcorper eros, nec accumsan risus diam id justo. Mauris sed dictum nunc, vitae vehicula felis. Praesent et sodales odio. Nunc pulvinar ipsum ac erat iaculis efficitur. Nunc in aliquet est. Donec porta est est, nec iaculis leo lacinia at.
167
+
168
+
Nunc quis sodales sem. Nam felis dolor, cursus volutpat cursus vel, tempus nec mauris. Morbi bibendum urna nec leo commodo, id pellentesque nisi dictum. Vivamus venenatis velit nec orci imperdiet sagittis. Praesent fermentum, tortor sed tempus condimentum, lectus ipsum condimentum diam, at facilisis ligula purus vitae neque. Quisque erat quam, tristique at nisl sed, mattis feugiat diam. Curabitur ipsum nibh, mollis at venenatis nec, rutrum eu quam. Fusce augue tellus, porta ut dapibus at, ornare ut nisi. In imperdiet elit non dolor pharetra, quis bibendum odio aliquam. Quisque porttitor tempus augue eu consequat. Cras ac metus malesuada, pellentesque tortor in, porta leo.
169
+
170
+
Aliquam erat volutpat. Duis vitae quam id est maximus commodo. Morbi dolor lacus, bibendum ac nisl nec, fringilla eleifend nibh. Proin a tellus rhoncus, fermentum magna sed, imperdiet nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam sed consequat nisi. Morbi tortor ipsum, consequat a suscipit sed, ullamcorper ut massa.
171
+
172
+
Aliquam erat volutpat. Maecenas porttitor vel sapien non viverra. Sed dignissim luctus lectus at cursus. Sed condimentum at massa in egestas. In sed dui eget augue posuere finibus. Etiam pulvinar libero sit amet magna efficitur scelerisque. Sed pretium, turpis in condimentum blandit, risus tortor venenatis nisl, facilisis luctus mauris metus ut sem. Proin dapibus sit amet nunc a ultricies. Phasellus interdum lobortis leo sed fermentum. Phasellus ac aliquam erat. Duis at ultricies urna. Nulla at pharetra dolor, id sodales sapien. Ut auctor mi cras amet.
173
+
174
+
> Finished reading CLOB
175
+
> Connection released
176
+
177
+
178
+
```
179
+
145
180
146
181
147
-
148
-
## Documentation
149
-
You can find the online documentation for Oracle TimesTen In-Memory Database in the [Documentation Library](https://docs.oracle.com/database/timesten-18.1/). Online documenation for the node-oracledb driver can be found [here](https://oracle.github.io/node-oracledb/doc/api.html).
182
+
## Documentation
183
+
You can find the online documentation for Oracle TimesTen In-Memory Database in the [Documentation Library](https://docs.oracle.com/database/timesten-18.1/). Online documentation for the node-oracledb driver can be found [here](https://oracle.github.io/node-oracledb/doc/api.html).
Linux 64-bit | 3.7.5 | 7.2.2+ | 18.1.3.1.0+ | 18.1.3.1.0+
13
-
macOS | 3.7.5 |7.2.2+ | 18.1.3.1.0+ | N/A
14
-
MS Windows 64-bit | 3.7.5 |7.2.2+ | 18.1.3.1.0+| N/A
12
+
Linux 64-bit | 3.7.5 | 7.2.2+ | 18.1.4.1.0+ | 18.1.4.1.0+
13
+
macOS | 3.7.5 |7.2.2+ | 18.1.4.1.0+ | N/A
14
+
MS Windows 64-bit | 3.7.5 |7.2.2+ | 18.1.4.1.0+| N/A
15
15
16
16
**NOTE**: Access to TimesTen Databases on any supported TimesTen server platforms can be achieved using the TimesTen client driver from any of the platforms listed above. For more information on supported TimesTen platforms, see [TimesTen Release Notes](https://docs.oracle.com/database/timesten-18.1/TTREL/toc.htm).
17
17
18
-
**NOTE2**: Python version 2.7 also works against TimesTen databases even though it's not listed in the official tested chart above.
18
+
**NOTE2**: Python version 2.7 also works against TimesTen databases even though it's not listed in the chart above.
19
19
20
20
21
21
22
22
## PRE-REQUISITES
23
-
23
+
24
24
1. Python language is installed.
25
25
2. The cx_Oracle driver for Python is installed.
26
26
3. A TimesTen database is created and data source is setup to access that database.
@@ -29,14 +29,13 @@ MS Windows 64-bit | 3.7.5 |7.2.2+ | 18.1.3.1.0+| N/A
29
29
For more information on setup, see [TimesTen In-Memory Database Open Source Languages Support Guide](https://docs.oracle.com/database/timesten-18.1/TTOSL/toc.htm).
30
30
31
31
## Known Problems and Limitations
32
-
* REF CURSORs are currently not supported.
33
-
* Using the NVARCHAR/NCHAR data types for input parameters in a PL/SQL procedure is currently not supported.
34
-
* Large objects (LOBs) are currently not supported.
32
+
33
+
* NVARCHAR/NCHAR data types in a Python application are encoded as UTF-16, the [same difference between Oracle and TimesTen](https://docs.oracle.com/database/timesten-18.1/TTCAC/oracle_tt.htm#TTCAC353) as noted in the TimesTen Documentation.
35
34
* DML statements with RETURN INTO are currently not supported.
36
35
* The value returned for the sub-second field of a PL/SQL output parameter of type Timestamp may incorrect.
37
36
* When using the built-in procedures ttRepStateSave() & ttRepSubscriberWait() to set the replication state from a Python applications, the operation may take some time to take effect. Your application should wait much longer than the set waitTime specified in the call to ttRepSubscriberWait() to avoid timeouts.
38
-
39
-
37
+
38
+
40
39
## Python Sample Programs
41
40
### Download Samples
42
41
@@ -71,7 +70,7 @@ Table has been dropped
71
70
Connection has been released
72
71
73
72
```
74
-
73
+
75
74
### sql.py
76
75
77
76
This Python sample program connects to a TimesTen Database and performs the following operations:
@@ -128,7 +127,7 @@ This Python sample program connects to a TimesTen Database and performs a number
128
127
* Calls a PL/SQL procedure to update a row
129
128
* Calls a PL/SQL procedure to delete a row
130
129
* Drops the table
131
-
* Disconnects from the database
130
+
* Disconnects from the database
132
131
133
132
Example:
134
133
@@ -146,8 +145,41 @@ Delete a row using an anonymous block ...
146
145
Rows after delete = 99
147
146
Connection has been released
148
147
148
+
```
149
+
### lobs.py
150
+
151
+
The lobs sample program connects to a TimesTen database and performs a number of database operations against a CLOB data type table:
152
+
153
+
154
+
* Creates a table named "CLOB"
155
+
* Populates the table
156
+
* Performs Select/fetching row
157
+
* Disconnects from the database
158
+
159
+
Example:
160
+
161
+
```
162
+
% python3 lobs.py -u appuser -p appuser
163
+
> Connecting
164
+
> Creating table with CLOB column
165
+
> Reading file
166
+
> Populating CLOB from file
167
+
> Querying CLOB column
168
+
> Reading CLOB
169
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce facilisis lacinia mauris et sodales. Ut non ligula eget lorem elementum maximus. Fusce pretium, felis a ultrices sodales, ligula augue ullamcorper eros, nec accumsan risus diam id justo. Mauris sed dictum nunc, vitae vehicula felis. Praesent et sodales odio. Nunc pulvinar ipsum ac erat iaculis efficitur. Nunc in aliquet est. Donec porta est est, nec iaculis leo lacinia at.
170
+
171
+
Nunc quis sodales sem. Nam felis dolor, cursus volutpat cursus vel, tempus nec mauris. Morbi bibendum urna nec leo commodo, id pellentesque nisi dictum. Vivamus venenatis velit nec orci imperdiet sagittis. Praesent fermentum, tortor sed tempus condimentum, lectus ipsum condimentum diam, at facilisis ligula purus vitae neque. Quisque erat quam, tristique at nisl sed, mattis feugiat diam. Curabitur ipsum nibh, mollis at venenatis nec, rutrum eu quam. Fusce augue tellus, porta ut dapibus at, ornare ut nisi. In imperdiet elit non dolor pharetra, quis bibendum odio aliquam. Quisque porttitor tempus augue eu consequat. Cras ac metus malesuada, pellentesque tortor in, porta leo.
172
+
173
+
Aliquam erat volutpat. Duis vitae quam id est maximus commodo. Morbi dolor lacus, bibendum ac nisl nec, fringilla eleifend nibh. Proin a tellus rhoncus, fermentum magna sed, imperdiet nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam sed consequat nisi. Morbi tortor ipsum, consequat a suscipit sed, ullamcorper ut massa.
174
+
175
+
Aliquam erat volutpat. Maecenas porttitor vel sapien non viverra. Sed dignissim luctus lectus at cursus. Sed condimentum at massa in egestas. In sed dui eget augue posuere finibus. Etiam pulvinar libero sit amet magna efficitur scelerisque. Sed pretium, turpis in condimentum blandit, risus tortor venenatis nisl, facilisis luctus mauris metus ut sem. Proin dapibus sit amet nunc a ultricies. Phasellus interdum lobortis leo sed fermentum. Phasellus ac aliquam erat. Duis at ultricies urna. Nulla at pharetra dolor, id sodales sapien. Ut auctor mi cras amet.
176
+
177
+
> Finished reading CLOB
178
+
> Connection released
179
+
180
+
149
181
```
150
182
151
183
152
-
## Documentation
153
-
You can find the online documentation for Oracle TimesTen In-Memory Database in the [Documentation Library](https://docs.oracle.com/database/timesten-18.1/). Online documenation for the cx_Oracle driver can be found [here](https://cx-oracle.readthedocs.io/en/latest/).
184
+
## Documentation
185
+
You can find the online documentation for Oracle TimesTen In-Memory Database in the [Documentation Library](https://docs.oracle.com/database/timesten-18.1/). Online documenation for the cx_Oracle driver can be found [here](https://cx-oracle.readthedocs.io/en/latest/).
0 commit comments