mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Extend the upsert syntax to allow a WHERE clause on the UPDATE.
FossilOrigin-Name: e4396c540a22fbc087a01050a32bfad514259d700c2381d7ac912580d7dca00f
This commit is contained in:
@@ -2717,6 +2717,7 @@ struct NameContext {
|
||||
struct Upsert {
|
||||
ExprList *pUpsertTarget; /* Optional description of conflicting index */
|
||||
ExprList *pUpsertSet; /* The SET clause from an ON CONFLICT UPDATE */
|
||||
Expr *pUpsertWhere; /* WHERE clause for the ON CONFLICT UPDATE */
|
||||
Upsert *pUpsertNext; /* Next ON CONFLICT clause in the list */
|
||||
};
|
||||
|
||||
@@ -4270,11 +4271,11 @@ const char *sqlite3JournalModename(int);
|
||||
#define sqlite3WithDelete(x,y)
|
||||
#endif
|
||||
#ifndef SQLITE_OMIT_UPSERT
|
||||
Upsert *sqlite3UpsertNew(sqlite3*,Upsert*,ExprList*,ExprList*);
|
||||
Upsert *sqlite3UpsertNew(sqlite3*,Upsert*,ExprList*,ExprList*,Expr*);
|
||||
void sqlite3UpsertDelete(sqlite3*,Upsert*);
|
||||
Upsert *sqlite3UpsertDup(sqlite3*,Upsert*);
|
||||
#else
|
||||
#define sqlite3UpsertNew(x,y,z) ((Upsert*)0)
|
||||
#define sqlite3UpsertNew(x,y,z,w) ((Upsert*)0)
|
||||
#define sqlite3UpsertDelete(x,y)
|
||||
#define sqlite3UpsertDup(x,y) ((Upsert*)0)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user