Provides access to Collection
s and a write transaction API.
More...
#include <Store.hpp>
Provides access to Collection
s and a write transaction API.
◆ collection()
Collection ditto::Store::collection |
( |
std::string |
name | ) |
const |
Returns a Collection
with the provided name.
- Parameters
-
[in] | name | the name of the collection. A name is valid if:
- its length is less than 100
- it does not contain the char '\0'
- it is not prefixed with "$TS_"
- it is not empty
|
- Returns
- a
Collection
.
- Exceptions
-
◆ collections()
Returns an object that lets you fetch or observe the collections in the store.
- Returns
- a
PendingCollectionsOperation
object that you can use to fetch or observe the collections in the store
◆ get_disk_usage()
DiskUsage ditto::Store::get_disk_usage |
( |
| ) |
const |
◆ write()
Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections.
- Parameters
-
fn | a lambda that provides access to a write transaction object that can be used to perform operations on the store. |
- Returns
- a list of
WriteTransactionResult
s. There is a result for each operation performed as part of the write transaction.