eeCLOUD reads are designed to be deterministic, order-aware and optimized for time-ordered data. This guide explains how to think about reading in eeCLOUD and how to choose the right method.
In many systems, ReadById is the primary access pattern. eeCLOUD focuses on a different model: time-ordered data and memory snapshots.
For most real-world use cases (sessions, device state, configurations, user timeline, latest event), the question is not "give me record X" but rather "give me the most relevant record now".
Several read methods are logically single-record reads. When multiple matches exist, the Order parameter decides which record is returned.
| Order | Single-record result |
|---|---|
| DESC (default) | Most recent record (last inserted) |
| ASC | Oldest record (first inserted) |
// Latest record
await app.ReadData("myApp", "sessions");
// First record
await app.ReadData("myApp", "sessions", Order.ASC);
The most deterministic way to read a specific record is using its address
(MemoryArea.address). The address is the stable handle used by update and delete operations.
var single = await app.ReadData("myApp", "users", address);
// Latest (default)
await app.ReadData("myApp", "config");
// First
await app.ReadData("myApp", "config", Order.ASC);
eeCLOUD supports id-based reads, but they are still order-aware when multiple matches exist.
await app.ReadData("myApp", "users", id);
await app.ReadData("myApp", "users", id, Order.DESC, deleted: false);
await app.ReadIndexData("myApp", "users", index);
await app.ReadData("myApp", "users", "email", "[email protected]");
Reference-based reads are the fastest way to retrieve user/tenant/device owned data.
// Latest record for a given reference
await app.ReadRefData("myApp", "orders", userId);
// Read by reference + index
await app.ReadRefData("myApp", "orders", userId, index);
// index + id
await app.ReadData("myApp", "orders", index, id);
// reference + id
await app.ReadRefData("myApp", "orders", userId, id);
// reference + index + id
await app.ReadRefData("myApp", "orders", userId, index, id);
// reference + field/value
await app.ReadData("myApp", "orders", userId, "status", "paid");
Many reads accept a deleted parameter. When false (default), soft-deleted records
are excluded. When true, soft-deleted records are included.
// Include soft-deleted data
await app.ReadData("myApp", "users", id, Order.DESC, deleted: true);
MemoryArea.deleted and MemoryArea.delete.
A common pattern is:
// 1) Read latest
var mem = await app.ReadRefData("myApp", "sessions", userId);
// 2) Take the address
var addr = mem.area[0].address;
// 3) Update deterministically
await app.UpdateValue("myApp", "sessions", addr, "active", false);