mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add infrastructure for doing an UPDATE as part of an UPSERT. Still no actual
UPDATE code, however. FossilOrigin-Name: 6d3017f92bce3e50a91fab2f605e2af8b913b1b374adbfd977299eb042683de8
This commit is contained in:
17
src/upsert.c
17
src/upsert.c
@@ -180,4 +180,21 @@ int sqlite3UpsertAnalyzeTarget(
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
** Generate bytecode that does an UPDATE as part of an upsert.
|
||||
*/
|
||||
void sqlite3UpsertDoUpdate(
|
||||
Parse *pParse, /* The parsing and code-generating context */
|
||||
Upsert *pUpsert, /* The ON CONFLICT clause for the upsert */
|
||||
Table *pTab, /* The table being updated */
|
||||
Index *pIdx, /* The UNIQUE constraint that failed */
|
||||
int iDataCur, /* Cursor for the pTab, table being updated */
|
||||
int iIdxCur /* Cursor for the pIdx */
|
||||
){
|
||||
Vdbe *v = pParse->pVdbe;
|
||||
assert( v!=0 );
|
||||
VdbeNoopComment((v, "Begin DO UPDATE of UPSERT"));
|
||||
VdbeNoopComment((v, "End DO UPDATE of UPSERT"));
|
||||
}
|
||||
|
||||
#endif /* SQLITE_OMIT_UPSERT */
|
||||
|
Reference in New Issue
Block a user