SQLite

Check-in [bee44ebc53]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the sqlite3changebatch_db() API.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | changebatch
Files: files | file ages | folders
SHA1: bee44ebc532f37e3fe61c18878e0d3db06805190
User & Date: dan 2016-08-24 19:14:59.159
Context
2016-12-07
07:46
Merge latest trunk changes into this branch. (Leaf check-in: 391344d88a user: dan tags: changebatch)
2016-08-24
19:14
Add the sqlite3changebatch_db() API. (check-in: bee44ebc53 user: dan tags: changebatch)
2016-08-23
19:02
Add further tests for changebatch. And a fix to prevent a changeset from conflicting with itself. (check-in: 506d6ff4b6 user: dan tags: changebatch)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/session/sqlite3changebatch.c.
471
472
473
474
475
476
477







478
479
  sqlite3changebatch_zero(p);
  for(pTab=p->pTab; pTab; pTab=pTabNext){
    pTabNext = pTab->pNext;
    cbFreeTable(pTab);
  }
  cbFree(p);
}








#endif /* SQLITE_ENABLE_SESSION && SQLITE_ENABLE_PREUPDATE_HOOK */







>
>
>
>
>
>
>


471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
  sqlite3changebatch_zero(p);
  for(pTab=p->pTab; pTab; pTab=pTabNext){
    pTabNext = pTab->pNext;
    cbFreeTable(pTab);
  }
  cbFree(p);
}

/*
** Return the db handle.
*/
sqlite3 *sqlite3changebatch_db(sqlite3_changebatch *p){
  return p->db;
}

#endif /* SQLITE_ENABLE_SESSION && SQLITE_ENABLE_PREUPDATE_HOOK */
Changes to ext/session/sqlite3changebatch.h.
62
63
64
65
66
67
68







69
70
71
72
73
74
75

/*
** Zero a changebatch object. This causes the records of all earlier 
** calls to sqlite3changebatch_add() to be discarded.
*/
void sqlite3changebatch_zero(sqlite3_changebatch*);








/*
** Delete a changebatch object.
*/
void sqlite3changebatch_delete(sqlite3_changebatch*);

#endif /* !defined(SQLITECHANGEBATCH_H_) */








>
>
>
>
>
>
>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

/*
** Zero a changebatch object. This causes the records of all earlier 
** calls to sqlite3changebatch_add() to be discarded.
*/
void sqlite3changebatch_zero(sqlite3_changebatch*);

/*
** Return a copy of the first argument passed to the sqlite3changebatch_new()
** call used to create the changebatch object passed as the only argument
** to this function.
*/
sqlite3 *sqlite3changebatch_db(sqlite3_changebatch*);

/*
** Delete a changebatch object.
*/
void sqlite3changebatch_delete(sqlite3_changebatch*);

#endif /* !defined(SQLITECHANGEBATCH_H_) */