UNPKG

reshine

Version:

Let's take the sunshine path with RethinkDB

13 lines (9 loc) 303 B
import r from 'rethinkdb'; import exists from './exists'; export default tableName => dbName => connection => exists(tableName)(dbName)(connection).then(doesExist => { if (!doesExist) { return r.db(dbName).tableCreate(tableName).run(connection); } return Promise.resolve(); });