Sha256: 2de71aaf31f7c69082b06d25f3565b8bc0f8bd6ee92cdbbb77ab9b680920b6c8

Contents?: true

Size: 881 Bytes

Versions: 12

Compression:

Stored size: 881 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

12 entries across 12 versions & 1 rubygems

Version Path
ende-0.5.1 components/indefinido/indemma/master/src/lib/record/queryable.coffee
ende-0.4.18 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.17 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.16 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.15 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.14 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.13 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.12 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.11 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.10 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.9 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee
ende-0.4.8 vendor/components/indefinido-indemma/src/lib/record/queryable.coffee