Permalink
Browse files

Rename table to records

  • Loading branch information...
1 parent 6628098 commit e110703f93265dc70d2a335d6e22053c89c3d493 @wdavidw committed Mar 2, 2012
Showing with 9 additions and 9 deletions.
  1. +2 −2 index.js
  2. +2 −2 lib/Client.coffee
  3. +3 −3 lib/{Table.coffee → Records.coffee}
  4. +2 −2 test/define.coffee
View
@@ -3,12 +3,12 @@ require('coffee-script');
var Client = require('./lib/Client');
-var Table = require('./lib/Table');
+var Records = require('./lib/Records');
module.exports = function(options){
return new Client(options);
};
module.exports.Client = Client;
-module.exports.Table = Table;
+module.exports.Records = Records;
View
@@ -1,7 +1,7 @@
crypto = require('crypto')
redis = require('redis')
-Table = require('./Table')
+Records = require('./Records')
module.exports = class Client
@@ -18,7 +18,7 @@ module.exports = class Client
define: (options) ->
name = if typeof options is 'string' then options else options.name
- @records[name] = new Table @, options
+ @records[name] = new Records @, options
get: (type) ->
@records[type]
@@ -3,8 +3,8 @@ isEmail = (email) ->
/^[a-z0-9,!#\$%&'\*\+\/\=\?\^_`\{\|}~\-]+(\.[a-z0-9,!#\$%&'\*\+\/\=\?\^_`\{\|}~\-]+)*@[a-z0-9\-]+(\.[a-z0-9\-]+)*\.([a-z]{2,})$/.test(email)
###
-Table
-=====
+Records
+=======
Implement object based storage with indexing support.
@@ -37,7 +37,7 @@ associated value is a set containing all the identifiers of the records whose pr
match the indexed value.
###
-module.exports = class Table
+module.exports = class Records
# redis = null
_ron = null
View
@@ -9,15 +9,15 @@ describe 'define', ->
it 'Define # new schema # string', (next) ->
client = ron config
user = client.define 'user'
- user.should.be.instanceof ron.Table
+ user.should.be.instanceof ron.Records
user.should.eql client.get 'user'
client.quit next
it 'Define # new schema # object', (next) ->
client = ron config
user = client.define name: 'user'
user.should.eql client.get 'user'
- user.should.be.instanceof ron.Table
+ user.should.be.instanceof ron.Records
client.quit next
it 'Define # identifier', (next) ->

0 comments on commit e110703

Please sign in to comment.