Simon Ho
65d6d6a508
Backport ESLint from master
2016-05-20 17:35:23 +02:00
Miroslav Bajtoš
289eac7565
eslint config 2.0 + remove extra empty lines
...
Upgrade eslint-config-loopback to ^2.0.0.
Remove extra empty lines to make `npm run lint` pass again.
[back-port of #909 ]
2016-04-19 17:06:04 +02:00
Miroslav Bajtoš
a5187765f6
Run `eslint --fix` with config from master
2016-04-18 16:00:04 +02:00
Miroslav Bajtoš
093a69328c
Insert copyright headers
2016-04-06 16:51:49 +02:00
Amir Jafarian
81abac19f3
Fix Mongo compatibility issue
...
*Fix Mongo compatibility issue for replaceOrCreate
2016-03-30 11:26:35 -04:00
Amir Jafarian
3bc2dacb1b
Implement `findOrCreate` for memory connector
2016-01-20 11:51:47 -08:00
Michael Diguet
d8678a1f03
Correction of a regression introduced by commit 632898b: when querying an empty array ([]) with a 'neq' filter, there were no matching.
2015-11-23 17:09:24 +01:00
Laurent Villeneuve
cb78c8ef96
Add direct copmarison value for array matching
2015-08-27 23:56:49 -04:00
Laurent Villeneuve
632898b022
Add support for matching array values à la mongo.
2015-08-27 23:32:53 -04:00
Laurent Villeneuve
0381f6d7e7
Support embedded query in memory connector. Fix memory connector bug
...
Adds support for the ability to query embedsMany models from the parent.
Fix a memory connector bug that could occur when having an "or" or "and"
clause combined with another property. In that case, the and would revert
true for 'Paul McCartney'
```
{name:'John Lennon',and: [{role:'lead'}, {vip:true}]}}
```
2015-08-18 15:56:36 -04:00
Simon Ho
e7e074f97b
Do not coerce RegExp objects to strings
...
Queries like `{where: {name: /John.*/i}}` should work. Notice there is no
`regexp` operator (ie. `{where: {name: {regexp: /John.*/i}}}`).
2015-08-13 16:16:48 -07:00
Simon Ho
b8f1598723
Add support for regex operator
2015-07-27 15:11:53 -07:00
Bryan Clark
1066313f3f
use fromDb to deserialize data after save in Memory connector
...
Changes the after `save` callback in the memory connector to use the
`fromDb` method to deserialize the data passed back to upsert and
updateAttributes methods.
2015-07-14 09:08:09 -07:00
Raymond Feng
eb20eebe95
Fix the regression for date conversion
2015-07-03 09:29:26 -07:00
Raymond Feng
4206088fbc
Fix the regexp value for like/nlike
2015-07-02 23:22:36 -07:00
Pradnya Baviskar
e7430184a9
Promisify 'autoupdate'
2015-06-23 18:02:08 +05:30
Pradnya Baviskar
f4f13a6626
Promisify 'automigrate'
2015-06-16 12:58:21 +05:30
Raymond Feng
506223885d
Mix in observer apis to the connector
2015-05-20 15:02:44 -07:00
Raymond Feng
5ef444e45d
Conditionally pass options to connector CRUD methods
2015-05-13 09:36:45 -07:00
Raymond Feng
137d096cfb
Allow nesting properties to be queried for memory connector
...
See https://github.com/strongloop/loopback/issues/517
2015-03-27 16:05:12 -07:00
Daniel B. Vasquez
3de94cb9bd
add tests for between in memory connector
2015-03-16 18:26:33 +01:00
Clark Wang
0bef56efc0
support optimized findOrCreate
...
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
remove undefined for creating data in findOrCreate
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
getLastGeneratedUid instead of force an id
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2015-02-07 10:23:04 +08:00
Raymond Feng
4afb2385a9
Fix id type issue for update
...
https://github.com/strongloop/loopback/issues/1058
2015-02-02 08:44:36 -08:00
Miroslav Bajtoš
1fd6eff10f
Intent-based hooks for persistence
...
This patch introduces a new API for "intent-based" hooks. These hooks
are not tied to a particular method (e.g. "find" or "update"). Instead,
they are triggered from all methods that execute a particular "intent".
The consumer API is very simple, there is a new method
Model.observe(name, observer), where the observer is function
observer(context, callback).
Observers are inherited by child models and it is possible to register
multiple observers for the same hook.
List of hooks:
- query
- before save
- after save
- after delete
2015-01-29 08:43:52 +01:00
Raymond Feng
8dfe877639
Remove console.log
2015-01-14 11:51:47 -08:00
Christian Vette
99acd364d2
added test for sorting undefined values
2015-01-05 21:56:17 +01:00
Raymond Feng
455743167a
Fix the automigrate issue
...
See https://github.com/strongloop/loopback-example-relations-basic/issues/6
2014-10-16 12:04:16 -07:00
Fabien Franzen
8352ed3afc
Implemented collection setting for Memory connector
2014-10-09 18:13:57 +02:00
Raymond Feng
6020436063
Added a test case for neq
2014-09-02 08:36:37 -07:00
Raymond Feng
e9f00fbd8b
Add neq operator support for memory connector
...
See https://github.com/strongloop/loopback-datasource-juggler/issues/265
2014-08-29 08:45:45 -07:00
Raymond Feng
e0c7619908
Normalize filter.order and enforce more checks
2014-06-26 23:40:20 -07:00
Raymond Feng
b07c36eab7
Use async for flow control
2014-06-20 12:05:42 -07:00
Raymond Feng
a487eb57cd
Add like/nlike support for memory connector
2014-06-17 23:19:28 -07:00
Raymond Feng
130dcdb582
Fix the write closure to use the correct task info
2014-01-29 13:41:42 -08:00
Raymond Feng
6b535f5d1c
Add a file option for the memeory connector to persist data
2014-01-29 12:04:09 -08:00