Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
before('get one connection', function(done) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
done();
});
}); // before
before('get one connection', function(done) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
done();
});
}); // before
before('get one connection', function(done) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
done();
});
}); // before
it('1.3.1 stmtCacheSize = 0, which disable statement caching', function(done) {
connection.should.be.ok();
oracledb.stmtCacheSize = 0;
async.series([
function(callback) {
connection.execute(
"INSERT INTO nodb_conn_emp4 VALUES (:num, :str)",
{ num: 1003, str: 'Robyn Sands' },
{ autoCommit: true },
function(err) {
should.not.exist(err);
callback();
}
);
},
function(callback) {
connection.execute(
"INSERT INTO nodb_conn_emp4 VALUES (:num, :str)",
function(cb) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
cb();
});
},
function(cb) {
function(cb) {
oracledb.stmtCacheSize = defaultStmtCache;
connection.release(function(err) {
should.not.exist(err);
cb();
});
},
function(cb) {
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942);\n" +
" BEGIN \n" +
" EXECUTE IMMEDIATE ('DROP TABLE nodb_blob1 PURGE' ); \n" +
" EXCEPTION \n" +
" WHEN e_table_missing \n" +
" THEN NULL; \n" +
" END; \n" +
" EXECUTE IMMEDIATE ( ' \n" +
" CREATE TABLE nodb_blob1 ( \n" +
" ID NUMBER, \n" +
" B BLOB \n" +
" ) \n" +
" '); \n" +
"END; ";
var drop_table1 = "DROP TABLE nodb_blob1 PURGE";
var defaultStmtCache = oracledb.stmtCacheSize;
before('get one connection', function(done) {
async.series([
function(cb) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
cb();
});
},
function(cb) {
file.create(inFileName);
cb();
}
], done);
function(cb) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
cb();
});
},
function(cb) {
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
" BEGIN \n" +
" EXECUTE IMMEDIATE('DROP TABLE nodb_clob1 PURGE'); \n" +
" EXCEPTION \n" +
" WHEN e_table_missing \n" +
" THEN NULL; \n" +
" END; \n" +
" EXECUTE IMMEDIATE (' \n" +
" CREATE TABLE nodb_clob1 ( \n" +
" ID NUMBER, \n" +
" C CLOB \n" +
" ) \n" +
" '); \n" +
"END; ";
var drop_table1 = "DROP TABLE nodb_clob1 PURGE";
var defaultStmtCache = oracledb.stmtCacheSize;
before('get one connection', function(done) {
async.series([
function(cb) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
cb();
});
},
function(cb) {
file.create(inFileName);
cb();
}
], done);
function(cb) {
oracledb.stmtCacheSize = 0;
oracledb.getConnection(dbConfig, function(err, conn) {
should.not.exist(err);
connection = conn;
cb();
});
},
function(cb) {