-
Notifications
You must be signed in to change notification settings - Fork 4
terminusdb.js
Dmytri Kleiner edited this page Oct 28, 2020
·
1 revision
TerminusDB TodoMVC Methods
-
TerminusDB
- ~create(todo)
- ~alter(data)
- ~remove(data)
- ~toggle(data)
- ~clear()
- ~state(callback)
-
~TodoCreated :
Object -
~TodoAlteredTitle :
Object -
~TodoAlteredCompleted :
Object -
~callback :
function
Create Todo
Kind: inner method of TerminusDB
| Param | Type | Description |
|---|---|---|
| todo | TodoCreated |
Todo Created |
Example
create({
id: "doc:todo1",
title: "Taste TerminusDB"
})Alter Todo
Kind: inner method of TerminusDB
| Param | Type | Description |
|---|---|---|
| data |
TodoAlteredTitle | TodoAlteredCompleted
|
Todo Title or Completed Alteration |
Remove Todo
Kind: inner method of TerminusDB
| Param | Type | Description |
|---|---|---|
| data | Object |
|
| data.id | string |
Todo ID |
Toggle All Todos
Kind: inner method of TerminusDB
| Param | Type | Description |
|---|---|---|
| data | Object |
|
| data.completed | boolean |
Todo completed |
Clear Completed Todos
Kind: inner method of TerminusDB
Get all Todos
Kind: inner method of TerminusDB
| Param | Type | Description |
|---|---|---|
| callback | callback |
callback to recieve state |
Todo Created
Kind: inner typedef of TerminusDB
Properties
| Name | Type | Description |
|---|---|---|
| TodoCreated.id | string |
Todo ID |
| TodoCreated.title | string |
Todo Title |
Todo Title Altered
Kind: inner typedef of TerminusDB
Properties
| Name | Type | Description |
|---|---|---|
| TodoAlteredTitle.key | 'title' |
string "title" |
| TodoAlteredTitle.value | string |
Todo Title |
| TodoAlteredTitle.id | string |
Todo Document Id to Alter |
Todo Completed Altered
Kind: inner typedef of TerminusDB
Properties
| Name | Type | Description |
|---|---|---|
| TodoAlteredCompleted.key | 'completed' |
string "completed" |
| TodoAlteredCompleted.value | boolean |
Todo Completed |
| TodoAlteredCompleted.id | string |
Todo Document Id to Alter |
Response Callback
Kind: inner typedef of TerminusDB
| Param | Type | Description |
|---|---|---|
| error | Error |
Error Object |
| response | Array |
Response Array |