Checkout
glasser
committed
on 09 Dec 07
Wrap sqlite3_stmt inside a svn_fs__sqlite_stmt_t struct, which also
includes a pointer to the db.

This has two positive results:
- we sto… Show more
Wrap sqlite3_stmt inside a svn_fs__sqlite_stmt_t struct, which also

includes a pointer to the db.

This has two positive results:

 - we stop using sqlite3_db_handle, which is relatively new to sqlite

 - we introduce a few new helpers for getting values from queries,

   which reduces the number of casts we make

* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c

 (index_path_mergeinfo, table_has_any_rows_with_rev,

  parse_mergeinfo_from_db, get_mergeinfo_for_path,

  get_mergeinfo_for_children): Adjust.  (Pool usage may

  need to be reaudited.)

* subversion/libsvn_fs_util/node-origins-sqlite-index.c

 (get_origin, set_origin): Adjust.

* subversion/libsvn_fs_util/sqlite-util.h

* subversion/libsvn_fs_util/sqlite-util.c

 (struct svn_fs__sqlite_stmt_t): New.

 (svn_fs__sqlite_prepare): Take a pool argument; return a struct

  containing the statement and the db.

 (step_with_expectation, svn_fs__sqlite_step_done,

  svn_fs__sqlite_step_row, svn_fs__sqlite_step,

  svn_fs__sqlite_bind_int64, svn_fs__sqlite_bind_text,

  svn_fs__sqlite_finalize, svn_fs__sqlite_reset, upgrade_format):

  Adjust.

 (svn_fs__sqlite_reset): Remove a random declaration.

 (svn_fs__sqlite_column_text, svn_fs__sqlite_column_revnum,

  svn_fs__sqlite_column_boolean, svn_fs__sqlite_column_int): New.

Show less