private accessor
This commit is contained in:
@@ -57,9 +57,12 @@ func (wfa workflowExecutionMongoAccessor) LoadAll() ([]utils.ShallowDBObject, in
|
||||
return objs, 200, nil
|
||||
}
|
||||
|
||||
func (wfa *workflowExecutionMongoAccessor) Search(word string) ([]utils.ShallowDBObject, int, error) {
|
||||
func (wfa *workflowExecutionMongoAccessor) Search(word string, options ...string) ([]utils.ShallowDBObject, int, error) {
|
||||
objs := []utils.ShallowDBObject{}
|
||||
res_mongo, code, err := mongo.MONGOService.Search(word, []string{}, wfa.GetType())
|
||||
if len(options) == 0 {
|
||||
options = []string{}
|
||||
}
|
||||
res_mongo, code, err := mongo.MONGOService.Search(word, options, wfa.GetType())
|
||||
if err != nil {
|
||||
wfa.Logger.Error().Msg("Could not store to db. Error: " + err.Error())
|
||||
return nil, code, err
|
||||
|
Reference in New Issue
Block a user