2022-04-19 08:06:36 +08:00
|
|
|
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
|
2017-12-12 07:12:25 +08:00
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* You may not use the identified files except in compliance with the Apache
|
|
|
|
* License, Version 2.0 (the "License.")
|
|
|
|
*
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
*
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
* NAME
|
|
|
|
* 154. fetchArraySize7.js
|
|
|
|
*
|
|
|
|
* DESCRIPTION
|
|
|
|
* Fetching data from database with different execute() option fetchArraySize when resultSet=true
|
|
|
|
* Tests including:
|
|
|
|
* getRow() tests
|
|
|
|
* getRows() tests
|
|
|
|
* interleaved calls to getRow() and getRows() tests
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var oracledb = require('oracledb');
|
|
|
|
var should = require('should');
|
|
|
|
var dbConfig = require('./dbconfig.js');
|
|
|
|
|
|
|
|
describe("154. fetchArraySize7.js", function() {
|
|
|
|
|
|
|
|
var connection = null;
|
|
|
|
var default_maxRows = oracledb.maxRows;
|
|
|
|
var tableName = "nodb_fetchArraySize_154";
|
2018-02-06 10:22:07 +08:00
|
|
|
var tableSize = 1000;
|
2017-12-12 07:12:25 +08:00
|
|
|
|
|
|
|
var create_table = "BEGIN \n" +
|
|
|
|
" DECLARE \n" +
|
|
|
|
" e_table_missing EXCEPTION; \n" +
|
|
|
|
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
|
|
|
|
" BEGIN \n" +
|
|
|
|
" EXECUTE IMMEDIATE('DROP TABLE " + tableName + " PURGE'); \n" +
|
|
|
|
" EXCEPTION \n" +
|
|
|
|
" WHEN e_table_missing \n" +
|
|
|
|
" THEN NULL; \n" +
|
|
|
|
" END; \n" +
|
|
|
|
" EXECUTE IMMEDIATE (' \n" +
|
|
|
|
" CREATE TABLE " + tableName + " ( \n" +
|
|
|
|
" id NUMBER, \n" +
|
|
|
|
" content VARCHAR(2000) \n" +
|
|
|
|
" ) \n" +
|
|
|
|
" '); \n" +
|
2018-02-06 10:22:07 +08:00
|
|
|
" FOR i IN 1.." + tableSize + " LOOP \n" +
|
2017-12-12 07:12:25 +08:00
|
|
|
" EXECUTE IMMEDIATE (' \n" +
|
|
|
|
" insert into " + tableName + " values (' || i || ',' || to_char(i) ||') \n" +
|
|
|
|
" '); \n" +
|
|
|
|
" END LOOP; \n" +
|
|
|
|
" commit; \n" +
|
|
|
|
"END; ";
|
|
|
|
|
|
|
|
var drop_table = "DROP TABLE " + tableName + " PURGE";
|
|
|
|
|
|
|
|
before(function(done) {
|
|
|
|
oracledb.getConnection(dbConfig, function(err, conn) {
|
|
|
|
should.strictEqual(default_maxRows, 0);
|
|
|
|
should.not.exist(err);
|
|
|
|
connection = conn;
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
after(function(done) {
|
|
|
|
connection.close(function(err) {
|
|
|
|
should.not.exist(err);
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
describe("154.1 getRows() of resultSet = true", function() {
|
|
|
|
|
|
|
|
before(function(done) {
|
|
|
|
connection.execute(
|
|
|
|
create_table,
|
2021-04-01 12:48:37 +08:00
|
|
|
function(err) {
|
2017-12-12 07:12:25 +08:00
|
|
|
should.not.exist(err);
|
|
|
|
done() ;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
after(function(done) {
|
|
|
|
connection.execute(
|
|
|
|
drop_table,
|
2021-04-01 12:48:37 +08:00
|
|
|
function(err) {
|
2017-12-12 07:12:25 +08:00
|
|
|
should.not.exist(err);
|
|
|
|
done();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(function(done) {
|
|
|
|
oracledb.maxRows = default_maxRows;
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
|
|
|
|
var testGetRow = function(fetchArraySizeVal, numRowsVal, cb) {
|
|
|
|
|
|
|
|
connection.execute(
|
|
|
|
"select * from " + tableName + " order by id",
|
|
|
|
[],
|
|
|
|
{
|
|
|
|
resultSet: true,
|
|
|
|
fetchArraySize: fetchArraySizeVal
|
|
|
|
},
|
|
|
|
function(err, result) {
|
|
|
|
should.not.exist(err);
|
|
|
|
var rowCount = 0;
|
|
|
|
fetchRowsFromRS(result.resultSet, numRowsVal, rowCount, cb);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2021-04-01 12:48:37 +08:00
|
|
|
function fetchRowsFromRS(rs, numRowsVal, rowCount, cb) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.getRows(numRowsVal, function(err, rows) {
|
|
|
|
(rows.length).should.be.belowOrEqual(numRowsVal);
|
2021-04-01 12:48:37 +08:00
|
|
|
if (rows.length > 0) {
|
|
|
|
for (var i = 0; i < rows.length; i++) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rowCount = rowCount + 1;
|
|
|
|
should.strictEqual(rows[i][0], rowCount);
|
|
|
|
should.strictEqual(rows[i][1], rowCount.toString());
|
|
|
|
}
|
|
|
|
return fetchRowsFromRS(rs, numRowsVal, rowCount, cb);
|
|
|
|
} else {
|
2018-02-06 10:22:07 +08:00
|
|
|
should.strictEqual(rowCount, tableSize);
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.close(function(err) {
|
|
|
|
should.not.exist(err);
|
|
|
|
cb();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
it("154.1.1 numRows > table size > fetchArraySize", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize - 50;
|
|
|
|
var numRowsVal = tableSize + 10000;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.2 numRows > fetchArraySize > table size", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize + 1200;
|
|
|
|
var numRowsVal = tableSize + 10000;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.3 table size > numRows > fetchArraySize", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize - 91;
|
|
|
|
var numRowsVal = tableSize - 2;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.4 table size > fetchArraySize > maxRow", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize - 90;
|
|
|
|
var numRowsVal = tableSize - 150;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.5 numRows = fetchArraySize < table size", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize - 110;
|
|
|
|
var numRowsVal = tableSize - 110;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.6 numRows = fetchArraySize = table size", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize;
|
|
|
|
var numRowsVal = tableSize;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.7 numRows = fetchArraySize > table size", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize + 9999;
|
|
|
|
var numRowsVal = tableSize + 9999;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.8 numRows = fetchArraySize/10", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
var fetchArraySizeVal = tableSize / 10 + 1;
|
|
|
|
var numRowsVal = tableSize / 10;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.9 numRows = 10 * fetchArraySize", function(done) {
|
|
|
|
var fetchArraySizeVal = 90;
|
|
|
|
var numRowsVal = 900;
|
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.10 numRows > fetchArraySize, fetchArraySize = (table size)/10", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
var fetchArraySizeVal = tableSize / 10;
|
|
|
|
var numRowsVal = tableSize / 10 + 1;
|
2017-12-12 07:12:25 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
2017-12-13 06:17:50 +08:00
|
|
|
it("154.1.11 numRows = (table size - 1), fetchArraySize = table size", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize;
|
|
|
|
var numRowsVal = tableSize - 1;
|
2017-12-13 06:17:50 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("154.1.12 fetchArraySize = (table size - 1), numRows = table size", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
var fetchArraySizeVal = tableSize - 1;
|
|
|
|
var numRowsVal = tableSize;
|
2017-12-13 06:17:50 +08:00
|
|
|
testGetRow(fetchArraySizeVal, numRowsVal, done);
|
|
|
|
});
|
|
|
|
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
describe("154.2 getRow() of resultSet = true", function() {
|
|
|
|
|
|
|
|
before(function(done) {
|
|
|
|
connection.execute(
|
|
|
|
create_table,
|
2021-04-01 12:48:37 +08:00
|
|
|
function(err) {
|
2017-12-12 07:12:25 +08:00
|
|
|
should.not.exist(err);
|
|
|
|
done() ;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
after(function(done) {
|
|
|
|
connection.execute(
|
|
|
|
drop_table,
|
2021-04-01 12:48:37 +08:00
|
|
|
function(err) {
|
2017-12-12 07:12:25 +08:00
|
|
|
should.not.exist(err);
|
|
|
|
done();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(function(done) {
|
|
|
|
oracledb.maxRows = default_maxRows;
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
|
|
|
|
var testGetRows = function(fetchArraySizeVal, cb) {
|
|
|
|
connection.execute(
|
|
|
|
"select * from " + tableName + " order by id",
|
|
|
|
[],
|
|
|
|
{
|
|
|
|
resultSet: true,
|
|
|
|
fetchArraySize: fetchArraySizeVal
|
|
|
|
},
|
|
|
|
function(err, result) {
|
|
|
|
should.not.exist(err);
|
|
|
|
// should.strictEqual(result.rows.length, default_maxRows);
|
|
|
|
var rowCount = 0;
|
|
|
|
fetchRowFromRS(result.resultSet, rowCount, cb);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2021-04-01 12:48:37 +08:00
|
|
|
function fetchRowFromRS(rs, rowCount, cb) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.getRow(function(err, row) {
|
2021-04-01 12:48:37 +08:00
|
|
|
if (row) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rowCount = rowCount + 1;
|
|
|
|
// console.log(rows[i][0]);
|
|
|
|
should.strictEqual(row[0], rowCount);
|
|
|
|
should.strictEqual(row[1], rowCount.toString());
|
|
|
|
return fetchRowFromRS(rs, rowCount, cb);
|
|
|
|
} else {
|
2018-02-06 10:22:07 +08:00
|
|
|
should.strictEqual(rowCount, tableSize);
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.close(function(err) {
|
|
|
|
should.not.exist(err);
|
|
|
|
cb();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
it("154.2.1 fetchArraySize = 1", function(done) {
|
|
|
|
testGetRows(1, done);
|
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.2.2 fetchArraySize = tableSize/50", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
testGetRows(tableSize / 50, done);
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.2.3 fetchArraySize = tableSize/20", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
testGetRows(tableSize / 20, done);
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.2.4 fetchArraySize = tableSize/10", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
testGetRows(tableSize / 10, done);
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.2.5 fetchArraySize = tableSize/5", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
testGetRows(tableSize / 5, done);
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.2.6 fetchArraySize = tableSize", function(done) {
|
|
|
|
testGetRows(tableSize, done);
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
2017-12-13 06:17:50 +08:00
|
|
|
it("154.2.7 fetchArraySize = (table size - 1)", function(done) {
|
2018-02-06 10:22:07 +08:00
|
|
|
testGetRows(tableSize - 1, done);
|
2017-12-13 06:17:50 +08:00
|
|
|
});
|
|
|
|
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
describe("154.3 interleaved calls to getRow() and getRows()", function() {
|
|
|
|
var numRowsVal_1, numRowsVal_2;
|
|
|
|
|
|
|
|
before(function(done) {
|
|
|
|
connection.execute(
|
|
|
|
create_table,
|
2021-04-01 12:48:37 +08:00
|
|
|
function(err) {
|
2017-12-12 07:12:25 +08:00
|
|
|
should.not.exist(err);
|
|
|
|
done() ;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
after(function(done) {
|
|
|
|
connection.execute(
|
|
|
|
drop_table,
|
2021-04-01 12:48:37 +08:00
|
|
|
function(err) {
|
2017-12-12 07:12:25 +08:00
|
|
|
should.not.exist(err);
|
|
|
|
done();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(function(done) {
|
|
|
|
oracledb.maxRows = default_maxRows;
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
|
|
|
|
var testRS = function(fetchArraySizeVal, cb) {
|
|
|
|
connection.execute(
|
|
|
|
"select * from " + tableName + " order by id",
|
|
|
|
[],
|
|
|
|
{
|
|
|
|
resultSet: true,
|
|
|
|
fetchArraySize: fetchArraySizeVal
|
|
|
|
},
|
|
|
|
function(err, result) {
|
|
|
|
should.not.exist(err);
|
|
|
|
var rowCount = 0;
|
|
|
|
fetchRowFromRS(result.resultSet, rowCount, cb);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2021-04-01 12:48:37 +08:00
|
|
|
function fetchRowFromRS(rs, rowCount, cb) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.getRow(function(err, row) {
|
2021-04-01 12:48:37 +08:00
|
|
|
if (row) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rowCount = rowCount + 1;
|
|
|
|
should.strictEqual(row[0], rowCount);
|
|
|
|
should.strictEqual(row[1], rowCount.toString());
|
|
|
|
return fetchRowsFromRS_1(rs, rowCount, cb);
|
|
|
|
} else {
|
2018-02-06 10:22:07 +08:00
|
|
|
should.strictEqual(rowCount, tableSize);
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.close(function(err) {
|
|
|
|
should.not.exist(err);
|
|
|
|
cb();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-04-01 12:48:37 +08:00
|
|
|
function fetchRowsFromRS_1(rs, rowCount, cb) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.getRows(numRowsVal_1, function(err, rows) {
|
|
|
|
(rows.length).should.be.belowOrEqual(numRowsVal_1);
|
2021-04-01 12:48:37 +08:00
|
|
|
if (rows.length > 0) {
|
|
|
|
for (var i = 0; i < rows.length; i++) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rowCount = rowCount + 1;
|
|
|
|
should.strictEqual(rows[i][0], rowCount);
|
|
|
|
should.strictEqual(rows[i][1], rowCount.toString());
|
|
|
|
}
|
|
|
|
return fetchRowsFromRS_2(rs, rowCount, cb);
|
|
|
|
} else {
|
2018-02-06 10:22:07 +08:00
|
|
|
should.strictEqual(rowCount, tableSize);
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.close(function(err) {
|
|
|
|
should.not.exist(err);
|
|
|
|
cb();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-04-01 12:48:37 +08:00
|
|
|
function fetchRowsFromRS_2(rs, rowCount, cb) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.getRows(numRowsVal_2, function(err, rows) {
|
|
|
|
(rows.length).should.be.belowOrEqual(numRowsVal_2);
|
2021-04-01 12:48:37 +08:00
|
|
|
if (rows.length > 0) {
|
|
|
|
for (var i = 0; i < rows.length; i++) {
|
2017-12-12 07:12:25 +08:00
|
|
|
rowCount = rowCount + 1;
|
|
|
|
should.strictEqual(rows[i][0], rowCount);
|
|
|
|
should.strictEqual(rows[i][1], rowCount.toString());
|
|
|
|
}
|
|
|
|
return fetchRowFromRS(rs, rowCount, cb);
|
|
|
|
} else {
|
2018-02-06 10:22:07 +08:00
|
|
|
should.strictEqual(rowCount, tableSize);
|
2017-12-12 07:12:25 +08:00
|
|
|
rs.close(function(err) {
|
|
|
|
should.not.exist(err);
|
|
|
|
cb();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
it("154.3.1 fetchArraySize = 1", function(done) {
|
|
|
|
var fetchArraySizeVal = 1;
|
|
|
|
numRowsVal_1 = 2;
|
|
|
|
numRowsVal_2 = 10;
|
|
|
|
testRS(fetchArraySizeVal, done);
|
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.3.2 fetchArraySize = tableSize/50", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
var fetchArraySizeVal = tableSize / 50;
|
2017-12-12 07:12:25 +08:00
|
|
|
numRowsVal_1 = 5;
|
|
|
|
numRowsVal_2 = 88;
|
|
|
|
testRS(fetchArraySizeVal, done);
|
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.3.3 fetchArraySize = tableSize/20", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
var fetchArraySizeVal = tableSize / 20;
|
2017-12-12 07:12:25 +08:00
|
|
|
numRowsVal_1 = 50;
|
|
|
|
numRowsVal_2 = 100;
|
|
|
|
testRS(fetchArraySizeVal, done);
|
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.3.4 fetchArraySize = tableSize/10", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
var fetchArraySizeVal = tableSize / 10;
|
2017-12-12 07:12:25 +08:00
|
|
|
numRowsVal_1 = 30;
|
|
|
|
numRowsVal_2 = 99;
|
|
|
|
testRS(fetchArraySizeVal, done);
|
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.3.5 fetchArraySize = tableSize/5", function(done) {
|
2021-04-01 12:48:37 +08:00
|
|
|
var fetchArraySizeVal = tableSize / 5;
|
2017-12-12 07:12:25 +08:00
|
|
|
numRowsVal_1 = 5;
|
|
|
|
numRowsVal_2 = 88;
|
|
|
|
testRS(fetchArraySizeVal, done);
|
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.3.6 fetchArraySize = tableSize", function(done) {
|
|
|
|
var fetchArraySizeVal = tableSize;
|
2017-12-12 07:12:25 +08:00
|
|
|
numRowsVal_1 = 15;
|
2018-02-06 10:22:07 +08:00
|
|
|
numRowsVal_2 = tableSize;
|
2017-12-12 07:12:25 +08:00
|
|
|
testRS(fetchArraySizeVal, done);
|
|
|
|
});
|
|
|
|
|
2018-02-06 10:22:07 +08:00
|
|
|
it("154.3.7 fetchArraySize = (tableSize - 1)", function(done) {
|
|
|
|
var fetchArraySizeVal = tableSize - 1;
|
|
|
|
numRowsVal_1 = tableSize - 1;
|
|
|
|
numRowsVal_2 = tableSize;
|
2017-12-13 06:17:50 +08:00
|
|
|
testRS(fetchArraySizeVal, done);
|
|
|
|
});
|
|
|
|
|
2017-12-12 07:12:25 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|