- Rename `flush` to `deleteAll`
- Add `delete`
- Detect `delete/deleteAll` before running downstream test suites
- Fall back to unoptimized `deleteAll` when connector does not support
`deleteAll` but supports `delete`
- Return 501 for connectors not supporting `delete` or `deleteAll`
- canExpire
- canQueryTtl
- ttlPrecision
- canIterateKeys
- canIterateLargeKeySets
These options allow connectors to disable shared tests for features
that are not supported/implemented.
Forwardport of #1074. #1072 was missing Promise.resolve before using
delay(20) and causing Travis to fail on 2.x. This PR makes the test code
consistent on both master and 2.x.
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);