Update tests

This commit is contained in:
Christopher Jones 2017-03-16 15:17:29 +11:00
parent dc5301ff80
commit 5b9be5e197
6 changed files with 3177 additions and 2517 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
* See LICENSE.md for relevant licenses.
*
* NAME
* 76. fetchClobAsString.js
* 78. fetchClobAsString.js
*
* DESCRIPTION
* Testing Oracle data type support - CLOB.
@ -40,7 +40,7 @@ var async = require('async');
var should = require('should');
var dbConfig = require('./dbconfig.js');
describe('76. fetchClobAsString.js', function() {
describe('78. fetchClobAsString.js', function() {
this.timeout(100000);
var connection = null;
@ -155,7 +155,7 @@ describe('76. fetchClobAsString.js', function() {
return str;
};
describe('76.1 fetch CLOB columns by setting oracledb.fetchAsString', function() {
describe('78.1 fetch CLOB columns by setting oracledb.fetchAsString', function() {
before('create Table and populate', function(done) {
connection.execute(
@ -188,7 +188,7 @@ describe('76. fetchClobAsString.js', function() {
done();
}); // afterEach
it('76.1.1 works with NULL value', function(done) {
it('78.1.1 works with NULL value', function(done) {
var id = 1;
var content = null;
@ -208,11 +208,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.1
}); // 78.1.1
it('76.1.2 works with small CLOB data', function(done) {
it('78.1.2 works with small CLOB data', function(done) {
var id = 2;
var specialStr = '76.1.2';
var specialStr = '78.1.2';
var contentLength = 26;
var content = getRandomString(contentLength, specialStr);
@ -236,15 +236,15 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.2
}); // 78.1.2
it('76.1.3 fetch multiple CLOB columns as String', function(done) {
it('78.1.3 fetch multiple CLOB columns as String', function(done) {
var id_1 = 3;
var specialStr_1 = '76.1.3_1';
var specialStr_1 = '78.1.3_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 4;
var specialStr_2 = '76.1.3_2';
var specialStr_2 = '78.1.3_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -276,15 +276,15 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.3
}); // 78.1.3
it('76.1.4 fetch the same CLOB column multiple times', function(done) {
it('78.1.4 fetch the same CLOB column multiple times', function(done) {
var id_1 = 5;
var specialStr_1 = '76.1.4_1';
var specialStr_1 = '78.1.4_1';
var contentLength_1 = 20;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 6;
var specialStr_2 = '76.1.4_2';
var specialStr_2 = '78.1.4_2';
var contentLength_2 = 36;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -322,11 +322,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.4
}); // 78.1.4
it('76.1.5 works with (64K - 1) value', function(done) {
it('78.1.5 works with (64K - 1) value', function(done) {
var id = 7;
var specialStr = '76.1.5';
var specialStr = '78.1.5';
var contentLength = 65535;
var content = getRandomString(contentLength, specialStr);
@ -350,11 +350,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.5
}); // 78.1.5
it('76.1.6 fetch with substr()', function(done) {
it('78.1.6 fetch with substr()', function(done) {
var id = 8;
var specialStr = '76.1.6';
var specialStr = '78.1.6';
var specialStrLen = specialStr.length;
var contentLength = 100;
var content = getRandomString(contentLength, specialStr);
@ -377,9 +377,9 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.6
}); // 78.1.6
it('76.1.7 works with EMPTY_CLOB()', function(done) {
it('78.1.7 works with EMPTY_CLOB()', function(done) {
var id = 9;
var content = "EMPTY_CLOB()";
@ -399,11 +399,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.7
}); // 78.1.7
it('76.1.8 fetch CLOB with stream', function(done) {
it('78.1.8 fetch CLOB with stream', function(done) {
var id = 10;
var specialStr = '76.1.8';
var specialStr = '78.1.8';
var contentLength = 40;
var content = getRandomString(contentLength, specialStr);
@ -448,11 +448,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.8
}); // 78.1.8
it('76.1.9 works with REF CURSOR', function(done) {
it('78.1.9 works with REF CURSOR', function(done) {
var id = 11;
var specialStr = '76.1.9';
var specialStr = '78.1.9';
var contentLength = 26;
var content = getRandomString(contentLength, specialStr);
@ -508,14 +508,14 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.9
}); // 78.1.9
it('76.1.10 work with update', function(done) {
it('78.1.10 works with update statement', function(done) {
var id = 12;
var specialStr_1 = '76.1.10_1';
var specialStr_1 = '78.1.10_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var specialStr_2 = '76.1.10_2';
var specialStr_2 = '78.1.10_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -555,11 +555,93 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.1.10
}); // 78.1.10
}); // 76.1
it('78.1.11 works with setting oracledb.maxRows < actual number of rows in the table', function(done) {
var id_1 = 13;
var specialStr_1 = '78.1.11_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 14;
var specialStr_2 = '78.1.11_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
var maxRowsBak = oracledb.maxRows;
oracledb.maxRows = 1;
describe('76.2 fetch CLOB columns by setting fetchInfo option', function() {
async.series([
function(cb) {
insertIntoClobTable1(id_1, content_1, cb);
},
function(cb) {
insertIntoClobTable1(id_2, content_2, cb);
},
function(cb) {
connection.execute(
"SELECT ID, C from nodb_clob1 where id = " + id_1 + " or id = " +id_2,
function(err, result){
should.not.exist(err);
var specialStrLen_1 = specialStr_1.length;
var resultLen_1 = result.rows[0][1].length;
should.equal(result.rows[0][1].length, contentLength_1);
should.strictEqual(result.rows[0][1].substring(0, specialStrLen_1), specialStr_1);
should.strictEqual(result.rows[0][1].substring(resultLen_1 - specialStrLen_1, resultLen_1), specialStr_1);
result.rows.length.should.eql(1);
oracledb.maxRows = maxRowsBak;
cb();
}
);
}
], done);
}); // 78.1.11
it('78.1.12 works with setting oracledb.maxRows > actual number of rows in the table', function(done) {
var id_1 = 15;
var specialStr_1 = '78.1.12_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 16;
var specialStr_2 = '78.1.12_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
var maxRowsBak = oracledb.maxRows;
oracledb.maxRows = 20;
async.series([
function(cb) {
insertIntoClobTable1(id_1, content_1, cb);
},
function(cb) {
insertIntoClobTable1(id_2, content_2, cb);
},
function(cb) {
connection.execute(
"SELECT ID, C from nodb_clob1 where id = " + id_1 + " or id = " +id_2,
function(err, result){
should.not.exist(err);
var specialStrLen_1 = specialStr_1.length;
var resultLen_1 = result.rows[0][1].length;
should.equal(result.rows[0][1].length, contentLength_1);
should.strictEqual(result.rows[0][1].substring(0, specialStrLen_1), specialStr_1);
should.strictEqual(result.rows[0][1].substring(resultLen_1 - specialStrLen_1, resultLen_1), specialStr_1);
var specialStrLen_2 = specialStr_2.length;
var resultLen_2 = result.rows[1][1].length;
should.equal(result.rows[1][1].length, contentLength_2);
should.strictEqual(result.rows[1][1].substring(0, specialStrLen_2), specialStr_2);
should.strictEqual(result.rows[1][1].substring(resultLen_2 - specialStrLen_2, resultLen_2), specialStr_2);
oracledb.maxRows = maxRowsBak;
cb();
}
);
}
], done);
}); // 78.1.12
}); // 78.1
describe('78.2 fetch CLOB columns by setting fetchInfo option', function() {
before('create Table and populate', function(done) {
connection.execute(
proc_create_table1,
@ -580,7 +662,7 @@ describe('76. fetchClobAsString.js', function() {
);
}); // after
it('76.2.1 works with NULL value', function(done) {
it('78.2.1 works with NULL value', function(done) {
var id = 1;
var content = null;
@ -601,11 +683,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.1
}); // 78.2.1
it('76.2.2 works with small CLOB data', function(done) {
it('78.2.2 works with small CLOB data', function(done) {
var id = 2;
var specialStr = '76.2.2';
var specialStr = '78.2.2';
var contentLength = 26;
var content = getRandomString(contentLength, specialStr);
@ -630,15 +712,15 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.2
}); // 78.2.2
it('76.2.3 fetch multiple CLOB columns as String', function(done) {
it('78.2.3 fetch multiple CLOB columns as String', function(done) {
var id_1 = 3;
var specialStr_1 = '76.2.3_1';
var specialStr_1 = '78.2.3_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 4;
var specialStr_2 = '76.2.3_2';
var specialStr_2 = '78.2.3_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -672,15 +754,15 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.3
}); // 78.2.3
it('76.2.4 fetch the same CLOB column multiple times', function(done) {
it('78.2.4 fetch the same CLOB column multiple times', function(done) {
var id_1 = 5;
var specialStr_1 = '76.2.4_1';
var specialStr_1 = '78.2.4_1';
var contentLength_1 = 20;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 6;
var specialStr_2 = '76.2.4_2';
var specialStr_2 = '78.2.4_2';
var contentLength_2 = 36;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -723,11 +805,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.4
}); // 78.2.4
it('76.2.5 works with (64K - 1) value', function(done) {
it('78.2.5 works with (64K - 1) value', function(done) {
var id = 7;
var specialStr = '76.2.5';
var specialStr = '78.2.5';
var contentLength = 65535;
var content = getRandomString(contentLength, specialStr);
@ -752,11 +834,11 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.5
}); // 78.2.5
it('76.2.6 works with substr()', function(done) {
it('78.2.6 works with substr()', function(done) {
var id = 8;
var specialStr = '76.2.6';
var specialStr = '78.2.6';
var specialStrLen = specialStr.length;
var contentLength = 100;
var content = getRandomString(contentLength, specialStr);
@ -780,9 +862,9 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.6
}); // 78.2.6
it('76.2.7 works with EMPTY_CLOB()', function(done) {
it('78.2.7 works with EMPTY_CLOB()', function(done) {
var id = 9;
var content = "EMPTY_CLOB()";
@ -803,14 +885,14 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.7
}); // 78.2.7
it('76.2.8 work with UPDATE statement', function(done) {
it('78.2.8 works with UPDATE statement', function(done) {
var id = 10;
var specialStr_1 = '76.2.10_1';
var specialStr_1 = '78.2.10_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var specialStr_2 = '76.2.10_2';
var specialStr_2 = '78.2.10_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -854,11 +936,97 @@ describe('76. fetchClobAsString.js', function() {
);
}
], done);
}); // 76.2.8
}); // 78.2.8
}); // 76.2
it('78.2.9 works with setting oracledb.maxRows < actual number of rows in the table', function(done) {
var id_1 = 11;
var specialStr_1 = '78.2.9_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 12;
var specialStr_2 = '78.2.9_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
var maxRowsBak = oracledb.maxRows;
oracledb.maxRows = 1;
describe('76.3 fetch multiple CLOBs', function() {
async.series([
function(cb) {
insertIntoClobTable1(id_1, content_1, cb);
},
function(cb) {
insertIntoClobTable1(id_2, content_2, cb);
},
function(cb) {
connection.execute(
"SELECT ID, C from nodb_clob1 where id = " + id_1 + " or id = " +id_2,
{ },
{ fetchInfo : { C : { type : oracledb.STRING} } },
function(err, result){
should.not.exist(err);
var specialStrLen_1 = specialStr_1.length;
var resultLen_1 = result.rows[0][1].length;
should.equal(result.rows[0][1].length, contentLength_1);
should.strictEqual(result.rows[0][1].substring(0, specialStrLen_1), specialStr_1);
should.strictEqual(result.rows[0][1].substring(resultLen_1 - specialStrLen_1, resultLen_1), specialStr_1);
result.rows.length.should.eql(1);
oracledb.maxRows = maxRowsBak;
cb();
}
);
}
], done);
}); // 78.2.9
it('78.2.10 works with setting oracledb.maxRows > actual number of rows in the table', function(done) {
var id_1 = 13;
var specialStr_1 = '78.2.10_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var id_2 = 14;
var specialStr_2 = '78.2.10_2';
var contentLength_2 = 30;
var content_2 = getRandomString(contentLength_2, specialStr_2);
var maxRowsBak = oracledb.maxRows;
oracledb.maxRows = 20;
async.series([
function(cb) {
insertIntoClobTable1(id_1, content_1, cb);
},
function(cb) {
insertIntoClobTable1(id_2, content_2, cb);
},
function(cb) {
connection.execute(
"SELECT ID, C from nodb_clob1 where id = " + id_1 + " or id = " +id_2,
{ },
{ fetchInfo : { C : { type : oracledb.STRING} } },
function(err, result){
should.not.exist(err);
var specialStrLen_1 = specialStr_1.length;
var resultLen_1 = result.rows[0][1].length;
should.equal(result.rows[0][1].length, contentLength_1);
should.strictEqual(result.rows[0][1].substring(0, specialStrLen_1), specialStr_1);
should.strictEqual(result.rows[0][1].substring(resultLen_1 - specialStrLen_1, resultLen_1), specialStr_1);
var specialStrLen_2 = specialStr_2.length;
var resultLen_2 = result.rows[1][1].length;
should.equal(result.rows[1][1].length, contentLength_2);
should.strictEqual(result.rows[1][1].substring(0, specialStrLen_2), specialStr_2);
should.strictEqual(result.rows[1][1].substring(resultLen_2 - specialStrLen_2, resultLen_2), specialStr_2);
oracledb.maxRows = maxRowsBak;
cb();
}
);
}
], done);
}); // 78.2.10
}); // 78.2
describe('78.3 fetch multiple CLOBs', function() {
before('create Table and populate', function(done) {
connection.execute(
proc_create_table2,
@ -890,12 +1058,12 @@ describe('76. fetchClobAsString.js', function() {
done();
}); // afterEach
it('76.3.1 fetch multiple CLOB columns as String', function(done) {
it('78.3.1 fetch multiple CLOB columns as String', function(done) {
var id = 1;
var specialStr_1 = '76.3.1_1';
var specialStr_1 = '78.3.1_1';
var contentLength_1 = 26;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var specialStr_2 = '76.3.1_2';
var specialStr_2 = '78.3.1_2';
var contentLength_2 = 100;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -925,14 +1093,14 @@ describe('76. fetchClobAsString.js', function() {
}
], done);
}); // 76.3.1
}); // 78.3.1
it('76.3.2 fetch two CLOB columns, one as string, another streamed', function(done) {
it('78.3.2 fetch two CLOB columns, one as string, another streamed', function(done) {
var id = 2;
var specialStr_1 = '76.3.2_1';
var specialStr_1 = '78.3.2_1';
var contentLength_1 = 30;
var content_1 = getRandomString(contentLength_1, specialStr_1);
var specialStr_2 = '76.3.2_2';
var specialStr_2 = '78.3.2_2';
var contentLength_2 = 50;
var content_2 = getRandomString(contentLength_2, specialStr_2);
@ -994,7 +1162,7 @@ describe('76. fetchClobAsString.js', function() {
}
], done);
}); // 76.3.2
}); // 78.3.2
}); // 76.3
}); // 78.3
});

View File

@ -1111,7 +1111,7 @@ Overview of node-oracledb functional tests
73.21 cannot surpass the upper limit at pool creation
73.22 cannot surpass the lower limit at pool creation
74.lobBindAsStringBuffer.js
74.clobPlsqlBindAsString.js
74.1 CLOB, PLSQL, BIND_IN
74.1.1 PLSQL, BIND_IN with String length 32K
74.1.2 PLSQL, BIND_IN with String length 64K - 1
@ -1138,100 +1138,107 @@ Overview of node-oracledb functional tests
74.3.1 PLSQL, BIND_INOUT with String length 32K
74.3.2 PLSQL, BIND_INOUT with String length 32K - 1
74.3.3 PLSQL, BIND_INOUT with String length 64K - 1
74.4 BLOB, PLSQL, BIND_IN
74.4.1 PLSQL, BIND_IN with Buffer size 32K
74.4.2 PLSQL, BIND_IN with Buffer size 64K - 1
74.4.3 PLSQL, BIND_IN with null
74.4.4 PLSQL, BIND_IN with empty string
74.4.5 PLSQL, BIND_IN with undefined
74.4.6 PLSQL, BIND_IN with NaN
74.4.7 PLSQL, BIND_IN with 0
74.4.8 PLSQL, BIND_IN bind value and type mismatch
74.4.9 PLSQL, BIND_IN mixing named with positional binding
74.4.10 PLSQL, BIND_IN without maxSize
74.4.11 PLSQL, BIND_IN with invalid BLOB
74.5 BLOB, PLSQL, BIND_OUT
74.5.1 PLSQL, BIND_OUT with Buffer size 32K
74.5.2 PLSQL, BIND_OUT with Buffer size 64K - 1
74.5.3 PLSQL, BIND_OUT with null
74.5.4 PLSQL, BIND_OUT with empty buffer
74.5.5 PLSQL, BIND_OUT with undefined
74.5.6 PLSQL, BIND_OUT mixing named with positional binding
74.5.7 PLSQL, BIND_OUT with limited maxSize
74.5.8 PLSQL, BIND_OUT without maxSize
74.6 BLOB, PLSQL, BIND_INOUT
74.6.1 PLSQL, BIND_INOUT with Buffer size 32K
74.6.2 PLSQL, BIND_INOUT with Buffer size 32K - 1
74.6.3 PLSQL, BIND_INOUT with Buffer size 64K - 1
74.6.1 PLSQL, BIND_INOUT
74.7 Multiple CLOBs, BIND_IN
74.7.1 PLSQL, BIND_IN, bind two string
74.7.2 PLSQL, BIND_IN, bind a txt file and a string
74.8 Multiple CLOBs, BIND_OUT
74.8.1 PLSQL, BIND_OUT, bind two string
74.8.2 PLSQL, BIND_OUT, bind a txt file and a string
74.9 Multiple CLOBs, BIND INOUT
74.9.1 PLSQL, BIND_INOUT, bind a txt file and a 32K string
74.9.2 PLSQL, BIND_INOUT, bind a txt file and a 64K - 1 string
74.10 Multiple BLOBs, BIND_IN
74.10.1 PLSQL, BIND_IN, bind two Buffer
74.10.2 PLSQL, BIND_IN, bind a JPG file and a Buffer
74.11 Multiple BLOBs, BIND_OUT
74.11.1 PLSQL, BIND_OUT, bind two buffer
74.11.2 PLSQL, BIND_OUT, bind a JPG file and a Buffer
74.12 Multiple BLOBs, BIND_INOUT
74.12.1 PLSQL, BIND_INOUT, bind a JPG and a 32K buffer
74.12.2 PLSQL, BIND_INOUT, bind a JPG and a 64K - 1 buffer
74.13 Multiple LOBs, BIND_IN
74.13.1 PLSQL, CLOB&BLOB, bind a string and a buffer
74.13.2 PLSQL, CLOB&BLOB, bind a string and a JPG file
74.13.3 PLSQL, CLOB&BLOB, bind a txt file and a Buffer
74.14 Multiple LOBs, BIND_OUT
74.14.1 PLSQL, CLOB&BLOB, bind a string and a buffer
74.14.2 PLSQL, CLOB&BLOB, bind a string and a JPG file
74.14.3 PLSQL, CLOB&BLOB, bind a txt file and a buffer
74.15 Multiple LOBs, BIND_INOUT
74.15.1 PLSQL, BIND_INOUT, bind a 32K string and a 32K buffer
74.15.2 PLSQL, BIND_INOUT, bind a 64K - 1 string and a 64K - 1 buffer
74.15.1 PLSQL, BIND_INOUT, bind a string and a buffer
74.4 Multiple CLOBs, BIND_IN
74.4.1 PLSQL, BIND_IN, bind two string
74.4.2 PLSQL, BIND_IN, bind a txt file and a string
74.5 Multiple CLOBs, BIND_OUT
74.5.1 PLSQL, BIND_OUT, bind two string
74.5.2 PLSQL, BIND_OUT, bind a txt file and a string
74.6 Multiple CLOBs, BIND INOUT
74.6.1 PLSQL, BIND_INOUT, bind a txt file and a 32K string
74.6.2 PLSQL, BIND_INOUT, bind a txt file and a 64K - 1 string
75. lobProperties2.js
75.1 CLOB: chunkSize (read-only)
75.2 BLOB: chunkSize (read-only)
75.3 CLOB: length (read-only)
75.4 BLOB: length (read-only)
75.5 CLOB: type (read-only)
75.6 BLOB: type (read-only)
75.7 pieceSize
75.7.1 default value is chunkSize
75.7.2 can be increased
75.7.3 can be decreased
75.7.4 can be zero
75.7.5 cannot be less than zero
75.7.6 cannot be null
75.7.7 must be a number
76. fetchClobAsString.js
76.1 fetch CLOB columns by setting oracledb.fetchAsString
76.1.1 works with NULL value
76.1.2 works with small CLOB data
76.1.3 fetch multiple CLOB columns as String
76.1.4 fetch the same CLOB column multiple times
76.1.5 works with (64K - 1) value
76.1.6 fetch with substr()
76.1.7 works with EMPTY_CLOB()
76.1.8 fetch CLOB with stream
76.1.9 works with REF CURSOR
76.1.10 work with update
76.2 fetch CLOB columns by setting fetchInfo option
76.2.1 works with NULL value
76.2.2 works with small CLOB data
76.2.3 fetch multiple CLOB columns as String
76.2.4 fetch the same CLOB column multiple times
76.2.5 works with (64K - 1) value
76.2.6 works with substr()
76.2.7 works with EMPTY_CLOB()
76.2.8 work with UPDATE statement
76.3 fetch multiple CLOBs
76.3.1 fetch multiple CLOB columns as String
76.3.2 fetch two CLOB columns, one as string, another streamed
75.blobPlsqlBindAsBuffer.js
75.1 BLOB, PLSQL, BIND_IN
75.1.1 PLSQL, BIND_IN with Buffer size 32K
75.1.2 PLSQL, BIND_IN with Buffer size 64K - 1
75.1.3 PLSQL, BIND_IN with null
75.1.4 PLSQL, BIND_IN with empty string
75.1.5 PLSQL, BIND_IN with undefined
75.1.6 PLSQL, BIND_IN with NaN
75.1.7 PLSQL, BIND_IN with 0
75.1.8 PLSQL, BIND_IN bind value and type mismatch
75.1.9 PLSQL, BIND_IN mixing named with positional binding
75.1.10 PLSQL, BIND_IN without maxSize
75.1.11 PLSQL, BIND_IN with invalid BLOB
75.2 BLOB, PLSQL, BIND_OUT
75.2.1 PLSQL, BIND_OUT with Buffer size 32K
75.2.2 PLSQL, BIND_OUT with Buffer size 64K - 1
75.2.3 PLSQL, BIND_OUT with null
75.2.4 PLSQL, BIND_OUT with empty buffer
75.2.5 PLSQL, BIND_OUT with undefined
75.2.6 PLSQL, BIND_OUT mixing named with positional binding
75.2.7 PLSQL, BIND_OUT with limited maxSize
75.2.8 PLSQL, BIND_OUT without maxSize
75.3 BLOB, PLSQL, BIND_INOUT
75.3.1 PLSQL, BIND_INOUT with Buffer size 32K
75.3.2 PLSQL, BIND_INOUT with Buffer size 32K - 1
75.3.3 PLSQL, BIND_INOUT with Buffer size 64K - 1
75.4 Multiple BLOBs, BIND_IN
75.4.1 PLSQL, BIND_IN, bind two Buffer
75.4.2 PLSQL, BIND_IN, bind a JPG file and a Buffer
75.5 Multiple BLOBs, BIND_OUT
75.5.1 PLSQL, BIND_OUT, bind two buffer
75.5.2 PLSQL, BIND_OUT, bind a JPG file and a Buffer
75.6 Multiple BLOBs, BIND_INOUT
75.6.1 PLSQL, BIND_INOUT, bind a JPG and a 32K buffer
75.6.2 PLSQL, BIND_INOUT, bind a JPG and a 64K - 1 buffer
76.lobBindAsStringBuffer.js
76.1 Multiple LOBs, BIND_IN
76.1.1 PLSQL, CLOB&BLOB, bind a string and a buffer
76.1.2 PLSQL, CLOB&BLOB, bind a string and a JPG file
76.1.3 PLSQL, CLOB&BLOB, bind a txt file and a Buffer
76.2 Multiple LOBs, BIND_OUT
76.2.1 PLSQL, CLOB&BLOB, bind a string and a buffer
76.2.2 PLSQL, CLOB&BLOB, bind a string and a JPG file
76.2.3 PLSQL, CLOB&BLOB, bind a txt file and a buffer
76.3 Multiple LOBs, BIND_INOUT
76.3.1 PLSQL, BIND_INOUT, bind a 32K string and a 32K buffer
76.3.2 PLSQL, BIND_INOUT, bind a 64K - 1 string and a 64K - 1 buffer
77. lobProperties2.js
77.1 CLOB: chunkSize (read-only)
77.2 BLOB: chunkSize (read-only)
77.3 CLOB: length (read-only)
77.4 BLOB: length (read-only)
77.5 CLOB: type (read-only)
77.6 BLOB: type (read-only)
77.7 pieceSize
77.7.1 default value is chunkSize
77.7.2 can be increased
77.7.3 can be decreased
77.7.4 can be zero
77.7.5 cannot be less than zero
77.7.6 cannot be null
77.7.7 must be a number
78. fetchClobAsString.js
78.1 fetch CLOB columns by setting oracledb.fetchAsString
78.1.1 works with NULL value
78.1.2 works with small CLOB data
78.1.3 fetch multiple CLOB columns as String
78.1.4 fetch the same CLOB column multiple times
78.1.5 works with (64K - 1) value
78.1.6 fetch with substr()
78.1.7 works with EMPTY_CLOB()
78.1.8 fetch CLOB with stream
78.1.9 works with REF CURSOR
78.1.10 works with update statement
78.1.11 works with setting oracledb.maxRows < actual number of rows in the table
78.1.12 works with setting oracledb.maxRows > actual number of rows in the table
78.2 fetch CLOB columns by setting fetchInfo option
78.2.1 works with NULL value
78.2.2 works with small CLOB data
78.2.3 fetch multiple CLOB columns as String
78.2.4 fetch the same CLOB column multiple times
78.2.5 works with (64K - 1) value
78.2.6 works with substr()
78.2.7 works with EMPTY_CLOB()
78.2.8 works with UPDATE statement
78.2.9 works with setting oracledb.maxRows < actual number of rows in the table
78.2.10 works with setting oracledb.maxRows > actual number of rows in the table
78.3 fetch multiple CLOBs
78.3.1 fetch multiple CLOB columns as String
78.3.2 fetch two CLOB columns, one as string, another streamed

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
* See LICENSE.md for relevant licenses.
*
* NAME
* 75. lobProperties2.js
* 77. lobProperties2.js
*
* DESCRIPTION
* Testing the properties of LOB that created by createLob().
@ -38,7 +38,7 @@ var should = require('should');
var async = require('async');
var dbConfig = require('./dbconfig.js');
describe("75. lobProperties2.js", function() {
describe("77. lobProperties2.js", function() {
var connection;
@ -80,11 +80,11 @@ describe("75. lobProperties2.js", function() {
});
}; // checkChunkSize
it("75.1 CLOB: chunkSize (read-only)", function(done) {
it("77.1 CLOB: chunkSize (read-only)", function(done) {
checkChunkSize(oracledb.CLOB, done);
});
it("75.2 BLOB: chunkSize (read-only)", function(done) {
it("77.2 BLOB: chunkSize (read-only)", function(done) {
checkChunkSize(oracledb.BLOB, done);
});
@ -110,11 +110,11 @@ describe("75. lobProperties2.js", function() {
});
}; // checkLength
it("75.3 CLOB: length (read-only)", function(done) {
it("77.3 CLOB: length (read-only)", function(done) {
checkLength(oracledb.CLOB, done);
});
it("75.4 BLOB: length (read-only)", function(done) {
it("77.4 BLOB: length (read-only)", function(done) {
checkLength(oracledb.BLOB, done);
});
@ -140,15 +140,15 @@ describe("75. lobProperties2.js", function() {
});
}; // checkType
it("75.5 CLOB: type (read-only)", function(done) {
it("77.5 CLOB: type (read-only)", function(done) {
checkType(oracledb.CLOB, done);
});
it("75.6 BLOB: type (read-only)", function(done) {
it("77.6 BLOB: type (read-only)", function(done) {
checkType(oracledb.CLOB, done);
});
describe("75.7 pieceSize", function() {
describe("77.7 pieceSize", function() {
var defaultChunkSize;
var clob, blob;
@ -186,7 +186,7 @@ describe("75. lobProperties2.js", function() {
], done);
}); // after
it("75.7.1 default value is chunkSize", function(done) {
it("77.7.1 default value is chunkSize", function(done) {
var t1 = clob.pieceSize,
t2 = blob.pieceSize;
@ -195,7 +195,7 @@ describe("75. lobProperties2.js", function() {
done();
});
it("75.7.2 can be increased", function(done) {
it("77.7.2 can be increased", function(done) {
var newValue = clob.pieceSize * 5;
clob.pieceSize = clob.pieceSize * 5;
@ -210,7 +210,7 @@ describe("75. lobProperties2.js", function() {
done();
});
it("75.7.3 can be decreased", function(done) {
it("77.7.3 can be decreased", function(done) {
if (defaultChunkSize <= 500) {
console.log('As default chunkSize is too small, this case is not applicable');
} else {
@ -228,7 +228,7 @@ describe("75. lobProperties2.js", function() {
return done();
});
it("75.7.4 can be zero", function(done) {
it("77.7.4 can be zero", function(done) {
clob.pieceSize = 0;
blob.pieceSize = 0;
@ -242,7 +242,7 @@ describe("75. lobProperties2.js", function() {
done();
});
it("75.7.5 cannot be less than zero", function(done) {
it("77.7.5 cannot be less than zero", function(done) {
try {
clob.pieceSize = -100;
} catch(err) {
@ -258,7 +258,7 @@ describe("75. lobProperties2.js", function() {
done();
});
it("75.7.6 cannot be null", function(done) {
it("77.7.6 cannot be null", function(done) {
try {
clob.pieceSize = null;
} catch(err) {
@ -274,7 +274,7 @@ describe("75. lobProperties2.js", function() {
done();
});
it("75.7.7 must be a number", function(done) {
it("77.7.7 must be a number", function(done) {
try {
clob.pieceSize = NaN;
} catch(err) {
@ -289,6 +289,6 @@ describe("75. lobProperties2.js", function() {
done();
});
}); // 75.7
}); // 77.7
});