mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:00:38 +01:00
Document database triggers
This commit is contained in:
parent
a64c7eec0b
commit
c80604c60e
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
* Feature CORE-645 and CORE-745
|
* Feature CORE-645 and CORE-745
|
||||||
Database triggers
|
Database triggers
|
||||||
|
See also:
|
||||||
|
/doc/sql.extensions/README.db_triggers.txt
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Adriano dos Santos Fernandes <adrianosf at uol.com.br>
|
Adriano dos Santos Fernandes <adrianosf at uol.com.br>
|
||||||
|
|
||||||
|
57
doc/sql.extensions/README.db_triggers.txt
Normal file
57
doc/sql.extensions/README.db_triggers.txt
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
------------------
|
||||||
|
Database triggers
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Author:
|
||||||
|
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
|
||||||
|
|
||||||
|
Syntax:
|
||||||
|
<database-trigger> ::=
|
||||||
|
{CREATE | RECREATE | CREATE OR ALTER}
|
||||||
|
TRIGGER <name>
|
||||||
|
[ACTIVE | INACTIVE]
|
||||||
|
ON <event>
|
||||||
|
[POSITION <n>]
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
...
|
||||||
|
END
|
||||||
|
|
||||||
|
<event> ::=
|
||||||
|
CONNECT
|
||||||
|
| DISCONNECT
|
||||||
|
| TRANSACTION START
|
||||||
|
| TRANSACTION COMMIT
|
||||||
|
| TRANSACTION ROLLBACK
|
||||||
|
|
||||||
|
Syntax rules:
|
||||||
|
1) Database triggers type can't be changed.
|
||||||
|
|
||||||
|
Events descriptions:
|
||||||
|
|
||||||
|
- CONNECT
|
||||||
|
Database connection established
|
||||||
|
A transaction is started
|
||||||
|
Triggers are fired - uncaught exceptions rollbacks the transaction,
|
||||||
|
disconnect the attachment and are returned to the client
|
||||||
|
The transaction is committed
|
||||||
|
|
||||||
|
- DISCONNECT
|
||||||
|
A transaction is started
|
||||||
|
Triggers are fired - uncaught exceptions rollbacks the transaction,
|
||||||
|
disconnect the attachment and are swalloed
|
||||||
|
The transaction is committed
|
||||||
|
The attachment is disconnected
|
||||||
|
|
||||||
|
- TRANSACTION START
|
||||||
|
Triggers are fired in the newly created transaction - uncaught
|
||||||
|
exceptions are returned to the client and the transaction is not created
|
||||||
|
|
||||||
|
- TRANSACTION COMMIT
|
||||||
|
Triggers are fired in the committing transaction - uncaught exceptions
|
||||||
|
rollbacks the triggers savepoint, the commit command is aborted and the
|
||||||
|
exception is returned to the client
|
||||||
|
|
||||||
|
- TRANSACTION ROLLBACK
|
||||||
|
Triggers are fired in the rolling-back transaction - changes done will
|
||||||
|
be rolled-back and exceptions are swallowed
|
Loading…
Reference in New Issue
Block a user