Lines Matching refs:pTab

34 ** Given table pTab, return a list of all the triggers attached to 
37 ** All of the triggers on pTab that are in the same database as pTab
38 ** are already attached to pTab->pTrigger. But there might be additional
39 ** triggers on pTab in the TEMP schema. This routine prepends all
40 ** TEMP triggers on pTab to the beginning of the pTab->pTrigger list
44 ** that fire off of pTab. The list will include any TEMP triggers on
45 ** pTab as well as the triggers lised in pTab->pTrigger.
47 Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){
55 if( pTmpSchema!=pTab->pSchema ){
60 if( pTrig->pTabSchema==pTab->pSchema
61 && 0==sqlite3StrICmp(pTrig->table, pTab->zName)
63 pTrig->pNext = (pList ? pList : pTab->pTrigger);
69 return (pList ? pList : pTab->pTrigger);
93 Table *pTab; /* Table that the trigger fires off of */
99 int iTabDb; /* Index of the database holding pTab */
129 pTab = sqlite3SrcListLookup(pParse, pTableName);
130 if( db->init.busy==0 && pName2->n==0 && pTab
131 && pTab->pSchema==db->aDb[1].pSchema ){
142 pTab = sqlite3SrcListLookup(pParse, pTableName);
143 if( !pTab ){
158 if( IsVirtual(pTab) ){
182 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
191 if( pTab->pSelect && tr_tm!=TK_INSTEAD ){
196 if( !pTab->pSelect && tr_tm==TK_INSTEAD ){
201 iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
209 if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){
234 pTrigger->pTabSchema = pTab->pSchema;
317 Table *pTab;
319 pTab = sqlite3HashFind(&pLink->pTabSchema->tblHash, pLink->table, n);
320 assert( pTab!=0 );
321 pLink->pNext = pTab->pTrigger;
322 pTab->pTrigger = pLink;
597 Table *pTab = tableOfTrigger(pTrigger);
599 for(pp=&pTab->pTrigger; *pp!=pTrigger; pp=&((*pp)->pNext));
626 ** Return a list of all triggers on table pTab if there exists at least
633 Table *pTab, /* The table the contains the triggers */
643 pList = sqlite3TriggerList(pParse, pTab);
645 assert( pList==0 || IsVirtual(pTab)==0 );
805 Table *pTab, /* The table pTrigger is attached to */
818 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
843 pSubParse->pTriggerTab = pTab;
857 pTab->zName
917 Table *pTab, /* The table trigger pTrigger is attached to */
923 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
936 pPrg = codeRowTrigger(pParse, pTrigger, pTab, orconf);
944 ** table pTab. The reg, orconf and ignoreJump parameters passed to this
951 Table *pTab, /* The table to code triggers from */
958 pPrg = getRowTrigger(pParse, p, pTab, orconf);
982 ** on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)
988 ** operation on pTab, this function is a no-op.
992 ** in the trigger program. If N is the number of columns in table pTab
993 ** (a copy of pTab->nCol), then registers are populated as follows:
998 ** reg+1 OLD.* value of left-most column of pTab
1000 ** reg+N OLD.* value of right-most column of pTab
1002 ** reg+N+2 OLD.* value of left-most column of pTab
1004 ** reg+N+N+1 NEW.* value of right-most column of pTab
1022 Trigger *pTrigger, /* List of triggers on table pTab */
1026 Table *pTab, /* The table to code triggers from */
1052 sqlite3CodeRowTriggerDirect(pParse, p, pTab, reg, orconf, ignoreJump);
1084 Trigger *pTrigger, /* List of triggers on table pTab */
1088 Table *pTab, /* The table to code triggers from */
1101 pPrg = getRowTrigger(pParse, p, pTab, orconf);