How to use the rethinkdb.dbDrop function in rethinkdb

To help you get started, we’ve selected a few rethinkdb 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 pixelhandler / ember-app-builder / server / bin / create_blog_db.js View on Github external
function (callback) {
      r.dbDrop(name).run(conn, function (err, result) {
        callback();
      });
    },
    // create blog dB
github rethinkdb / horizon / cli / src / migrate.js View on Github external
}).then(() => {
    // delete project_internal
    green(` └── Deleting empty "${project}_internal" database`);
    return r.dbDrop(`${project}_internal`).run(this.conn);
  });
}
github outmoded / penseur / test / db.js View on Github external
it('creates new database (complex tables pre-loaded)', async () => {

            const prep = new Penseur.Db('penseurtest');
            await prep.connect();
            await RethinkDB.dbDrop('penseurtest').run(prep._connection);
            await prep.close();

            const db = new Penseur.Db('penseurtest');
            db.table({ test: { id: 'increment' } });

            await db.establish(['test']);
            await db.close();
        });
github outmoded / penseur / test / db.js View on Github external
it('creates new database', async () => {

            const db = new Penseur.Db('penseurtest');
            await db.connect();
            await RethinkDB.dbDrop(db.name).run(db._connection);

            await db.establish({ test: { secondary: 'other' } });
            const result = await RethinkDB.db(db.name).table('test').indexList().run(db._connection);
            expect(result).to.equal(['other']);
            await db.close();
        });
github thejsj / rethinkdb-proxy / test / utils.js View on Github external
return r.connect().then((conn) => {
      return r.dbDrop(dbName).run(conn)
        .finally(() => conn.close());
    });
  };
github davidgljay / nametag / server / src / demo / wipedb.js View on Github external
.then(conn => {
    console.log('Connected to demo DB')
    return r.branch(r.dbList().contains('demo'), r.dbDrop('demo'), null).run(conn)
    .then(() => r.dbCreate('demo').run(conn))
    .then(() => {
      console.log('DB Wiped')
      process.exit()
    })
  })
github ktbartholomew / tic-tac-toe / db-schema / index.js View on Github external
.then(function (dbs) {
    if(dbs.indexOf('test') !== -1) {
      console.log('Deleting DB test');
      return r.dbDrop('test').run(Connection);
    }

    return dbs;
  })
  .then(function () {
github ElevenGiants / eleven-server / bench / suites / data / pbe / rethink.js View on Github external
suite.on('complete', function() {
	rdb.dbDrop(CFG.dbname).run(conn, function cb(err, res) {
		if (err) throw err;
		pbe.close(function cb(err, res) {
			if (err) throw err;
		});
	});
});
github neumino / chateau / routes / api.js View on Github external
exports.databaseDelete = function (req, res) {
        var d = req.body;
        r.dbDrop(d.db).run( connection, {timeFormat: 'raw'}, function(error, result) {
            if (error) handleError(error);
            res.json({
                error: error,
                result: result
            });
        })
    }
    exports.tableDelete = function (req, res) {
github codehangar / reqlpro / app / services / rethinkdb.service.js View on Github external
return new Promise(function(resolve, reject) {
    r.dbDrop(dbName).run(conn, function(err, results) {
      if (err) {
        reject(err);
      } else {
        resolve();
      }
    });
  });
};

rethinkdb

This package provides the JavaScript driver library for the RethinkDB database server for use in your node application.

Unknown
Latest version published 4 years ago

Package Health Score

61 / 100
Full package analysis