UNPKG

rethinkdbdash

Version:

A Node.js driver for RethinkDB with promises and a connection pool

22 lines (18 loc) 454 B
var Table = require(__dirname+"/table.js"); function Database(name) { this.name = name; this.tables = {}; } Database.prototype.table = function(name) { return this.tables[name]; } Database.prototype.tableDrop = function(name) { delete this.tables[name]; } Database.prototype.tableCreate = function(name) { this.tables[name] = new Table(name) } Database.prototype.typeOf = function() { return "DB"; } module.exports = Database;