Ditto  1.0.14
Public Member Functions | List of all members
ditto::WriteTransaction Class Reference

WriteTransaction exposes functionality that allows you to perform multiple operations on the store within a single write transaction. More...

Public Member Functions

ScopedWriteTransaction scoped (std::string collection_name)
 Creates a ScopedWriteTransaction object that will ensure that operations called on it are all in the context of the collection name provided to this function. More...
 

Detailed Description

WriteTransaction exposes functionality that allows you to perform multiple operations on the store within a single write transaction.

You must use the scoped function to get collection-scoped access to the write transaction object, which will then allow you to perform insert, update, remove or evict operations using the write transaction.

Member Function Documentation

◆ scoped()

ScopedWriteTransaction ditto::WriteTransaction::scoped ( std::string  collection_name)

Creates a ScopedWriteTransaction object that will ensure that operations called on it are all in the context of the collection name provided to this function.

You can create many ScopedWriteTransaction objects per WriteTransaction object.

Parameters
collection_namethe name of the collection that the write transaction object should be scoped to.
Returns
A ScopedWriteTransaction that is scoped to the specified collection.