From f76dd400cca48fe80b56a2d4272a6ead70e7298d Mon Sep 17 00:00:00 2001 From: Nick Van Doorn Date: Sat, 19 Jan 2019 20:15:41 -0800 Subject: Generate docs on build --- docs/classes/_database_.database.html | 493 ++++++++++++++++++++++++++++++++++ 1 file changed, 493 insertions(+) create mode 100644 docs/classes/_database_.database.html (limited to 'docs/classes') diff --git a/docs/classes/_database_.database.html b/docs/classes/_database_.database.html new file mode 100644 index 0000000..4073194 --- /dev/null +++ b/docs/classes/_database_.database.html @@ -0,0 +1,493 @@ + + + + + + Database | naive + + + + + +
+
+
+
+ +
+
+ Options +
+
+ All +
    +
  • Public
  • +
  • Public/Protected
  • +
  • All
  • +
+
+ + + + + + +
+
+ Menu +
+
+
+
+
+
+ +

Class Database

+
+
+
+
+
+
+
+
+
+

Implementation of NoSQL DB that uses paths and objects.

+
+

See DatabaseInterface for docs on public API

+

Uses a plain object as a buffer and reads/writes to a + plain JSON file. A better implementation could be backed + by somethig a little nicer and not hold the buffer + in memory

+
+
+
+

Hierarchy

+
    +
  • + Database +
  • +
+
+
+

Implements

+ +
+
+

Index

+
+
+
+

Constructors

+ +
+
+

Properties

+ +
+
+

Methods

+ +
+
+
+
+
+

Constructors

+
+ +

constructor

+ + +
+
+
+

Properties

+
+ +

Private buff

+
buff: any
+ +
+
+ +

Private ctx

+
ctx: Context
+ +
+
+
+

Methods

+
+ +

flush

+
    +
  • flush(): Promise<void>
  • +
+ +
+
+ +

init

+
    +
  • init(): Promise<void>
  • +
+ +
+
+ +

read

+
    +
  • read(path: string): Promise<Object>
  • +
+ +
+
+ +

Private resolve

+
    +
  • resolve(pathParts: string[], isRead?: boolean, level?: number): any
  • +
+
    +
  • + +
    +
    +

    Resolve the object located at path.

    +
    +

    If isRead == true, no new nodes will + be created, and the function will return + null if a null node is encountered on the path. + Else, we create each node on the path.

    +

    Level is used to determine how deep + to recurse on path. Callers interested in + writing may wish to stop higher up the tree.

    +
    +

    Parameters

    +
      +
    • +
      pathParts: string[]
      +
    • +
    • +
      Default value isRead: boolean = true
      +
    • +
    • +
      Default value level: number = 0
      +
    • +
    +

    Returns any

    +
  • +
+
+
+ +

Private serialize

+
    +
  • serialize(): Promise<void>
  • +
+ +
+
+ +

toString

+
    +
  • toString(): string
  • +
+ +
+
+ +

write

+
    +
  • write(path: string, toWrite: Object): Promise<void>
  • +
+ +
+
+
+ +
+
+ +
+

Generated using TypeDoc

+
+
+ + + + \ No newline at end of file -- cgit v1.2.3