Message377935
It would be useful to provide a wrapper (in the Python sqlite3 stdlib module) for the sqlite3_serialize API. This API allows you to get a database's content as a byte string, as if you had called open('foo.sqlite3', 'rb').read(). sqlite3_serialize can even be used for :memory: databases, which I think is the most interesting use-case.
Concretely, I'd propose adding a .serialize() method on sqlite3.Connection objects that returns a bytes object representing the serialized database. It would be similar to the .iterdump() method except that it would use the binary format instead of the text format, and it would return all the data at once instead of an iterator (because that's how the underlying sqlite API works). |
|
| Date |
User |
Action |
Args |
| 2020-10-04 12:05:11 | Kerrick Staley | set | recipients:
+ Kerrick Staley |
| 2020-10-04 12:05:11 | Kerrick Staley | set | messageid: <1601813111.02.0.183059099502.issue41930@roundup.psfhosted.org> |
| 2020-10-04 12:05:11 | Kerrick Staley | link | issue41930 messages |
| 2020-10-04 12:05:10 | Kerrick Staley | create | |
|