Commit Graph

3 Commits

Author SHA1 Message Date
Miroslav Bajtoš 70a1552df8 test/kvao: add connectorCapabilities options
- canExpire
 - canQueryTtl
 - ttlPrecision
 - canIterateKeys
 - canIterateLargeKeySets

These options allow connectors to disable shared tests for features
that are not supported/implemented.
2016-10-19 12:33:21 +02:00
Miroslav Bajtoš 9d0d41d660 test/kvao: setup global.Promise on Node v0.10
When running the tests on Node v0.10, setup `global.Promise`
with Bluebird implementation. That way we don't have to run
this setup in the test suite of each kv connector.
2016-08-12 16:34:26 +02:00
Miroslav Bajtoš 837f58f82d Implement KeyValue API and memory connector
Models attached to a KeyValue connector get the following *static*
methods:

    Color.set(key, value);
    Color.set(key, value, ttl);
    Color.set(key, value, { ttl: ttl });

    Color.get(key);

    Color.expire(key, ttl);
2016-08-08 14:48:04 +02:00