new ConversationDAO(db)
Data access object for conversations.
Parameters:
| Name | Type | Description |
|---|---|---|
db |
Connection | instance of connection to data storage. |
- Source:
- app/model/dao/ConversationDAO.js, line 12
Methods
-
find(conversationId, callback)
-
Finds a Conversation according to given conversationId. At the end, given callback is executed with the result of find as argument.
Parameters:
Name Type Description conversationIdNumber callbackFunction - Source:
- app/model/dao/ConversationDAO.js, line 39
-
findAll(operator, callback)
-
Finds all conversations. If operator is defined then result includes only conversations owned by given operator.
Parameters:
Name Type Description operatorNumber callbackFunction - Source:
- app/model/dao/ConversationDAO.js, line 92
-
new() → {Conversation}
-
Creates new Conversation entity with prefilled fields.
- Source:
- app/model/dao/ConversationDAO.js, line 22
Returns:
- Type
- Conversation
-
persist(conversation, callback)
-
Persist given conversation to storage. Executes callback with the persisted conversation as parameter.
Parameters:
Name Type Description conversationConversation callbackFunction - Source:
- app/model/dao/ConversationDAO.js, line 159