doc/book/en/B2020-hooks.en.txt
author Graziella Toutoungis <graziella.toutoungis@logilab.fr>
Tue, 31 Mar 2009 17:09:38 +0200
changeset 1194 e224f064a268
parent 293 a21688a55d21
permissions -rw-r--r--
optimize this code part
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     1
.. -*- coding: utf-8 -*-
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     2
293
a21688a55d21 [doc] Move out from tutoriel RSS and CSS to make it independant chapters. Adds a conclusion to the tutorial.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 289
diff changeset
     3
.. _hooks:
a21688a55d21 [doc] Move out from tutoriel RSS and CSS to make it independant chapters. Adds a conclusion to the tutorial.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 289
diff changeset
     4
197
1632e01a58a9 [doc] Translation to english.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
     5
Hooks
1632e01a58a9 [doc] Translation to english.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
     6
=====
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     7
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     8
XXX FILLME
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     9
197
1632e01a58a9 [doc] Translation to english.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
    10
*Hooks* are executed before or after updating an entity or a relation in the
1632e01a58a9 [doc] Translation to english.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
    11
repository.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    12
197
1632e01a58a9 [doc] Translation to english.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
    13
Their prototypes are as follows: 
1632e01a58a9 [doc] Translation to english.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
    14
    
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    15
    * after_add_entity     (session, entity)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    16
    * after_update_entity  (session, entity)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    17
    * after_delete_entity  (session, eid)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    18
    * before_add_entity    (session, entity)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    19
    * before_update_entity (session, entity)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    20
    * before_delete_entity (session, eid)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    21
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    22
    * after_add_relation     (session, fromeid, rtype, toeid)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    23
    * after_delete_relation  (session, fromeid, rtype, toeid)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    24
    * before_add_relation    (session, fromeid, rtype, toeid)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    25
    * before_delete_relation (session, fromeid, rtype, toeid)
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    26
    
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    27
    * server_startup
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    28
    * server_shutdown
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    29
    
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    30
    * session_open
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    31
    * session_close
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    32