/sqlite3cc

To get this branch, use:
bzr branch http://bzr.ed.am/sqlite3cc

« back to all changes in this revision

Viewing changes to TODO

  • Committer: edam
  • Date: 2010-07-29 20:56:19 UTC
  • Revision ID: edam@waxworlds.org-20100729205619-a9yo4uzu647nvnsj
- renamed database to connection to better identify what it is (would database_connection be better though?)
- moved basic_statement and basic_transaction to sqlite::detail
- made sqlite::threadsafe() return the threading mode int, not a bool
- renamed row::index() to row_number() so it isn't confused with column index
- added typedef for deferred_transaction
- added early rollback method to transaction_guard
- allowed transaction_guard::~transaction_guard() to throw exceptions, since when it needs to, we're really screwed anyway
- bugfix: query::reset() didn't reset the internal row counter
- added query::num_results()
- added docs/design-notes
- reimplemented query::iterator so that increment() (which performs a step() on the query) now caches the returned row to be returned during dereference() (previously it stashed details and returned new row!?)
- bugfix: resetting active queries during rollbacks would hang!

Show diffs side-by-side

added added

removed removed

1
 
- add columns() to row that returns a boost::tuple of various types so multple
2
 
        columns can be fetched at once (look in to using BOOST_PP_ITERATE macro)
 
1
- check that the fix for in-progress queries during rollback is threadsafe. In
 
2
        particular, we shouldn't be resetting queries from another thread! Does
 
3
        sqlite3_next_stmt() only return statements from this thread?
 
4
 
 
5
- turn on extended errcodes in open() and handle them in sqlite_error
3
6
 
4
7
- make basic_statement and database keep a shared pointer to the database handle
5
8
        so the classes can be made copyable. The wrappers around the handle
10
13
                basic_statements, querys and commands copyable. Could weak_ptrs to these
11
14
                also be used in the database's list active querys?
12
15
 
13
 
- fix to force the finalisation of queries in progress for transactions causes
14
 
        errors; queries are now finalised twice, the second from basic_statement's
15
 
        dtor, which causes a segfault. We could:
16
 
        - keep a list of force-finalised sqlite3_stmt pointers in the database which
17
 
                we use to check queries against before finalising them to make sure we
18
 
                don't finalise them a second time
19
 
                - an efficient implementation, but not very OO
20
 
        - keep a map of active queries in the database (using the sqlite3_stmt
21
 
                pointer as the key), so that we can obtain the query and tell it to
22
 
                finalise its self
23
 
                - this seems like a messy and complicated implementation
24
 
 
25
 
- turn on extended errcodes in open() and handle them in sqlite_error
 
16
- add columns() to row that returns a boost::tuple of various types so multple
 
17
        columns can be fetched at once (look in to using BOOST_PP_ITERATE macro)
26
18
 
27
19
- use sqlite3_db_mutex() to provide extended error information during
28
 
        sqlite_error construction. The genreeal procedure would be to lock the db
 
20
        sqlite_error construction. The general procedure would be to lock the db
29
21
        mutex, perform some sqlite3 command, check the error code, throw an
30
22
        sqlite_error (whilst obtaining extended error info) and then unlock the db
31
23
        mutex. Two options: