diff --git a/docs/tutorial/actions.md b/docs/tutorial/actions.md index f7b80c72..852ecfd2 100644 --- a/docs/tutorial/actions.md +++ b/docs/tutorial/actions.md @@ -3,11 +3,13 @@ You can register methods as pre- or post- actions for document events. Currently supported events: + - Insert - Replace +- Update - SaveChanges +- Delete - ValidateOnSave -- Update Currently supported directions: @@ -15,12 +17,14 @@ Currently supported directions: - `After` Current operations creating events: + - `insert()` for Insert -- `replace()` Replace -- `save()` triggers Insert if it is creating a new document, triggers Replace it replaces existing document. +- `replace()` for Replace +- `save()` triggers Insert if it is creating a new document, triggers Replace if it replaces an existing document - `save_changes()` for SaveChanges - `insert()`, `replace()`, `save_changes()`, and `save()` for ValidateOnSave - `set()`, `update()` for Update +- `delete()` for Delete To register an action, you can use `@before_event` and `@after_event` decorators respectively: