File tree Expand file tree Collapse file tree 8 files changed +18
-18
lines changed Expand file tree Collapse file tree 8 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 19
19
* connect.js
20
20
*
21
21
* DESCRIPTION
22
- * Tests a basic connection to the database.
22
+ * Tests a basic connection to the database.
23
23
* See dbconfig.js for information on connectString formats.
24
- *
24
+ *
25
25
*****************************************************************************/
26
26
27
27
var oracledb = require ( 'oracledb' ) ;
Original file line number Diff line number Diff line change 22
22
* Holds the credentials used by node-oracledb examples to connect
23
23
* to the database. Production applications should consider using
24
24
* External Authentication to avoid hard coded credentials.
25
- *
25
+ *
26
26
* Applications can set the connectString value to an Easy Connect
27
27
* string, or a Net Service Name from a tnsnames.ora file or
28
28
* external naming service, or it can be the name of a local Oracle
29
29
* database instance.
30
- *
30
+ *
31
31
* If node-oracledb is linked with Instant Client, then an Easy
32
32
* Connect string is generally appropriate. The syntax is:
33
- *
33
+ *
34
34
* [//]host_name[:port][/service_name][:server_type][/instance_name]
35
- *
35
+ *
36
36
* Commonly just the host_name and service_name are needed
37
37
* e.g. "localhost/orcl" or "localhost/XE"
38
38
*
50
50
* Wallet so passwords do not need to be hard coded into the
51
51
* application. The user and password properties for connecting or
52
52
* creating a pool should not be set when externalAuth is true.
53
- *
53
+ *
54
54
* TROUBLESHOOTING
55
55
* Errors like:
56
56
* ORA-12541: TNS:no listener
Original file line number Diff line number Diff line change 20
20
*
21
21
* DESCRIPTION
22
22
* Displays PL/SQL DBMS_OUTPUT in node-oracledb, fetching one record at a time.
23
- *
23
+ *
24
24
*****************************************************************************/
25
25
26
26
var async = require ( 'async' ) ;
Original file line number Diff line number Diff line change 19
19
* fetchinfo.js
20
20
*
21
21
* DESCRIPTION
22
- * Show how numbers and dates can be returned as strings using fetchAsString
22
+ * Show how numbers and dates can be returned as strings using fetchAsString
23
23
* and fetchInfo
24
24
* Uses Oracle's sample HR schema.
25
25
*
Original file line number Diff line number Diff line change @@ -70,14 +70,14 @@ oracledb.getConnection(
70
70
{
71
71
if ( err ) { console . error ( err . message ) ; return ; }
72
72
console . log ( "Rows updated: " + result . rowsAffected ) ; // 2
73
-
73
+
74
74
connection . execute (
75
75
"DROP TABLE test" ,
76
76
function ( err )
77
77
{
78
78
if ( err ) { console . error ( err . message ) ; return ; }
79
79
console . log ( "Table dropped" ) ;
80
-
80
+
81
81
connection . release (
82
82
function ( err )
83
83
{
Original file line number Diff line number Diff line change 21
21
* DESCRIPTION
22
22
* Show calling a PL/SQL procedure and binding parameters in various ways
23
23
* Use demo.sql to create the required procedure or do:
24
- *
24
+ *
25
25
* CREATE OR REPLACE PROCEDURE testproc (p_in IN VARCHAR2, p_inout IN OUT VARCHAR2, p_out OUT NUMBER)
26
26
* AS
27
27
* BEGIN
@@ -56,6 +56,6 @@ oracledb.getConnection(
56
56
function ( err , result )
57
57
{
58
58
if ( err ) { console . error ( err . message ) ; return ; }
59
- console . log ( result . outBinds ) ;
59
+ console . log ( result . outBinds ) ;
60
60
} ) ;
61
61
} ) ;
Original file line number Diff line number Diff line change 22
22
* Shows using a Result Set to fetch rows from a REF CURSOR
23
23
* Uses Oracle's sample HR schema.
24
24
* Use demo.sql to create the required procedure or do:
25
- *
25
+ *
26
26
* CREATE OR REPLACE PROCEDURE get_emp_rs (p_sal IN NUMBER, p_recordset OUT SYS_REFCURSOR)
27
27
* AS
28
28
* BEGIN
@@ -59,7 +59,7 @@ oracledb.getConnection(
59
59
{
60
60
if ( err ) { console . error ( err . message ) ; return ; }
61
61
var bindvars = {
62
- sal : 12000 ,
62
+ sal : 12000 ,
63
63
cursor : { type : oracledb . CURSOR , dir : oracledb . BIND_OUT }
64
64
} ;
65
65
connection . execute (
@@ -80,8 +80,8 @@ oracledb.getConnection(
80
80
function fetchRowsFromRS ( connection , resultSet , numRows )
81
81
{
82
82
resultSet . getRows ( // get numRows rows
83
- numRows ,
84
- function ( err , rows )
83
+ numRows ,
84
+ function ( err , rows )
85
85
{
86
86
if ( err ) {
87
87
console . log ( err ) ;
Original file line number Diff line number Diff line change 22
22
* Executes a query from a JSON table using CLOB storage.
23
23
* Requires Oracle Database 12.1.0.2, which has extensive JSON datatype support.
24
24
* See http://docs.oracle.com/database/121/ADXDB/json.htm#CACGCBEG
25
- *
25
+ *
26
26
* Use demo.sql to create the required table.
27
27
*
28
28
*****************************************************************************/
You can’t perform that action at this time.
0 commit comments