UNPKG

@x5e/gink

Version:

an eventually consistent database

27 lines (26 loc) 1.31 kB
import { Database } from "./Database"; import { Container } from "./Container"; import { AsOf, Muid, Value, Meta } from "./typedefs"; import { Edge } from "./Edge"; import { Vertex } from "./Vertex"; export declare class EdgeType extends Container { private constructor(); static get(database?: Database, muid?: Muid): EdgeType; static create(database?: Database, meta?: Meta): Promise<EdgeType>; size(): Promise<number>; toJson(indent: number | boolean, asOf?: AsOf, seen?: Set<string>): Promise<string>; create(source: Vertex, target: Vertex, value?: Value, meta?: Meta): Promise<Edge>; reset(toTime?: AsOf, recurse?: any, meta?: Meta): Promise<void>; /** * Specific property reset method to reset the properties of an edge. Resets the properties * associated with the edge to toTime. * * This is separated from the container reset method due to Edges being handled differently from * containers (edges are not stored in the internal container database like other containers). * @param edgeMuid the muid of the edge to reset * @param edgeData the data of the edge to reset * @param toTime optional timestamp to reset the properties to * @param meta optionally may contain a bundler or comment */ private resetEdgeProperties; }