Saves a commit for the current query.
This function requires that the query makes a change, and that commit history has been enabled for the relevant scope.
Use commit(..) only for collection structural changes like set-up or migration scripts. It is not intended for routine “normal” operations that your application performs during its regular runtime.
Use the history() function to view the commits in the history log.
This function does not generate a change.
commit(message)
| Argument | Type | Description |
|---|---|---|
| message | str | The commit message. |
The value nil.
This code creates a commit:
commit('Adds type "T"');
new_type('T');
Return value in JSON format
"T"