diff --git a/docs/classes/Database.html b/docs/classes/Database.html index 0e5386b9..3c952d7c 100644 --- a/docs/classes/Database.html +++ b/docs/classes/Database.html @@ -1,4 +1,4 @@ -Database | @fireproof/monorepo

Class Database<DT>

Type Parameters

  • DT extends DocTypes = NonNullable<unknown>

Implements

  • Connectable

Constructors

constructor +Database | @fireproof/monorepo

Class Database<DT>

Type Parameters

  • DT extends DocTypes = NonNullable<unknown>

Implements

  • Connectable

Constructors

Properties

Constructors

  • Type Parameters

    • DT extends {} = {}

    Parameters

    • Optionalname: string
    • Optionalopts: ConfigOpts

    Returns Database<DT>

Properties

_crdt: CRDT<DT>
_listeners: Set<ListenerFn<DT>> = ...
_listening: boolean = false
_noupdate_listeners: Set<ListenerFn<DT>> = ...
_ready: ResolveOnce<void, void> = ...
_writeQueue: WriteQueue<DT>
blockstore: BaseBlockstore
logger: Logger
name?: string
opts: ConfigOpts = {}
sthis: SuperThis
databases: Map<string, Database<{}>> = ...

Methods

  • Returns Promise<void>

  • Parameters

    • updates: DocUpdate<{}>[]

    Returns Promise<void>

  • Type Parameters

    • T extends {}

    Parameters

    • opts: AllDocsQueryOpts = {}

    Returns Promise<AllDocsResponse<T>>

  • Type Parameters

    • T extends {}

    Returns Promise<{ clock: ClockHead; rows: { key: string; value: DocWithId<T> }[] }>

  • Type Parameters

    • T extends {}

    Parameters

    • since: ClockHead = []
    • opts: ChangesOptions = {}

    Returns Promise<ChangesResponse<T>>

  • Close the database and release resources

    -

    Returns Promise<void>

  • Parameters

    • id: string

    Returns Promise<DocResponse>

  • Destroy the database and release all resources

    -

    Returns Promise<void>

  • Get a document from the database

    +

Constructors

  • Type Parameters

    • DT extends {} = {}

    Parameters

    • Optionalname: string
    • Optionalopts: ConfigOpts

    Returns Database<DT>

Properties

_crdt: CRDT<DT>
_listeners: Set<ListenerFn<DT>> = ...
_listening: boolean = false
_noupdate_listeners: Set<ListenerFn<DT>> = ...
_ready: ResolveOnce<void, void> = ...
_writeQueue: WriteQueue<DT>
blockstore: BaseBlockstore
logger: Logger
name?: string
opts: ConfigOpts = {}
sthis: SuperThis
databases: Map<string, Database<{}>> = ...

Methods

  • Returns Promise<void>

  • Parameters

    • updates: DocUpdate<{}>[]

    Returns Promise<void>

  • Type Parameters

    • T extends {}

    Parameters

    • opts: AllDocsQueryOpts = {}

    Returns Promise<AllDocsResponse<T>>

  • Type Parameters

    • T extends {}

    Returns Promise<{ clock: ClockHead; rows: { key: string; value: DocWithId<T> }[] }>

  • Type Parameters

    • T extends {}

    Parameters

    • since: ClockHead = []
    • opts: ChangesOptions = {}

    Returns Promise<ChangesResponse<T>>

  • Close the database and release resources

    +

    Returns Promise<void>

  • delete a document from the database

    +

    Parameters

    • id: string

      Document id

      +

    Returns Promise<DocResponse>

    DocResponse with the id and clock

    +
  • Destroy the database and release all resources

    +

    Returns Promise<void>

  • Get a document from the database

    Type Parameters

    • T extends {}

    Parameters

    • id: string

      the document id

    Returns Promise<DocWithId<T>>

    the document with the _id

    NotFoundError if the document is not found

    -
  • Put a document from the database

    +
+
diff --git a/docs/functions/fireproof.html b/docs/functions/fireproof.html index 5f4aa683..06d28c5c 100644 --- a/docs/functions/fireproof.html +++ b/docs/functions/fireproof.html @@ -1 +1 @@ -fireproof | @fireproof/monorepo
+fireproof | @fireproof/monorepo