1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Added code to INSERT, DELETE and UPDATE virtual tables. The new code is

mostly untested. (CVS 3248)

FossilOrigin-Name: 32c97b884b104d120db3c0a87f5eab28f36851f8
This commit is contained in:
drh
2006-06-14 19:00:20 +00:00
parent badf7a7a2f
commit 4cbdda9e27
11 changed files with 176 additions and 61 deletions

View File

@@ -103,6 +103,10 @@ void sqlite3BeginTrigger(
/* The table does not exist. */
goto trigger_cleanup;
}
if( IsVirtual(pTab) ){
sqlite3ErrorMsg(pParse, "cannot create triggers on virtual tables");
goto trigger_cleanup;
}
/* Check that the trigger name is not reserved and that no trigger of the
** specified name exists */
@@ -594,9 +598,10 @@ int sqlite3TriggersExist(
int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
ExprList *pChanges /* Columns that change in an UPDATE statement */
){
Trigger *pTrigger = pTab->pTrigger;
Trigger *pTrigger;
int mask = 0;
pTrigger = IsVirtual(pTab) ? 0 : pTab->pTrigger;
while( pTrigger ){
if( pTrigger->op==op && checkColumnOverLap(pTrigger->pColumns, pChanges) ){
mask |= pTrigger->tr_tm;