routier-collection / plugins/postgresql/src / PostgresDbPlugin
Class: PostgresDbPlugin
Defined in: plugins/postgresql/src/PostgresDbPlugin.ts:46
Implements
IDbPlugin
Constructors
Constructor
new PostgresDbPlugin(
config):PostgresDbPlugin
Defined in: plugins/postgresql/src/PostgresDbPlugin.ts:70
Parameters
config
Returns
PostgresDbPlugin
Properties
databaseName
readonlydatabaseName:string
Defined in: plugins/postgresql/src/PostgresDbPlugin.ts:68
See IDbPlugin.databaseName. Host, port and database rather than the bare database name, because mydb on two servers is two databases — and without credentials, because this value becomes part of a subscription channel key.
Implementation of
IDbPlugin.databaseName
Methods
query()
query<
TRoot,TShape>(event,done):void
Defined in: plugins/postgresql/src/PostgresDbPlugin.ts:164
Executes a query operation on the database.
Type Parameters
TRoot
TRoot extends object
TShape
TShape extends unknown = TRoot
Parameters
event
DbPluginQueryEvent<TRoot, TShape>
The query event containing schema, parent, and query operation.
done
PluginEventCallbackResult<ITranslatedValue<TShape>>
Callback with the result or error.
Returns
void
Implementation of
IDbPlugin.query
destroy()
destroy(
event,done):void
Defined in: plugins/postgresql/src/PostgresDbPlugin.ts:259
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
bulkPersist()
bulkPersist(
event,done):void
Defined in: plugins/postgresql/src/PostgresDbPlugin.ts:271
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