diff options
author | drh <> | 2023-08-30 15:20:15 +0000 |
---|---|---|
committer | drh <> | 2023-08-30 15:20:15 +0000 |
commit | 10deb35995422c8987d8f27593df2cb28c4ed66b (patch) | |
tree | 5a3a62af088df571a13da4f0cd8ee85eb556b5c0 /src/sqliteInt.h | |
parent | 8dd07389ac9ae965fa984451af807b719a867549 (diff) | |
download | sqlite-10deb35995422c8987d8f27593df2cb28c4ed66b.tar.gz sqlite-10deb35995422c8987d8f27593df2cb28c4ed66b.zip |
New experimental API for attaching client data to a database connection.
FossilOrigin-Name: d542837fdb42ebe810fc99225860d2cc7e6dd829a635bde820a09beff6bcb481
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index c2a9f855a..785576f9c 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1256,6 +1256,7 @@ typedef struct Column Column; typedef struct Cte Cte; typedef struct CteUse CteUse; typedef struct Db Db; +typedef struct DbClientData DbClientData; typedef struct DbFixer DbFixer; typedef struct Schema Schema; typedef struct Expr Expr; @@ -1734,6 +1735,7 @@ struct sqlite3 { i64 nDeferredCons; /* Net deferred constraints this transaction. */ i64 nDeferredImmCons; /* Net deferred immediate constraints */ int *pnBytesFreed; /* If not NULL, increment this in DbFree() */ + DbClientData *pDbData; /* sqlite3_set_clientdata() content */ #ifdef SQLITE_ENABLE_UNLOCK_NOTIFY /* The following variables are all protected by the STATIC_MAIN ** mutex, not by sqlite3.mutex. They are used by code in notify.c. @@ -4341,6 +4343,16 @@ struct CteUse { }; +/* Client data associated with sqlite3_set_clientdata() and +** sqlite3_get_clientdata(). +*/ +struct DbClientData { + DbClientData *pNext; /* Next in a linked list */ + void *pData; /* The data */ + void (*xDestructor)(void*); /* Destructor. Might be NULL */ + char zName[1]; /* Name of this client data. MUST BE LAST */ +}; + #ifdef SQLITE_DEBUG /* ** An instance of the TreeView object is used for printing the content of |