routier-collection


routier-collection / core/src / EphemeralDataPlugin

Abstract Class: EphemeralDataPlugin

Defined in: core/src/plugins/EphemeralDataPlugin.ts:11

Interface for a database plugin, which provides query, destroy, and bulk operations.

Implements

Constructors

Constructor

new EphemeralDataPlugin(databaseName): EphemeralDataPlugin

Defined in: core/src/plugins/EphemeralDataPlugin.ts:15

Parameters

databaseName

string

Returns

EphemeralDataPlugin

Methods

bulkPersist()

bulkPersist(event, done): void

Defined in: core/src/plugins/EphemeralDataPlugin.ts:21

Executes bulk operations (add, update, remove) on the database.

Parameters

event

DbPluginBulkPersistEvent

The bulk operations event containing schema, parent, and changes.

done

PluginEventCallbackPartialResult<BulkPersistResult>

Callback with the result or error.

Returns

void

Implementation of

IDbPlugin.bulkPersist


query()

query<TEntity, TShape>(event, done): void

Defined in: core/src/plugins/EphemeralDataPlugin.ts:104

Executes a query operation on the database.

Type Parameters

TEntity

TEntity extends object

TShape

TShape extends unknown = TEntity

Parameters

event

DbPluginQueryEvent<TEntity, TShape>

The query event containing schema, parent, and query operation.

done

PluginEventCallbackResult<ITranslatedValue<TShape>>

Callback with the result or error. The result must be wrapped in an ITranslatedValue to allow the datastore to iterate over results (for grouped queries) and determine if change tracking should be enabled.

Returns

void

Implementation of

IDbPlugin.query


destroy()

abstract destroy(event, done): void

Defined in: core/src/plugins/EphemeralDataPlugin.ts:132

Destroys or cleans up the plugin, closing connections or freeing resources.

Parameters

event

DbPluginEvent

done

PluginEventCallbackResult<never>

Callback with an optional error.

Returns

void

Implementation of

IDbPlugin.destroy