Kisituo

Kutoka Wikipedia, kamusi elezo huru
Jump to navigation Jump to search

Katika utarakilishi na lugha za programu, kisituo (kwa Kiingereza: trigger) ni kifaa cha programu tete kinachoacha amri itekelezwe tukio linapotokea.

Mfano wa kisituo[hariri | hariri chanzo]

Kisituo cha SQL :

 CREATE OR REPLACE TRIGGER trigg_example
 BEFORE INSERT OR UPDATE ON table_example
 FOR EACH ROW
 WHEN (new.no_line > 0)
 DECLARE
     evol_exemple number;
 BEGIN
     evol_exemple := :new.exemple  - :old.exemple;
     DBMS_OUTPUT.PUT_LINE('  evolution : ' || evol_exemple);
 END;
 /

Kisituo cha FireBird :

{CREATE | RECREATE | CREATE OR ALTER} TRIGGER name FOR {table name | view name}
 [ACTIVE | INACTIVE]
 {BEFORE | AFTER}
 {INSERT [OR UPDATE] [OR DELETE] | UPDATE [OR INSERT] [OR DELETE] | DELETE [OR UPDATE] [OR INSERT] }
 [POSITION n] AS
BEGIN
 ....
END

Marejeo[hariri | hariri chanzo]

  • Kahigi, K. K. (2007). Ujanibishaji wa Office 2003 na Windows XP kwa Kiswahili Sanifu. Kioo cha Lugha, 5(1).