Constants

F_OID → String

The field name for soring oid.

"oid"
F_OTYPE → String

The field name for storing otype.

"otype"
FOR_SHARE → int

Used with load and loadIfAny to indicat the locking is select-for-share (i.e., read lock).

1
FOR_UPDATE → int

Used with load and loadIfAny to indicat the locking is select-for-update (i.e., updatelock).

2

Functions

load<T extends Entity>(Access access, String oid, T newInstance(String oid), [ Iterable<String> fields, int option ]) → Future<T>

Loads the data of the given OID from the storage into the given entity.

loadIfAny<T extends Entity>(Access access, String oid, T newInstance(String oid), [ Iterable<String> fields, int option ]) → Future<T>

Loads the entity of the given OID, and return a Future carrying null if not found.

loadIfAny_<T extends Entity>(Access access, String oid, T newInstance(String oid), dynamic loader(T entity, Set<String> fields, option), Iterable<String> fields, [ int option ]) → Future<T>

A utility to implement loadIfAny and custom load functions.

minify(Map<String, dynamic> json) → Map<String, dynamic>

Minimizes the JSON map to be stored into DB or sent over internet by removing the entries whose value is null.

Classes

Access

An access channel, aka., a connection, to a database, such as Couchbase and MySQL.

AccessAgent

An agent for handling load, update, create and delete from/into database.

AccessReader

A reader for converting data read from the database.

AccessWriter

A writer for converting data for saving to the database.

CachedAccessReader

An extension of AccessReader that support a cache.

Entity

An entity which can be stored into an entity store.

EntityCache

A cache for storing entities.

MultiLoad

The interface to decorate Entity if it allowed to load into the same entity multiple times (with different fields).

Exceptions / Errors

EntityException

Indicates the entity is not found.

EntityNotFoundException

Indicates the entity is not found.