Understanding Reads

eeCLOUD reads are designed for DaaS scenarios where chronology, ownership and current state matter. This page describes the real read surface exposed by the official C# SDK and REST API.

Read Surfaces

Standard reads return Memory. Object graph reads return ObjectMemory or ObjectMemories, where memory contains eeCLOUD metadata and data contains the resolved payload.

var latest = await ee.Memory("events").ReadAsync();
var objectPayload = await ee.Memory("devices").ReadObjectByIndexAsync("sensor-01");

Why Reads Are Order-Aware

In eeCLOUD, many datasets are naturally timeline-based: session state, device telemetry, workflow steps, user activity and application events. Because of that, reads often answer "what is the most relevant record now?" instead of "load row X by primary key only".

Key idea: eeCLOUD reads are built around Order, Reference, Index, ID and Address.

Read the Latest or the First Record

The basic SDK read method is ReadAsync. It returns the latest record by default with Order.DESC.

using eeCLOUD.SDK;

var latest = await ee.Memory("sessions").ReadAsync();
var first = await ee.Memory("sessions").ReadAsync(Order.ASC);
OrderMeaning
DESCMost recent matching record
ASCOldest matching record

The Deterministic Handle: Address

If you need one exact stored record, the strongest handle is address. Address is what you should keep when a later update, delete or restore must be deterministic.

var single = await ee.Memory("users").ReadByAddressAsync(address);

Single-Record Read Patterns

Read by id

var byId = await ee.Memory("users").ReadByIdAsync("user-01");
var byIdFirst = await ee.Memory("users").ReadByIdAsync("user-01", Order.ASC);

Read by index

var byIndex = await ee.Memory("users").ReadByIndexAsync("IDX-0001");

Read by field/value

var byField = await ee.Memory("users")
    .ReadByFieldAsync("email", "[email protected]");

Read by reference

var latestForTenant = await ee.Memory("orders")
    .ReadByReferenceAsync(1001);

var refAndIndex = await ee.Memory("orders")
    .ReadByReferenceAsync(1001, "IDX-0099");

Read by reference and id

var refAndId = await ee.Memory("orders")
    .ReadByReferenceAsync(1001, "order-0001");

Read Multiple Records

Use ReadAllAsync when you want a sequence instead of one result. The SDK supports filtering by reference, id, field/value and date ranges, plus pagination.

var page = await ee.Memory("events")
    .ReadAllAsync(order: Order.ASC, page: 0, entries: 100);

var byReference = await ee.Memory("events")
    .ReadAllAsync(reference: 1001, order: Order.ASC, entries: 100);

var lastDay = await ee.Memory("events")
    .ReadAllAsync(
        DateTime.UtcNow.AddDays(-1),
        DateTime.UtcNow,
        entries: 100
    );

Deleted Records

Many reads accept a deleted flag. When false, soft-deleted records are excluded. When true, they are included in the result set.

var withDeleted = await ee.Memory("users")
    .ReadByIdAsync("user-01", deleted: true);

From Read to Update

A common DaaS workflow is: read the current state, take the address, then apply a deterministic mutation.

var current = await ee.Memory("sessions").ReadByReferenceAsync(1001);
var address = current?.area.FirstOrDefault()?.address ?? 0;

await ee.Memory("sessions")
    .UpdateValueAsync(address, "active", false);
Use flexible reads to locate the right state, then use address for safe follow-up writes.