lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Feature Request - custom log event listeners #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For certain tasks it would be very helpful to register some kind of 
listener (or interceptor) on Log event.

As in me case I want to write a kind of custom log of user actions on 
certain tables (not all) and then this log would be rolled on another 
database. Such a hand-made replication + log of user actions.

As for now I doing this with help of triggers. But with a tons of 
boilerplate code. And with triggers I must register 3 triggers per each 
table.

In case of listener it would be ONE java-class and ONE CREATE LOG LISTENER 
DDL per database.

What you think about this feature request?

Original issue reported on code.google.com by kua...@gmail.com on 4 Oct 2009 at 9:53

GoogleCodeExporter commented 9 years ago
Do you know any other databases that support such a feature?
If yes could you provide link(s)?

Moved to the roadmap.

Original comment by thomas.t...@gmail.com on 7 Oct 2009 at 7:04

GoogleCodeExporter commented 9 years ago
In Firebird - database triggers

Syntax for database triggers:
{CREATE | RECREATE | CREATE OR ALTER} TRIGGER name 
 [ACTIVE | INACTIVE] ON 
 {CONNECT | DISCONNECT | TRANSACTION START | TRANSACTION COMMIT | TRANSACTION 
ROLLBACK} 
 [POSITION n] AS
BEGIN
 ...
END

Original comment by kua...@gmail.com on 8 Oct 2009 at 4:04