Sha256: bee23ac570e8232d659deecd69f9e87f53368996e279ae3c7c110e986dac768d

Contents?: true

Size: 877 Bytes

Versions: 8

Compression:

Stored size: 877 Bytes

Contents

extend   = require 'assimilate'
storable = require './storable'
# merge    = extend.withStrategy 'deep'
stampit  = require '../../vendor/stampit'

queryable =
  # FIXME don't let everyone use the same storage instance! or let it?
  storage: storable()
  find: (key) ->
    throw new TypeError "InvalidFind: resource.find was called with a falsey value" unless key
    @storage.store key
  every: -> @storage.values()
  where: ->
    throw new Error 'queryable.where: Not implemented yet'

# Extend indemma
# TODO use stampit to extend record and model
model  = window.model      # TODO better way to get parent
record = window.record     # TODO better way to get parent

# queryable = stampit.compose queryable, storable


model.queryable = true
module.exports = queryable

model.mix (modelable) ->
  # TODO use stampit to extend record and model
  extend modelable, queryable

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ende-0.4.25 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.24 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.23 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.22 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.21 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.5.0 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.20 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.19 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee