DataConnectorImplementations
The DataConnectorImplementations type lists the async functions required to read and write Atoms.
{
attach?: (syncChangedAtoms: (...address: AtomAddress<Depth>[]) => Promise<void>) => Promise<void>;
detach?: () => Promise<void>;
readAtom: (address: AtomAddress<Depth>) => Promise<Atom | undefined>;
writeAtom: (address: AtomAddress<Depth>, atom: Atom) => Promise<void>;
removeAtom: (address: AtomAddress<Depth>) => Promise<void>;
readChildIds: (address: AnyParentAddress<Depth>) => Promise<string[]>;
}| Type | Description | |
|---|---|---|
attach? | (syncChangedAtoms: (...address: AtomAddress<Depth>[]) => Promise<void>) => Promise<void> | The attach callback is invoked when the |
detach? | () => Promise<void> | The detach callback is invoked when the |
readAtom | (address: AtomAddress<Depth>) => Promise<Atom | undefined> | The readAtom callback must retrieve the |
writeAtom | (address: AtomAddress<Depth>, atom: Atom) => Promise<void> | The writeAtom callback must persist the provided |
removeAtom | (address: AtomAddress<Depth>) => Promise<void> | The removeAtom callback must delete the |
readChildIds | (address: AnyParentAddress<Depth>) => Promise<string[]> | The readChildIds callback must return an array of child ID strings that exist under the specified parent address. For |
Since
v0.0.0