UNPKG

@x5e/gink

Version:

an eventually consistent database

31 lines (30 loc) 1.35 kB
import { Database } from "./Database"; import { Container } from "./Container"; import { AsOf, Muid, Value } from "./typedefs"; import { ContainerBuilder } from "./builders"; import { Bundler } from "./Bundler"; import { Edge } from "./Edge"; import { Vertex } from "./Vertex"; export declare class EdgeType extends Container { constructor(database: Database, address: Muid, containerBuilder?: ContainerBuilder); createEdge(source: Vertex, target: Vertex, value?: Value, change?: Bundler | string): Promise<Edge>; reset(args?: { toTime?: AsOf; bundlerOrComment?: Bundler | string; skipProperties?: boolean; recurse?: boolean; seen?: Set<string>; }): 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 bundlerOrComment optional bundler or comment */ private resetEdgeProperties; }