Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Update for the new setDefaults method and light edits on text.
  • Loading branch information
Pyreweb authored Aug 31, 2016
1 parent 384dae5 commit a1ca96c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,17 @@ myFakeCollection = {

`setTrigger`: toggle the triggerSync var which decide if we send events.

`setDefaults`: toggle the autoDefaults var which decide if we try to use default field data if field data is null.

`setAll`: parameters -> collection, data, trigger. Call the `setCollection` and `setData`. Trigger params (**boolean**) optionnal
##Actions
`insertAll`:
* insert all the given datas within a transaction.
* If something fails, nothing should be inserted.
* If something fails, nothing *should be* inserted (db rollback).

`updateAll`:
* update all the given datas within a transaction.
* If something fails, nothing should be updated.
* If something fails, nothing *should be* updated (db rollback).
* *Use the idAttribute to update.*

`deleteAll`:
Expand All @@ -111,4 +113,4 @@ myFakeCollection = {
##Remarks
If no **idAttribute** is set for the collection, it try to use `alloy_id` on the `updateAll` and `deleteAll` methods. On the `inserAll`method, it ignore datas set on `alloy_id`.

If you require the lib multiple times, it keeps the setted vars from last instance. I'll maybe do something about this.
If you require the lib multiple times, it keeps the setted vars from last instance. I'll maybe should do something about this.

0 comments on commit a1ca96c

Please sign in to comment.