Diana Lau
251ced811b
Update copyright year and CODEOWNERS ( #1818 )
...
* chore: update CODEOWNERS
* chore: update copyright years
2020-01-21 13:12:14 -05:00
Miroslav Bajtoš
1b7858a857
chore: update eslint to 6.x
...
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-12-03 10:09:16 +01:00
Agnes Lin
de4718d5b8
chore: update copyrights years ( #1737 )
2019-05-08 11:45:37 -04:00
Miroslav Bajtoš
9e0f624ad5
manually fix remaining problems
2018-12-07 16:46:15 +01:00
Miroslav Bajtoš
422ec9ad4f
autofix eslint errors
2018-12-07 16:46:15 +01:00
Miroslav Bajtoš
84322d07a9
Update eslint-config-loopback to latest
2018-12-07 16:22:59 +01:00
Miroslav Bajtoš
7d50f6130b
Upgrade eslint-config-loopback + fix formatting
...
The new version of our config enabled function-paren-newline rule,
this commit fixes the codebase to use more consistent handling
of newlines when calling functions.
2018-07-16 08:46:25 +02:00
Miroslav Bajtoš
d809260799
Upgrade eslint-config, fix new violations
2017-02-01 12:45:56 +01:00
Simon Ho
2320df1227
Refactor flush to deleteAll
...
- 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`
2017-01-09 14:53:34 -08:00
Simon Ho
f38709b7cb
Add flush operation to KVAO
...
Used to delete all keys (and values) associated to the current model.
2016-12-30 18:06:36 -08:00
Simon Ho
96cd8ff56b
Remove expired item before executing expire
...
The expire feature is falsely returning 204 instead of 404 because it is
not removing expired items before execution.
2016-09-01 21:18:40 -07:00
Simon Ho
5b46484277
Merge pull request #1056 from strongloop/globalize-kv-mem-connector
...
Globalize KeyValue Memory connector
2016-08-19 12:58:31 -07:00
Miroslav Bajtoš
3b653a192b
kvao: implement key filter
2016-08-18 09:59:56 +02:00
Miroslav Bajtoš
01ce7df60f
kvao: add iterateKeys() and keys()
...
Add a core implementation of KVAO.iterateKeys() which returns an
AsyncIterator, inspired by
- https://github.com/tc39/proposal-async-iteration
- https://www.npmjs.com/package/async-iterators
This way we can safely iterate even large sets of data.
Also add KVAO.keys(), a sugar API converting the result of iterateKeys()
into a single array.
2016-08-18 09:59:56 +02:00
Simon Ho
8b28cb3993
Globalize KeyValue Memory connector
2016-08-17 18:22:17 -07:00
Simon Ho
1c20cc83aa
Add TTL for KeyValue related features
2016-08-11 17:12:36 -07:00
Miroslav Bajtoš
4978cd8089
kv-memory: fix crash in regular cleanup
...
Fix bug in "_setupRegularCleanup()" where the interval callback
was trying to access an object that has been garbage-collected
in the meantime.
2016-08-09 15:35:23 +02:00
Miroslav Bajtoš
9ced20fdcc
kvao: return 404 when expiring unknown key
2016-08-08 17:22:33 +02:00
Miroslav Bajtoš
f15b4e2c86
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 10:15:34 +02:00