Repository navigation
sql-storage-adapter v0.7.11
·
265 commits
to master
since this release
Added
- Row-change events:
withChangeEvents(adapter)addsonChange(listener, { tables }), which reports each INSERT, UPDATE, DELETE and TRUNCATE made through the adapter (run,batch,get,all,exec,transaction,withConnection) once it commits, with the table, the operation and, fromrunandbatch, the count. A rolled-back transaction reports nothing. - PostgreSQL notifications between sessions:
PostgresAdapter.listen(channel, handler)andnotify(channel, payload). The listening connection is taken again when the server ends it. changeNotificationSql(table, channel)on the dialects: on PostgreSQL a statement-level trigger that sends{"schema", "table", "operation"}on the channel for each write to the table from any session; null on SQLite.