loopback-datasource-juggler/test
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
..
async-observer.test.js ModelBaseClass: implement async observe/notify 2015-01-29 08:43:50 +01:00
basic-querying.test.js Tweak the model names used by tests to avoid mssql conflicts 2014-08-25 22:17:51 -07:00
common.batch.js Added datatypes tests 2013-04-06 14:34:16 +04:00
common_test.js add a flag to callback of findOrCreate to indicate find or create 2014-12-25 22:19:15 +08:00
datatype.test.js Don't coerce nested objects into Model instances 2015-01-08 15:34:04 +01:00
default-scope.test.js fix default include in default scope fails findById 2014-12-11 15:14:35 +08:00
defaults.test.js Don't apply defaults when fields are specified 2014-10-19 18:47:27 +02:00
events.js Add tests for change / delete events 2014-01-29 11:03:04 -08:00
geo.test.js Fix the floating number comparison 2015-01-05 10:53:26 -08:00
hooks.test.js Intent-based hooks for persistence 2015-01-29 08:43:52 +01:00
include.test.js Add support for multiple includes that use relation syntax 2014-11-04 20:45:25 -08:00
init.js Implemented Transient connector 2014-08-30 10:53:10 +02:00
introspection.test.js Tidy up model building from data sources 2014-09-12 14:25:35 -07:00
json.test.js Reformat the code 2014-01-24 09:09:53 -08:00
loopback-data.test.js Reformat the code 2014-01-24 09:09:53 -08:00
loopback-dl.test.js Extract mergeQuery and setScopeValuesFromWhere 2014-10-09 18:13:40 +02:00
manipulation.test.js Include property value in the error message 2015-01-12 17:12:18 +01:00
memory.test.js Intent-based hooks for persistence 2015-01-29 08:43:52 +01:00
mixins.test.js Add ability to apply a plugin multiple times from LDL 2014-08-17 12:29:04 +02:00
model-definition.test.js fix id properties should sort by its index 2015-01-21 20:16:34 +08:00
performance.coffee Reformat the code 2014-01-24 09:09:53 -08:00
persistence-hooks.suite.js Intent-based hooks for persistence 2015-01-29 08:43:52 +01:00
relations.test.js Supply target to applyProperties function 2015-01-26 19:09:29 +01:00
schema.test.js Reformat the code 2014-01-24 09:09:53 -08:00
scope.test.js Add hint, minor cleanup 2014-08-30 21:08:23 +02:00
spec_helper.js Reformat the code 2014-01-24 09:09:53 -08:00
test1-schemas.json Reformat the code 2014-01-24 09:09:53 -08:00
test2-schemas.json Reformat the code 2014-01-24 09:09:53 -08:00
transient.test.js Remove legacy Schema references 2014-09-04 18:01:04 +02:00
util.test.js Add strict flag to sortObjectsByIds 2014-08-15 19:47:12 +02:00
validations.test.js Fixed nullCheck in validations to correct behavior when dealing with undefined attributes 2015-01-27 22:18:47 +00:00