UNPKG

formalize

Version:

Node.js NoSQL ActiveRecord ORM layer for FoundationDB

15 lines (11 loc) 329 B
ActiveSchema = require('./schema') module.exports = (options) -> class BaseRecord extends ActiveSchema(options) constructor: (id) -> @changed = [] @isLoaded = false @isNew = true @id = id if typeof id isnt 'undefined' set: (key, val) -> dest = super(key, val) @changed.push(dest)