/sqlite3cc

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

« back to all changes in this revision

Viewing changes to include/sqlite3cc/database.h

  • Committer: edam
  • Date: 2010-07-29 09:16:26 UTC
  • Revision ID: edam@waxworlds.org-20100729091626-h8fmg0r74eyfo5ae
- fixed error caused by finialising in-progress queries during rollback that were later finaliased by RAII.

Show diffs side-by-side

added added

removed removed

34
34
 
35
35
 
36
36
class basic_statement;
37
 
class transaction;
 
37
class basic_transaction;
38
38
 
39
39
 
40
40
class database
98
98
 
99
99
//______________________________________________________________________________
100
100
//                                                                implementation
101
 
private:
 
101
protected:
102
102
 
103
103
        friend class basic_statement;
 
104
        friend class basic_transaction;
104
105
        friend class command;
 
106
        friend class query;
 
107
        friend class sqlite_error;
 
108
 
 
109
        /** class to provide a scope lock for the database mutex */
 
110
        class database_mutex_guard
 
111
        {
 
112
        public:
 
113
 
 
114
                /** constructor that provides a database */
 
115
                database_mutex_guard(
 
116
                        database &database );
 
117
 
 
118
                ~database_mutex_guard();
 
119
 
 
120
                /** release the mutex early */
 
121
                void leave();
 
122
 
 
123
        private:
 
124
                sqlite3_mutex *_mutex;
 
125
        };
 
126
 
 
127
private:
105
128
 
106
129
        /** the database handle */
107
130
        sqlite3 *_handle;