|
Ditto 5.0.0
|
Represents a single match of a DQL query, similar to a "row" in SQL terms. It's a reference type serving as a "cursor", allowing for efficient access of the underlying data in various formats. More...
Public Member Functions | |
| void | Materialize () |
| Loads the CBOR representation of the item's content, decodes it as a dictionary so it can be accessed via DittoQueryResultItem.Value. Keeps the dictionary in memory until DittoQueryResultItem.Dematerialize() is called. No-op if DittoQueryResultItem.Value is already materialized. | |
| void | Dematerialize () |
Releases the materialized value from memory. No-op if item is not materialized.
For completly disposing of the instance.. | |
| CBORObject | CborData () |
| Returns the content of the item as CBOR data. | |
| string | JsonString () |
| Returns the content of the item as a JSON string. | |
| Public Member Functions inherited from DittoSDK.Internal.Drop | |
| void | Dispose () |
| Suppresses finalization and initiates custom disposal logic. | |
Protected Member Functions | |
| override unsafe void | Dispose (bool disposing) |
| Protected Member Functions inherited from DittoSDK.Internal.Drop | |
| void | Dispose (bool disposing) |
| Overload for types to dispose of resources, regardless of whether the type is being disposed or finalized. Note that finalization occurs on a dedicated thread. | |
Properties | |
| Dictionary< string, object > | Value [get] |
| Gets the content as a materialized dictionary. | |
| bool | IsMaterialized [get] |
| Gets a value indicating whether the item is currently held materialized in memory or not. | |
| Properties inherited from DittoSDK.Internal.Drop | |
| bool | IsDisposed [get] |
Represents a single match of a DQL query, similar to a "row" in SQL terms. It's a reference type serving as a "cursor", allowing for efficient access of the underlying data in various formats.
The DittoQueryResultItem.Value property is lazily materialized and kept in memory until the instance is garbage collected. To reduce the memory footprint, structure your code such that items can be processed as a stream, i.e. one by one (or in batches) and DittoQueryResultItem.Dematerialize() them right after use:
You can also consider taking the JSON string of the item and Deserialize it:
|
inline |
Returns the content of the item as CBOR data.
|
inline |
Returns the content of the item as a JSON string.
|
get |
Gets a value indicating whether the item is currently held materialized in memory or not.
|
get |
Gets the content as a materialized dictionary.
The item's value is DittoQueryResultItem.Materialize() on first access and subsequently on each access after performing DittoQueryResultItem.Dematerialize(). Once materialized, the value is kept in memory until DittoQueryResultItem.Dematerialize() is explicitly called or the item goes out of scope.