TopicService Class
Provides interactions with topics
Constructor
TopicService
-
context
Parameters:
-
context
Object
Item Index
Methods
- _emit
- _get
- _retrieveOnUpdateAndMerge
- add
- count
- deleteById
- deleteSingle
- format static
- get
- getAll
- getAllWithCount
- getContext
- getIdWhere
- getSingle
- getType
- merge static
- save
- update
- validate static
Methods
_emit
-
event
-
data
-
cb
Parameters:
-
event
String -
data
Object -
cb
Function
_get
-
id
-
[options]
-
cb
Parameters:
-
id
String -
[options]
Object optional -
cb
Function
_retrieveOnUpdateAndMerge
-
dto
-
options
-
cb
Parameters:
-
dto
Object -
options
Object-
[isCreate]
Boolean optional
-
-
cb
Function
add
-
dto
-
[options]
-
cb
Parameters:
-
dto
Object -
[options]
Object optional -
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
count
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[where]
Object optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the number of results that match the specified query
deleteById
-
id
-
options
-
cb
Parameters:
-
id
String -
options
Object -
cb
Function
deleteSingle
-
[options]
-
cb
Parameters:
-
[options]
Object optionalSee BaseObjectService#getSingle-
[where]
Object optional
-
-
cb
Function
format
-
context
-
cb
Parameters:
-
context
Object-
service
TopicServiceAn instance of the service that triggered the event that called this handler
-
-
cb
FunctionA callback that takes a single parameter: an error if occurred
get
-
id
-
[options]
-
cb
Parameters:
-
id
String -
[options]
Object optional -
cb
Function(Error, object|null) A callback that takes two parameters. The first is an error, if occurred. The second is the object with the specified ID
getAll
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[select]
Object optional -
[where]
Object optional -
[order]
Array optional -
[limit]
Integer optional -
[offset]
Integer optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is an array representing the results of the query.
getAllWithCount
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[select]
Object optional -
[where]
Object optional -
[order]
Array optional -
[limit]
Integer optional -
[offset]
Integer optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is an object representing the results of the query.
getContext
-
[data]
Parameters:
-
[data]
String | Object | Number | Boolean optional
Returns:
getIdWhere
-
dto
Parameters:
-
dto
Object
Returns:
getSingle
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[select]
Object optional -
[where]
Object optional -
[order]
Array optional -
[offset]
Integer optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
getType
()
String
Returns:
merge
-
context
-
cb
Parameters:
-
context
Object-
service
TopicServiceAn instance of the service that triggered the event that called this handler
-
-
cb
FunctionA callback that takes a single parameter: an error if occurred
save
-
dto
-
[options]
-
cb
Parameters:
-
dto
Object -
[options]
Object optional-
[isCreate]
Boolean optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
update
-
dto
-
[options]
-
cb
Parameters:
-
dto
Object -
[options]
Object optional -
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
validate
-
context
-
cb
Parameters:
-
context
Object-
data
ObjectThe DTO that was provided for persistence
-
service
TopicServiceAn instance of the service that triggered the event that called this handler
-
-
cb
FunctionA callback that takes a single parameter: an error if occurred