Commit Graph

2399 Commits

Author SHA1 Message Date
Miroslav Bajtoš fce166245f Merge pull request #1076 from strongloop/rm-eslint-from-deps
Remove ESLint from dependencies
2016-09-05 13:37:01 +02:00
Simon Ho 25345d56eb Remove ESLint from dependencies
This a duplicate entry as the correct ESLint configs are already listed
as devDepencies.
2016-09-04 12:20:47 -07:00
Simon Ho 9afaecaada Merge pull request #1077 from strongloop/refactor/ttl-test-suite
Refactor TTL test suite
2016-09-04 12:02:42 -07:00
Simon Ho cf432fceec Refactor TTL test suite 2016-09-03 11:36:28 -07:00
Miroslav Bajtoš b95d5ca182 2.50.0
* test/memory: remove dummy findOrCreate impl (Miroslav Bajtoš)
 * Implement `notify` for find method (Amir Jafarian)
 * kvao: implement key filter (Miroslav Bajtoš)
 * kvao: add iterateKeys() and keys() (Miroslav Bajtoš)
 * Globalize KeyValue Memory connector (Simon Ho)
 * test: Rename KVAO get test suite (Simon Ho)
2016-08-26 10:08:32 +02:00
Miroslav Bajtoš f4302363d3 Merge pull request #1065 from strongloop/cleanup/memory-test-2x
test/memory: remove dummy findOrCreate impl
2016-08-26 10:06:14 +02:00
Miroslav Bajtoš 65c8ec41e0 test/memory: remove dummy findOrCreate impl
Let the operation-hook tests use the real implementation,
now that we have it in place.
2016-08-26 09:53:19 +02:00
Amirali Jafarian 0bd7270f84 Merge pull request #1061 from strongloop/notify_find_2.x
Implement notify for find method [2.x]
2016-08-23 19:41:53 -04:00
Amir Jafarian a1a9bac9ba Implement `notify` for find method 2016-08-23 19:00:50 -04:00
Simon Ho de84a8bc7d Merge pull request #1057 from strongloop/backport/globalize-kv-mem-connector
Globalize KeyValue Memory connector
2016-08-19 12:59:31 -07:00
Miroslav Bajtoš 4f76475ee9 Merge pull request #1058 from strongloop/feature/kvao-iterate-keys-2x
kvao: add iterateKeys() and keys()
2016-08-18 10:48:10 +02:00
Miroslav Bajtoš ab47ecfbab kvao: implement key filter 2016-08-18 10:30:55 +02:00
Miroslav Bajtoš 24a9a96a26 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 10:30:53 +02:00
Simon Ho 873cb4eab6 Globalize KeyValue Memory connector
[back-port of #1056]
2016-08-17 18:54:30 -07:00
Simon Ho 2c1a056ade Merge pull request #1054 from strongloop/backport/rename-get-test-suite
Rename KVAO get test suite
2016-08-16 13:43:29 -07:00
Simon Ho 5001a98135 test: Rename KVAO get test suite
[back-port of #2591]
2016-08-16 09:47:23 -07:00
Miroslav Bajtoš 2fb6a96d77 2.49.0
* Fix error message for missing global.Promise (Miroslav Bajtoš)
 * Add TTL for KeyValue related features (Simon Ho)
 * test/kvao: setup global.Promise on Node v0.10 (Miroslav Bajtoš)
 * kv-memory: fix crash in regular cleanup (Miroslav Bajtoš)
 * Backport globalization (Amir Jafarian)
2016-08-16 16:36:13 +02:00
Miroslav Bajtoš 6d4e0513a7 Merge pull request #1051 from strongloop/fix/promise-error-message
Fix error message for missing global.Promise
2016-08-16 14:44:46 +02:00
Miroslav Bajtoš f7cfe25b60 Fix error message for missing global.Promise 2016-08-16 14:38:01 +02:00
Miroslav Bajtoš df4a3643eb Merge pull request #1044 from strongloop/fix/kvao-promise
test/kvao: setup global.Promise on Node v0.10 [2.x only]
2016-08-15 14:05:20 +02:00
Simon Ho 27efed9c5f Merge pull request #1046 from strongloop/backport/ttl
Add TTL for KeyValue related features
2016-08-12 17:23:53 -07:00
Simon Ho 421597c998 Add TTL for KeyValue related features
Backport of strongloop/loopback-datasource-juggler#1030
2016-08-12 14:49:01 -07: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š d8d89bea9d Merge pull request #1041 from strongloop/fix/kv-reference-error-2x
kv-memory: fix crash in regular cleanup [2.x]
2016-08-10 14:32:08 +02:00
Miroslav Bajtoš 1750583a15 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-10 14:19:05 +02:00
Amir-61 5a20ea1a08 Merge pull request #1029 from strongloop/backport-globalization
Backport globalization
2016-08-10 00:09:56 -04:00
Amir Jafarian 9da0e501da Backport globalization
Backport loopback-datasource-juggler#1022,
loopback-datasource-juggler#1024,
loopback-datasource-juggler#1026
2016-08-09 21:52:11 -04:00
Amir Jafarian b4d2d19ac6 2.48.0
* Return error if connector does not implement (Amir Jafarian)
 * kvao: return 404 when expiring unknown key (Miroslav Bajtoš)
 * Update doc for `validatesFormatOf` (Amir Jafarian)
 * Implement KeyValue API and memory connector (Miroslav Bajtoš)
 * Fix test case typo (Amir Jafarian)
 * Remove unused variables in model.js (Amir Jafarian)
 * Add test for updateOrCreate (Amir Jafarian)
 * Declare `definition` (Amir Jafarian)
 * Add test to catch invalid date property (Supasate Choochaisri)
2016-08-09 18:43:11 -04:00
Amir-61 a8a105c3ee Merge pull request #1040 from strongloop/err_connector_not_implemented_replaceById_2.x
Return error if connector does not implement
2016-08-09 18:34:51 -04:00
Amir Jafarian 1b266bcf00 Return error if connector does not implement
* Return error if connector does not implement replaceById
* This patch is without globalization

Backport loopback-datasource-juggler#1034
2016-08-09 14:44:06 -04:00
Miroslav Bajtoš 72b3179da1 Merge pull request #1037 from strongloop/fix/kvao-expire-error-status-code-2x
KeyValueAccessObject: return 404 when expiring unknown key
2016-08-09 11:09:29 +02:00
Miroslav Bajtoš 8013b6acd4 kvao: return 404 when expiring unknown key 2016-08-09 10:47:12 +02:00
Amir-61 0dee7fbec7 Merge pull request #1032 from strongloop/update_doc
Update doc for `validatesFormatOf`
2016-08-08 10:51:04 -04:00
Amir Jafarian 9557558c8f Update doc for `validatesFormatOf` 2016-08-08 10:46:47 -04:00
Miroslav Bajtoš 7f277b2563 Merge pull request #1031 from strongloop/kv-memory-2x
Implement KeyValue API and memory connector [2.x]
2016-08-08 15:12:46 +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
Amir-61 8a07627c81 Merge pull request #1018 from strongloop/fix_test_type_2.x
Fix test typo[2.x]
2016-07-24 09:10:36 -04:00
Amir Jafarian 5a594d4855 Fix test case typo
Backport loopback-datasource-juggler#1016
2016-07-24 09:05:33 -04:00
Amir-61 fc2c429963 Merge pull request #1011 from strongloop/remove_unused_vars_2.x
Remove unused variables in model.js [2.x]
2016-07-23 20:11:25 -04:00
Amir Jafarian a96a8f379a Remove unused variables in model.js
Backport loopback-datasource-juggler#1010
2016-07-23 16:56:16 -04:00
Amir-61 fa65094583 Merge pull request #1012 from strongloop/Add_test_for_updateOrCreate_2.x
Add test for updateOrCreate[2.x]
2016-07-23 15:01:50 -04:00
Amir-61 1615caca9d Merge pull request #1013 from strongloop/Declare_definition_2.x
Declare definition[2.x]
2016-07-23 13:19:24 -04:00
Amir Jafarian 6efd00698b Add test for updateOrCreate
* Add test for updateOrCreate when id is not autogenerated Id
Backport loopback-datasource-juggler#989
2016-07-23 11:25:38 -04:00
Amir Jafarian 69cc091ef4 Declare `definition`
* Declare `definition` in `BelongsTo.prototype.destroy`
Backport loopback-datasource-juggler#1009
2016-07-23 11:24:34 -04:00
Supasate Choochaisri f1a70094fa Add test to catch invalid date property
Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
See https://github.com/strongloop/loopback-datasource-juggler/pull/1000
2016-07-15 10:47:44 -07:00
Miroslav Bajtoš 4e5ae72eef 2.47.0
* Ensure stable order of items in DAO.find() (Miroslav Bajtoš)
 * give options to validators #984 (RobinBiondi)
 * Update datasource.js (Amir Jafarian)
 * Give warning if PK is changed in hooks (Amir Jafarian)
 * Persist changes on parent for embedsOne (Dimitris Halatsis)
2016-07-14 14:02:12 +02:00
Miroslav Bajtoš 8173a4306c Merge pull request #999 from strongloop/fix/order-in-find-2.x
Ensure stable order of items in DAO.find() [2.x]
2016-07-14 14:01:14 +02:00
Miroslav Bajtoš ebcb5a0546 Ensure stable order of items in DAO.find()
When post-processing result of find operation, use "async.map"
instead of "async.each + array.push" to ensure the order of items
is preserved.
2016-07-13 15:25:34 +02:00
Raymond Feng 6736d72b98 Merge pull request #986 from robinbiondi/postgresConcurency
Fix #984 Give request options(ex: transactions) to validators
2016-06-24 14:42:50 -07:00
RobinBiondi 35f14c38dc give options to validators #984 2016-06-24 22:04:35 +02:00