UNPKG

reshine

Version:

Let's take the sunshine path with RethinkDB

13 lines (9 loc) 352 B
import r from 'rethinkdb'; const filter = toFilter => tableName => dbName => connection => r.db(dbName) .table(tableName) .filter(toFilter) .run(connection); filter.toArray = toFilter => tableName => dbName => connection => filter(toFilter)(tableName)(dbName)(connection).then(filtered => filtered.toArray()); export default filter;