@@ -64,7 +64,7 @@ describe('4. binding.js', function() {
64
64
it ( '4.1.1 VARCHAR2 binding, Object & Array formats' , function ( done ) {
65
65
async . series ( [
66
66
function ( callback ) {
67
- var proc = "CREATE OR REPLACE PROCEDURE nodb_testproc (p_out OUT VARCHAR2) \
67
+ var proc = "CREATE OR REPLACE PROCEDURE nodb_bindproc1 (p_out OUT VARCHAR2) \
68
68
AS \
69
69
BEGIN \
70
70
p_out := 'abcdef'; \
@@ -80,7 +80,7 @@ describe('4. binding.js', function() {
80
80
} ,
81
81
function ( callback ) {
82
82
connection . execute (
83
- "BEGIN nodb_testproc (:o); END;" ,
83
+ "BEGIN nodb_bindproc1 (:o); END;" ,
84
84
{
85
85
o : { type : oracledb . STRING , dir : oracledb . BIND_OUT }
86
86
} ,
@@ -94,7 +94,7 @@ describe('4. binding.js', function() {
94
94
} ,
95
95
function ( callback ) {
96
96
connection . execute (
97
- "BEGIN nodb_testproc (:o); END;" ,
97
+ "BEGIN nodb_bindproc1 (:o); END;" ,
98
98
[
99
99
{ type : oracledb . STRING , dir : oracledb . BIND_OUT }
100
100
] ,
@@ -108,7 +108,7 @@ describe('4. binding.js', function() {
108
108
} ,
109
109
function ( callback ) {
110
110
connection . execute (
111
- "DROP PROCEDURE nodb_testproc " ,
111
+ "DROP PROCEDURE nodb_bindproc1 " ,
112
112
function ( err ) {
113
113
should . not . exist ( err ) ;
114
114
callback ( ) ;
@@ -121,7 +121,7 @@ describe('4. binding.js', function() {
121
121
it ( '4.1.2 NUMBER binding, Object & Array formats' , function ( done ) {
122
122
async . series ( [
123
123
function ( callback ) {
124
- var proc = "CREATE OR REPLACE PROCEDURE nodb_testproc (p_out OUT NUMBER) \
124
+ var proc = "CREATE OR REPLACE PROCEDURE nodb_bindproc2 (p_out OUT NUMBER) \
125
125
AS \
126
126
BEGIN \
127
127
p_out := 10010; \
@@ -137,7 +137,7 @@ describe('4. binding.js', function() {
137
137
} ,
138
138
function ( callback ) {
139
139
connection . execute (
140
- "BEGIN nodb_testproc (:o); END;" ,
140
+ "BEGIN nodb_bindproc2 (:o); END;" ,
141
141
{
142
142
o : { type : oracledb . NUMBER , dir : oracledb . BIND_OUT }
143
143
} ,
@@ -151,7 +151,7 @@ describe('4. binding.js', function() {
151
151
} ,
152
152
function ( callback ) {
153
153
connection . execute (
154
- "BEGIN nodb_testproc (:o); END;" ,
154
+ "BEGIN nodb_bindproc2 (:o); END;" ,
155
155
[
156
156
{ type : oracledb . NUMBER , dir : oracledb . BIND_OUT }
157
157
] ,
@@ -165,7 +165,7 @@ describe('4. binding.js', function() {
165
165
} ,
166
166
function ( callback ) {
167
167
connection . execute (
168
- "DROP PROCEDURE nodb_testproc " ,
168
+ "DROP PROCEDURE nodb_bindproc2 " ,
169
169
function ( err ) {
170
170
should . not . exist ( err ) ;
171
171
callback ( ) ;
@@ -178,7 +178,7 @@ describe('4. binding.js', function() {
178
178
it ( '4.1.3 Multiple binding values, Object & Array formats' , function ( done ) {
179
179
async . series ( [
180
180
function ( callback ) {
181
- var proc = "CREATE OR REPLACE PROCEDURE nodb_testproc (p_in IN VARCHAR2, p_inout IN OUT VARCHAR2, p_out OUT NUMBER) \
181
+ var proc = "CREATE OR REPLACE PROCEDURE nodb_bindproc3 (p_in IN VARCHAR2, p_inout IN OUT VARCHAR2, p_out OUT NUMBER) \
182
182
AS \
183
183
BEGIN \
184
184
p_inout := p_in || ' ' || p_inout; \
@@ -195,7 +195,7 @@ describe('4. binding.js', function() {
195
195
} ,
196
196
function ( callback ) {
197
197
connection . execute (
198
- "BEGIN nodb_testproc (:i, :io, :o); END;" ,
198
+ "BEGIN nodb_bindproc3 (:i, :io, :o); END;" ,
199
199
{
200
200
i : 'Alan' , // bind type is determined from the data type
201
201
io : { val : 'Turing' , dir : oracledb . BIND_INOUT } ,
@@ -211,7 +211,7 @@ describe('4. binding.js', function() {
211
211
} ,
212
212
function ( callback ) {
213
213
connection . execute (
214
- "BEGIN nodb_testproc (:i, :io, :o); END;" ,
214
+ "BEGIN nodb_bindproc3 (:i, :io, :o); END;" ,
215
215
[
216
216
'Alan' , // bind type is determined from the data type
217
217
{ val : 'Turing' , dir : oracledb . BIND_INOUT } ,
@@ -227,7 +227,7 @@ describe('4. binding.js', function() {
227
227
} ,
228
228
function ( callback ) {
229
229
connection . execute (
230
- "DROP PROCEDURE nodb_testproc " ,
230
+ "DROP PROCEDURE nodb_bindproc3 " ,
231
231
function ( err ) {
232
232
should . not . exist ( err ) ;
233
233
callback ( ) ;
@@ -240,7 +240,7 @@ describe('4. binding.js', function() {
240
240
it ( '4.1.4 Multiple binding values, Change binding order' , function ( done ) {
241
241
async . series ( [
242
242
function ( callback ) {
243
- var proc = "CREATE OR REPLACE PROCEDURE nodb_testproc (p_inout IN OUT VARCHAR2, p_out OUT NUMBER, p_in IN VARCHAR2) \
243
+ var proc = "CREATE OR REPLACE PROCEDURE nodb_bindproc4 (p_inout IN OUT VARCHAR2, p_out OUT NUMBER, p_in IN VARCHAR2) \
244
244
AS \
245
245
BEGIN \
246
246
p_inout := p_in || ' ' || p_inout; \
@@ -257,7 +257,7 @@ describe('4. binding.js', function() {
257
257
} ,
258
258
function ( callback ) {
259
259
connection . execute (
260
- "BEGIN nodb_testproc (:io, :o, :i); END;" ,
260
+ "BEGIN nodb_bindproc4 (:io, :o, :i); END;" ,
261
261
{
262
262
i : 'Alan' , // bind type is determined from the data type
263
263
io : { val : 'Turing' , dir : oracledb . BIND_INOUT } ,
@@ -273,7 +273,7 @@ describe('4. binding.js', function() {
273
273
} ,
274
274
function ( callback ) {
275
275
connection . execute (
276
- "BEGIN nodb_testproc (:io, :o, :i); END;" ,
276
+ "BEGIN nodb_bindproc4 (:io, :o, :i); END;" ,
277
277
[
278
278
{ val : 'Turing' , dir : oracledb . BIND_INOUT } ,
279
279
{ type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ,
@@ -289,7 +289,7 @@ describe('4. binding.js', function() {
289
289
} ,
290
290
function ( callback ) {
291
291
connection . execute (
292
- "DROP PROCEDURE nodb_testproc " ,
292
+ "DROP PROCEDURE nodb_bindproc4 " ,
293
293
function ( err ) {
294
294
should . not . exist ( err ) ;
295
295
callback ( ) ;
@@ -329,19 +329,19 @@ describe('4. binding.js', function() {
329
329
e_table_missing EXCEPTION; \
330
330
PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \
331
331
BEGIN \
332
- EXECUTE IMMEDIATE ('DROP TABLE nodb_binding '); \
332
+ EXECUTE IMMEDIATE ('DROP TABLE nodb_binding1 '); \
333
333
EXCEPTION \
334
334
WHEN e_table_missing \
335
335
THEN NULL; \
336
336
END; \
337
337
EXECUTE IMMEDIATE (' \
338
- CREATE TABLE nodb_binding ( \
338
+ CREATE TABLE nodb_binding1 ( \
339
339
id NUMBER(4), \
340
340
name VARCHAR2(32) \
341
341
) \
342
342
'); \
343
343
END; " ;
344
- var insert = 'insert into nodb_binding (id, name) values (:0, :1) returning id into :2' ;
344
+ var insert = 'insert into nodb_binding1 (id, name) values (:0, :1) returning id into :2' ;
345
345
var param1 = [ 1 , 'changjie' , { type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ] ;
346
346
var param2 = [ 2 , 'changjie' , { ignored_name : { type : oracledb . NUMBER , dir : oracledb . BIND_OUT } } ] ;
347
347
var options = { autoCommit : true , outFormat : oracledb . OBJECT } ;
@@ -363,7 +363,7 @@ describe('4. binding.js', function() {
363
363
afterEach ( function ( done ) {
364
364
connection . should . be . ok ( ) ;
365
365
connection . execute (
366
- "DROP TABLE nodb_binding " ,
366
+ "DROP TABLE nodb_binding1 " ,
367
367
function ( err ) {
368
368
should . not . exist ( err ) ;
369
369
connection . release ( function ( err ) {
@@ -385,7 +385,7 @@ describe('4. binding.js', function() {
385
385
result . outBinds [ 0 ] . should . eql ( [ 1 ] ) ;
386
386
// console.log(result);
387
387
connection . execute (
388
- "SELECT * FROM nodb_binding ORDER BY id" ,
388
+ "SELECT * FROM nodb_binding1 ORDER BY id" ,
389
389
[ ] ,
390
390
options ,
391
391
function ( err , result ) {
@@ -410,7 +410,7 @@ describe('4. binding.js', function() {
410
410
( err . message ) . should . startWith ( 'NJS-044' ) ;
411
411
// NJS-044: named JSON object is not expected in this context
412
412
connection . execute (
413
- "SELECT * FROM nodb_binding ORDER BY id" ,
413
+ "SELECT * FROM nodb_binding1 ORDER BY id" ,
414
414
[ ] ,
415
415
options ,
416
416
function ( err , result ) {
@@ -433,13 +433,13 @@ describe('4. binding.js', function() {
433
433
e_table_missing EXCEPTION; \
434
434
PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \
435
435
BEGIN \
436
- EXECUTE IMMEDIATE ('DROP TABLE nodb_binding '); \
436
+ EXECUTE IMMEDIATE ('DROP TABLE nodb_binding2 '); \
437
437
EXCEPTION \
438
438
WHEN e_table_missing \
439
439
THEN NULL; \
440
440
END; \
441
441
EXECUTE IMMEDIATE (' \
442
- CREATE TABLE nodb_binding ( \
442
+ CREATE TABLE nodb_binding2 ( \
443
443
num NUMBER(4), \
444
444
str VARCHAR2(32), \
445
445
dt DATE \
@@ -464,7 +464,7 @@ describe('4. binding.js', function() {
464
464
afterEach ( function ( done ) {
465
465
connection . should . be . ok ( ) ;
466
466
connection . execute (
467
- "DROP TABLE nodb_binding " ,
467
+ "DROP TABLE nodb_binding2 " ,
468
468
function ( err ) {
469
469
should . not . exist ( err ) ;
470
470
connection . release ( function ( err ) {
@@ -475,8 +475,8 @@ describe('4. binding.js', function() {
475
475
) ;
476
476
} )
477
477
478
- var insert1 = 'insert into nodb_binding (num, str, dt) values (:0, :1, :2)' ;
479
- var insert2 = 'insert into nodb_binding (num, str, dt) values (:0, :1, :2) returning num into :3' ;
478
+ var insert1 = 'insert into nodb_binding2 (num, str, dt) values (:0, :1, :2)' ;
479
+ var insert2 = 'insert into nodb_binding2 (num, str, dt) values (:0, :1, :2) returning num into :3' ;
480
480
var param1 = { 0 : 123 , 1 : 'str' , 2 : new Date ( ) } ;
481
481
var param2 = { 0 : 123 , 1 : 'str' , 2 : new Date ( ) , 3 : { type : oracledb . NUMBER , dir : oracledb . BIND_OUT } } ;
482
482
var param3 = [ 123 , 'str' , new Date ( ) ] ;
@@ -493,7 +493,7 @@ describe('4. binding.js', function() {
493
493
should . not . exist ( err ) ;
494
494
result . rowsAffected . should . be . exactly ( 1 ) ;
495
495
connection . execute (
496
- "SELECT * FROM nodb_binding ORDER BY num" ,
496
+ "SELECT * FROM nodb_binding2 ORDER BY num" ,
497
497
[ ] ,
498
498
options ,
499
499
function ( err , result ) {
@@ -517,7 +517,7 @@ describe('4. binding.js', function() {
517
517
//console.log(result);
518
518
result . outBinds . should . eql ( { '3' : [ 123 ] } ) ;
519
519
connection . execute (
520
- "SELECT * FROM nodb_binding ORDER BY num" ,
520
+ "SELECT * FROM nodb_binding2 ORDER BY num" ,
521
521
[ ] ,
522
522
options ,
523
523
function ( err , result ) {
@@ -540,7 +540,7 @@ describe('4. binding.js', function() {
540
540
result . rowsAffected . should . be . exactly ( 1 ) ;
541
541
// console.log(result);
542
542
connection . execute (
543
- "SELECT * FROM nodb_binding ORDER BY num" ,
543
+ "SELECT * FROM nodb_binding2 ORDER BY num" ,
544
544
[ ] ,
545
545
options ,
546
546
function ( err , result ) {
@@ -564,7 +564,7 @@ describe('4. binding.js', function() {
564
564
// console.log(result);
565
565
result . outBinds [ 0 ] . should . eql ( [ 123 ] ) ;
566
566
connection . execute (
567
- "SELECT * FROM nodb_binding ORDER BY num" ,
567
+ "SELECT * FROM nodb_binding2 ORDER BY num" ,
568
568
[ ] ,
569
569
options ,
570
570
function ( err , result ) {
@@ -600,7 +600,7 @@ describe('4. binding.js', function() {
600
600
it ( '4.4.1 outBind & maxSize restriction' , function ( done ) {
601
601
async . series ( [
602
602
function ( callback ) {
603
- var proc = "CREATE OR REPLACE PROCEDURE nodb_testproc (p_out OUT VARCHAR2) \
603
+ var proc = "CREATE OR REPLACE PROCEDURE nodb_bindproc4 (p_out OUT VARCHAR2) \
604
604
AS \
605
605
BEGIN \
606
606
p_out := 'ABCDEF GHIJK LMNOP QRSTU'; \
@@ -616,7 +616,7 @@ describe('4. binding.js', function() {
616
616
} ,
617
617
function ( callback ) {
618
618
connection . execute (
619
- "BEGIN nodb_testproc (:o); END;" ,
619
+ "BEGIN nodb_bindproc4 (:o); END;" ,
620
620
{
621
621
o : { type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize :2 }
622
622
} ,
@@ -631,7 +631,7 @@ describe('4. binding.js', function() {
631
631
} ,
632
632
function ( callback ) {
633
633
connection . execute (
634
- "BEGIN nodb_testproc (:o); END;" ,
634
+ "BEGIN nodb_bindproc4 (:o); END;" ,
635
635
[
636
636
{ type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize :22 }
637
637
] ,
@@ -646,7 +646,7 @@ describe('4. binding.js', function() {
646
646
} ,
647
647
function ( callback ) {
648
648
connection . execute (
649
- "DROP PROCEDURE nodb_testproc " ,
649
+ "DROP PROCEDURE nodb_bindproc4 " ,
650
650
function ( err ) {
651
651
should . not . exist ( err ) ;
652
652
callback ( ) ;
0 commit comments