Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
afterEach('clear the By type specification', function(done) {
oracledb.fetchAsString = [];
done();
}); // afterEach
afterEach('clear the By type specification', function(done) {
oracledb.fetchAsString = [];
done();
}); // afterEach
function change(cb) {
oracledb.fetchAsString = [ oracledb.DATE, oracledb.NUMBER ];
cb();
},
function test(cb) {
it('28.1.5 columns fetched from REF CURSORS can be mapped by oracledb.fetchAsString', function(done) {
oracledb.fetchAsString = [ oracledb.NUMBER ];
assist.verifyRefCursorWithFetchAsString(connection, tableName, numbers, done);
});
});
it('36.1.5 columns fetched from REF CURSORS can be mapped by oracledb.fetchAsString', function(done) {
oracledb.fetchAsString = [ oracledb.DATE ];
assist.verifyRefCursorWithFetchAsString(connection, tableName, dates, done);
});
after('restore the values', function() {
oracledb.poolMin = defaultValues.poolMin;
oracledb.poolMax = defaultValues.poolMax;
oracledb.poolIncrement = defaultValues.poolIncrement;
oracledb.poolTimeout = defaultValues.poolTimeout;
oracledb.maxRows = defaultValues.maxRows;
oracledb.fetchArraySize = defaultValues.fetchArraySize;
oracledb.autoCommit = defaultValues.autoCommit;
oracledb.connectionClass = defaultValues.connectionClass;
oracledb.externalAuth = defaultValues.externalAuth;
oracledb.fetchAsString = defaultValues.fetchAsString;
oracledb.outFormat = defaultValues.outFormat;
oracledb.lobPrefetchSize = defaultValues.lobPrefetchSize;
oracledb.queueTimeout = defaultValues.queueTimeout;
oracledb.stmtCacheSize = defaultValues.stmtCacheSize;
oracledb.poolPingInterval = defaultValues.poolPingInterval;
oracledb.fetchAsBuffer = defaultValues.fetchAsBuffer;
oracledb.edition = defaultValues.edition;
oracledb.events = defaultValues.events;
});
after(function(done) {
oracledb.fetchAsString = [];
connection.execute(
"DROP table " + tableName + " PURGE",
function(err) {
should.not.exist(err);
done();
}
);
});
after(function(done) {
oracledb.fetchAsString = [];
connection.execute(
"DROP table " + tableName + " PURGE",
function(err) {
should.not.exist(err);
done();
}
);
});
before('save the default values', function() {
defaultValues.poolMin = oracledb.poolMin;
defaultValues.poolMax = oracledb.poolMax;
defaultValues.poolIncrement = oracledb.poolIncrement;
defaultValues.poolTimeout = oracledb.poolTimeout;
defaultValues.maxRows = oracledb.maxRows;
defaultValues.fetchArraySize = oracledb.fetchArraySize;
defaultValues.autoCommit = oracledb.autoCommit;
defaultValues.connectionClass = oracledb.connectionClass;
defaultValues.externalAuth = oracledb.externalAuth;
defaultValues.fetchAsString = oracledb.fetchAsString;
defaultValues.outFormat = oracledb.outFormat;
defaultValues.lobPrefetchSize = oracledb.lobPrefetchSize;
defaultValues.queueTimeout = oracledb.queueTimeout;
defaultValues.stmtCacheSize = oracledb.stmtCacheSize;
defaultValues.poolPingInterval = oracledb.poolPingInterval;
defaultValues.fetchAsBuffer = oracledb.fetchAsBuffer;
defaultValues.edition = oracledb.edition;
defaultValues.events = oracledb.events;
});
function(cb) {
var defaultValue = [];
(oracledb.fetchAsString).should.eql(defaultValue);
cb();
}
], done);