Sha256: a03f151e2516233340e4f7e3e90fad6372cc62f0895c20d1d9514131fcc7049b

Contents?: true

Size: 711 Bytes

Versions: 20

Compression:

Stored size: 711 Bytes

Contents

var extend, model, queryable, record, stampit, storable;

extend = require('assimilate');

storable = require('./storable');

stampit = require('../../vendor/stampit');

queryable = {
  storage: storable(),
  find: function(key) {
    if (!key) {
      throw new TypeError("InvalidFind: resource.find was called with a falsey value");
    }
    return this.storage.store(key);
  },
  every: function() {
    return this.storage.values();
  },
  where: function() {
    throw new Error('queryable.where: Not implemented yet');
  }
};

model = window.model;

record = window.record;

model.queryable = true;

module.exports = queryable;

model.mix(function(modelable) {
  return extend(modelable, queryable);
});

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ende-0.4.25 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.24 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.23 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.5.1 components/indefinido/indemma/master/lib/record/queryable.js
ende-0.4.22 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.21 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.5.0 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.20 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.19 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.18 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.17 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.16 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.15 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.14 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.13 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.12 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.11 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.10 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.9 vendor/components/indefinido-indemma/lib/record/queryable.js
ende-0.4.8 vendor/components/indefinido-indemma/lib/record/queryable.js