Ditto 4.0.0-alpha2
Public Member Functions | Properties | List of all members
DittoSDK.DittoStore Class Reference

A class encompassing functionality relating to the embedded storage. This is not a class you instantiate directly. Instead you access DittoStore objects using Ditto.Store. More...

Public Member Functions

DittoPendingCollectionsOperation Collections ()
 Returns an object that lets you fetch or observe the collections in the store. More...
 
DittoCollection Collection (string collectionName)
 A method to reference a DittoCollection. More...
 
unsafe List< DittoWriteTransactionResultWrite (Action< DittoWriteTransaction > handler)
 Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections. More...
 

Properties

unsafe List< string > CollectionNames [get]
 Gets the names of all collections known about on this device. More...
 
DittoDiskUsage DiskUsage [get]
 Gets a reference to the store disk usage.
 
DittoCollection this[string collectionName] [get]
 Retrieve a DittoCollection. var collection = ditto.store["cars"]; More...
 

Detailed Description

A class encompassing functionality relating to the embedded storage. This is not a class you instantiate directly. Instead you access DittoStore objects using Ditto.Store.

Member Function Documentation

◆ Collection()

DittoCollection DittoSDK.DittoStore.Collection ( string  collectionName)
inline

A method to reference a DittoCollection.

Parameters
collectionNameThe name of the collection.
Returns
A reference to the DittoCollection.

◆ Collections()

DittoPendingCollectionsOperation DittoSDK.DittoStore.Collections ( )
inline

Returns an object that lets you fetch or observe the collections in the store.

Returns
An object that lets you fetch or observe the collections in the store.

◆ Write()

unsafe List< DittoWriteTransactionResult > DittoSDK.DittoStore.Write ( Action< DittoWriteTransaction handler)
inline

Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections.

Parameters
handlerAn Action that provides access to a write transaction object that can be used to perform operations on the store.
Returns
A list ofDittoWriteTransactionResult objects. There is a result for each operation performed as part of the write transaction.

Property Documentation

◆ CollectionNames

unsafe List<string> DittoSDK.DittoStore.CollectionNames
get

Gets the names of all collections known about on this device.

Note, this will return immediately what is in the store.

◆ this[string collectionName]

DittoCollection DittoSDK.DittoStore.this[string collectionName]
get

Retrieve a DittoCollection. var collection = ditto.store["cars"];

Parameters
collectionNameThe name of the collection.
Returns
A reference to the DittoCollection.