Skip to content

Commit 8e7ed6b

Browse files
committed
add del example
1 parent f8f15cc commit 8e7ed6b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ server.js
1313

1414
var derbyHook = require('derby-hook');
1515

16-
// Add 'hook' function in the store
16+
// Add 'hook' and 'onQuery' functions to the store
1717
derbyHook(store);
1818

1919
// ...
@@ -38,5 +38,14 @@ then you can use the function to hook model events, for example:
3838
// ....
3939

4040
});
41+
42+
store.hook('del', 'todos', function(docId, value, session, backend) {
43+
model = store.createModel();
44+
45+
// ....
46+
47+
});
48+
49+
4150
```
4251

0 commit comments

Comments
 (0)