How to use the oracledb.stmtCacheSize function in oracledb

To help you get started, we’ve selected a few oracledb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oracle / node-oracledb / test / fetchClobAsString3.js View on Github external
before('get one connection', function(done) {
    oracledb.stmtCacheSize = 0;
    oracledb.getConnection(dbConfig, function(err, conn) {
      should.not.exist(err);
      connection = conn;
      done();
    });
  }); // before
github oracle / node-oracledb / test / fetchBlobAsBuffer3.js View on Github external
before('get one connection', function(done) {
    oracledb.stmtCacheSize = 0;
    oracledb.getConnection(dbConfig, function(err, conn) {
      should.not.exist(err);
      connection = conn;
      done();
    });

  }); // before
github oracle / node-oracledb / test / fetchClobAsString.js View on Github external
before('get one connection', function(done) {
    oracledb.stmtCacheSize = 0;
    oracledb.getConnection(dbConfig, function(err, conn) {
      should.not.exist(err);
      connection = conn;
      done();
    });
  }); // before
github oracle / node-oracledb / test / connection.js View on Github external
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)",
github oracle / node-oracledb / test / fetchBlobAsBuffer1.js View on Github external
function(cb) {
        oracledb.stmtCacheSize = 0;
        oracledb.getConnection(dbConfig, function(err, conn) {
          should.not.exist(err);
          connection = conn;
          cb();
        });
      },
      function(cb) {
github oracle / node-oracledb / test / fetchBlobAsBuffer1.js View on Github external
function(cb) {
        oracledb.stmtCacheSize = defaultStmtCache;
        connection.release(function(err) {
          should.not.exist(err);
          cb();
        });
      },
      function(cb) {
github oracle / node-oracledb / test / fetchBlobAsBuffer2.js View on Github external
"    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);
github oracle / node-oracledb / test / fetchClobAsString2.js View on Github external
function(cb) {
        oracledb.stmtCacheSize = 0;
        oracledb.getConnection(dbConfig, function(err, conn) {
          should.not.exist(err);
          connection = conn;
          cb();
        });
      },
      function(cb) {
github oracle / node-oracledb / test / fetchClobAsString2.js View on Github external
"        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);
github oracle / node-oracledb / test / fetchBlobAsBuffer2.js View on Github external
function(cb) {
        oracledb.stmtCacheSize = 0;
        oracledb.getConnection(dbConfig, function(err, conn) {
          should.not.exist(err);
          connection = conn;
          cb();
        });
      },
      function(cb) {