Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

east-rethink

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

east-rethink - npm Package Compare versions

Comparing version 0.5.0 to 1.0.0

.eslintignore

41

lib/adapter.js

@@ -6,2 +6,3 @@ 'use strict';

const Path = require('path');
const Util = require('./util');

@@ -17,3 +18,4 @@ const Adapter = function (params) {

this.params.configure = (cb) => cb(null, params.database);
} else {
}
else {
this.params.configure = this.params.database;

@@ -42,3 +44,3 @@ }

});
}
};

@@ -59,16 +61,16 @@ Adapter.prototype.connect = function (callback) {

this.db.table(self.params.tables);
this.db.connect( (err) => {
const callbackified = Util.callbackify(() => {
return this.db.connect().then(() => {
return this.db.establish({ [tableName]: { purge: false } });
});
});
callbackified((err) => {
if (err) {
return callback(err);
}
this.db.establish({ [tableName]: { purge: false } }, (err) => {
if (err) {
return callback(err);
}
return callback(null, { db: self.db });
});
return callback(null, { db: self.db });
});

@@ -80,3 +82,3 @@ });

this.db.close(() => {
Util.callbackify(this.db.close.bind(this.db))(() => {

@@ -92,3 +94,4 @@ return callback();

this.db[tableName].query({}, (err, migrations) => {
const table = this.db[tableName];
Util.callbackify(table.query.bind(table))({}, (err, migrations) => {

@@ -115,4 +118,7 @@ if (err) {

this.db[tableName].insert({ name: name, created: Date.now() }, (err, id) => {
const table = this.db[tableName];
const insert = Util.callbackify(table.insert.bind(table));
insert({ name, created: Date.now() }, (err, id) => {
if (err) {

@@ -131,4 +137,7 @@ return callback(err);

this.db[tableName].remove({ name: name }, (err) => {
const table = this.db[tableName];
const remove = Util.callbackify(table.remove.bind(table));
remove({ name }, (err) => {
if (err) {

@@ -135,0 +144,0 @@ return callback(err);

{
"name": "east-rethink",
"description": "rethinkdb adapter for \"east\" (node.js database migration tool)",
"version": "0.5.0",
"version": "1.0.0",
"repository": {

@@ -17,7 +17,10 @@ "type": "git",

"dependencies": {
"penseur": "7.x.x"
"hoek": "5.x.x",
"penseur": "8.x.x"
},
"devDependencies": {
"eslint-config-google": "^0.3.0"
"eslint": "^4.18.1",
"eslint-config-hapi": "^11.1.0",
"eslint-plugin-hapi": "^4.1.0"
}
}
# east rethink
rethinkdb adapter for [east](https://github.com/okv/east) (node.js database migration tool) which uses
rethinkdb adapter for [east](https://github.com/okv/east) (node.js database migration tool) which uses
[pensuer](https://github.com/hueniverse/penseur)

@@ -47,3 +47,3 @@

where
where
* `tables` is an array of the tables you wish to connect to in your database.

@@ -80,8 +80,5 @@ * `database` is a json object with the following properties: `name` - database name, `migrationTable` - migration table name (optional - defaults to 'migration'), `connection` - a json object with `host` and `port` providing the host name and port number for your database respectively.

var db = client.db;
db.card.insert( { id: 1, type: 'apple', color: 'red' }, (err, results) => {
if (err) return done(err);
return done(null);
});
db.card.insert( { id: 'red-apple', type: 'apple', color: 'red' })
.then(() => done(null), done);
};

@@ -92,8 +89,4 @@

db.card.remove({ id: 1 }, (err) => {
if (err) return done(err);
return done(null);
});
db.card.remove({ id: 1 })
.then(() => done(null), done);
};

@@ -107,8 +100,4 @@ ```

var db = client.db;
db.card.insert( { id: 2, type: 'banana', color: 'yellow' }, (err, results) => {
if (err) return done(err);
return done(null);
});
db.card.insert( { id: 2, type: 'banana', color: 'yellow' })
.then(() => done(null), done);
};

@@ -181,2 +170,2 @@

run [east](https://github.com/okv/east#running-test) tests with this adapter
run [east](https://github.com/okv/east#running-test) tests with this adapter
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc