diff options
author | Bin Yang <bin.yang@windriver.com> | 2020-02-28 00:22:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-02-28 00:22:19 +0000 |
commit | bab1c76b08725c9e056b7f40335c43988a12fdd9 (patch) | |
tree | 2c4e161f648a1a2e2d70613dbb2e3862e5786d1f /src/orchestrator/pkg/infra/db/store.go | |
parent | c9c09d43c268d674b7567b4546020935fbd3c60d (diff) | |
parent | 5fa81fb475007e1c282791ae20ede51849b7ad29 (diff) |
Merge "Update MongoDb to add new methods"
Diffstat (limited to 'src/orchestrator/pkg/infra/db/store.go')
-rw-r--r-- | src/orchestrator/pkg/infra/db/store.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/orchestrator/pkg/infra/db/store.go b/src/orchestrator/pkg/infra/db/store.go index 1a9632e7..c8a8f744 100644 --- a/src/orchestrator/pkg/infra/db/store.go +++ b/src/orchestrator/pkg/infra/db/store.go @@ -54,8 +54,14 @@ type Store interface { // TODO: If tag is empty, it will delete all tags under key. Delete(table string, key Key, tag string) error - // Reads all master tables and data from the specified tag in table - ReadAll(table string, tag string) (map[string][]byte, error) + // Inserts and Updates a tag with key and also adds query fields if provided + Insert(coll string, key Key, query interface{}, tag string, data interface{}) error + + // Find the document(s) with key and get the tag values from the document(s) + Find(coll string, key Key, tag string) ([][]byte, error) + + // Removes the document(s) matching the key + Remove(coll string, key Key) error } // CreateDBClient creates the DB client |