Lines Matching refs:pSession

10023 SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
10043 SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);
10072 SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);
10132 sqlite3_session *pSession, /* Session object */
10146 sqlite3_session *pSession, /* Session object */
10259 sqlite3_session *pSession, /* Session object */
10321 sqlite3_session *pSession,
10357 sqlite3_session *pSession, /* Session object */
10377 SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);
11242 sqlite3_session *pSession,
11247 sqlite3_session *pSession,
179247 sqlite3_session *pSession, /* Session object that owns pTab */
179257 assert( pTab->nCol==pSession->hook.xCount(pSession->hook.pCtx) );
179265 rc = pSession->hook.xNew(pSession->hook.pCtx, i, &pVal);
179267 rc = pSession->hook.xOld(pSession->hook.pCtx, i, &pVal);
179579 sqlite3_session *pSession, /* Session object that owns SessionTable */
179603 rc = pSession->hook.xNew(pSession->hook.pCtx, iCol, &pVal);
179606 rc = pSession->hook.xOld(pSession->hook.pCtx, iCol, &pVal);
179833 static int sessionInitTable(sqlite3_session *pSession, SessionTable *pTab){
179837 pSession->rc = sessionTableInfo(pSession->db, pSession->zDb,
179840 if( pSession->rc==SQLITE_OK ){
179853 return (pSession->rc || pTab->abPK==0);
179865 sqlite3_session *pSession;
179872 pVal = p->pSession->pZeroBlob;
179882 pVal = p->pSession->pZeroBlob;
179907 sqlite3_session *pSession, /* Session object pTab is attached to */
179915 if( pSession->rc ) return;
179918 if( sessionInitTable(pSession, pTab) ) return;
179922 if( pTab->nCol!=pSession->hook.xCount(pSession->hook.pCtx) ){
179923 pSession->rc = SQLITE_SCHEMA;
179929 pSession->rc = SQLITE_NOMEM;
179934 stat1.hook = pSession->hook;
179935 stat1.pSession = pSession;
179936 pSession->hook.pCtx = (void*)&stat1;
179937 pSession->hook.xNew = sessionStat1New;
179938 pSession->hook.xOld = sessionStat1Old;
179939 pSession->hook.xCount = sessionStat1Count;
179940 pSession->hook.xDepth = sessionStat1Depth;
179941 if( pSession->pZeroBlob==0 ){
179948 pSession->pZeroBlob = p;
179955 rc = sessionPreupdateHash(pSession, pTab, op==SQLITE_INSERT, &iHash, &bNull);
179962 if( sessionPreupdateEqual(pSession, pTab, pC, op) ) break;
179981 TESTONLY(int trc = ) pSession->hook.xOld(pSession->hook.pCtx, i, &p);
179984 TESTONLY(int trc = ) pSession->hook.xNew(pSession->hook.pCtx, i, &p);
180012 pSession->hook.xOld(pSession->hook.pCtx, i, &p);
180014 pSession->hook.xNew(pSession->hook.pCtx, i, &p);
180020 if( pSession->bIndirect || pSession->hook.xDepth(pSession->hook.pCtx) ){
180031 if( pSession->hook.xDepth(pSession->hook.pCtx)==0
180032 && pSession->bIndirect==0
180042 pSession->hook = stat1.hook;
180045 pSession->rc = rc;
180050 sqlite3_session *pSession,
180059 for(pRet=pSession->pTable; pRet; pRet=pRet->pNext){
180063 if( pRet==0 && pSession->bAutoAttach ){
180066 if( pSession->xTableFilter==0
180067 || pSession->xTableFilter(pSession->pFilterCtx, zName)
180069 rc = sqlite3session_attach(pSession, zName);
180071 for(pRet=pSession->pTable; pRet->pNext; pRet=pRet->pNext);
180094 sqlite3_session *pSession;
180099 for(pSession=(sqlite3_session *)pCtx; pSession; pSession=pSession->pNext){
180105 if( pSession->bEnable==0 ) continue;
180106 if( pSession->rc ) continue;
180107 if( sqlite3_strnicmp(zDb, pSession->zDb, nDb+1) ) continue;
180109 pSession->rc = sessionFindTable(pSession, zName, &pTab);
180111 assert( pSession->rc==SQLITE_OK );
180112 sessionPreupdateOneChange(op, pSession, pTab);
180114 sessionPreupdateOneChange(SQLITE_INSERT, pSession, pTab);
180141 sqlite3_session *pSession
180143 pSession->hook.pCtx = (void*)pSession->db;
180144 pSession->hook.xOld = sessionPreupdateOld;
180145 pSession->hook.xNew = sessionPreupdateNew;
180146 pSession->hook.xCount = sessionPreupdateCount;
180147 pSession->hook.xDepth = sessionPreupdateDepth;
180182 sqlite3_session *pSession,
180185 pSession->hook.pCtx = (void*)pDiffCtx;
180186 pSession->hook.xOld = sessionDiffOld;
180187 pSession->hook.xNew = sessionDiffNew;
180188 pSession->hook.xCount = sessionDiffCount;
180189 pSession->hook.xDepth = sessionDiffDepth;
180264 sqlite3_session *pSession,
180277 rc = sqlite3_prepare(pSession->db, zStmt, -1, &pStmt, 0);
180279 SessionDiffCtx *pDiffCtx = (SessionDiffCtx*)pSession->hook.pCtx;
180283 sessionPreupdateOneChange(op, pSession, pTab);
180294 sqlite3_session *pSession,
180302 pSession->zDb, zFrom, pTab->zName, pTab->azCol, pTab->abPK
180309 pSession->zDb, pTab->zName, zFrom, pTab->zName, zExpr, zExpr2
180315 rc = sqlite3_prepare(pSession->db, zStmt, -1, &pStmt, 0);
180318 SessionDiffCtx *pDiffCtx = (SessionDiffCtx*)pSession->hook.pCtx;
180322 sessionPreupdateOneChange(SQLITE_UPDATE, pSession, pTab);
180334 sqlite3_session *pSession,
180339 const char *zDb = pSession->zDb;
180340 int rc = pSession->rc;
180344 sessionDiffHooks(pSession, &d);
180346 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
180350 sqlite3 *db = pSession->db;
180354 rc = sessionFindTable(pSession, zTbl, &pTo);
180356 if( sessionInitTable(pSession, pTo) ){
180357 rc = pSession->rc;
180400 rc = sessionDiffFindNew(SQLITE_INSERT, pSession, pTo, zDb, zFrom, zExpr);
180405 rc = sessionDiffFindNew(SQLITE_DELETE, pSession, pTo, zFrom, zDb, zExpr);
180410 rc = sessionDiffFindModified(pSession, pTo, zFrom, zExpr);
180417 sessionPreupdateHooks(pSession);
180418 sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));
180488 SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){
180489 sqlite3 *db = pSession->db;
180498 if( (*pp)==pSession ){
180505 sqlite3ValueFree(pSession->pZeroBlob);
180509 sessionDeleteTable(pSession->pTable);
180512 sqlite3_free(pSession);
180519 sqlite3_session *pSession,
180523 pSession->bAutoAttach = 1;
180524 pSession->pFilterCtx = pCtx;
180525 pSession->xTableFilter = xFilter;
180537 sqlite3_session *pSession, /* Session object */
180541 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
180544 pSession->bAutoAttach = 1;
180552 for(pTab=pSession->pTable; pTab; pTab=pTab->pNext){
180571 for(ppTab=&pSession->pTable; *ppTab; ppTab=&(*ppTab)->pNext);
180577 sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));
181114 sqlite3_session *pSession, /* Session object */
181121 sqlite3 *db = pSession->db; /* Source database handle */
181136 if( pSession->rc ) return pSession->rc;
181137 rc = sqlite3_exec(pSession->db, "SAVEPOINT changeset", 0, 0, 0);
181142 for(pTab=pSession->pTable; rc==SQLITE_OK && pTab; pTab=pTab->pNext){
181154 rc = sessionTableInfo(db, pSession->zDb, zName, &nCol, 0, &azCol, &abPK);
181165 db, pSession->zDb, zName, nCol, azCol, abPK, &pSel);
181240 sqlite3_session *pSession, /* Session object */
181244 return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);
181251 sqlite3_session *pSession,
181255 return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);
181262 sqlite3_session *pSession,
181266 return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);
181277 sqlite3_session *pSession, /* Session object */
181281 return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);
181287 SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){
181289 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
181291 pSession->bEnable = bEnable;
181293 ret = pSession->bEnable;
181294 sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));
181301 SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
181303 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
181305 pSession->bIndirect = bIndirect;
181307 ret = pSession->bIndirect;
181308 sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));
181316 SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){
181320 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
181321 for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){
181324 sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));