/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/query.h

  • Committer: edam
  • Date: 2010-07-23 09:17:03 UTC
  • Revision ID: edam@waxworlds.org-20100723091703-3siqjj6eeux9hupz
- added NEWS
- added library checks to configure.ac
- added query::iterators
- remove dependency that rows have on querys (since querys have to be dependent on rows for boost::iterator_facade to work)
- rows now have the handle to the sqlite3 statement and know a count of their row number
- added convenience function tht can be used to detect presence of sqlite3cc in other packages
- updated test-main
- renamed all subdir.mk files to emake.mk

Show diffs side-by-side

added added

removed removed

73
73
                const std::string &sql );
74
74
 
75
75
        /**
76
 
         * Perform a step() and return row object that can be used to retrieve the
 
76
         * Peform a step() and return row object that can be used to retrieve the
77
77
         * results.
78
78
         * @return a row object
79
79
         */
132
132
         */
133
133
        iterator end();
134
134
 
135
 
        /**
136
 
         * Stream operator is used to bind values to parameters automatically, in
137
 
         * ascending order. In addition, the null and set_index() auto-binding
138
 
         * manipulators can be used.
139
 
         * @param value a value to bind
140
 
         */
141
 
        template< class T >
142
 
        query &operator <<(
143
 
                const T &value )
144
 
        {
145
 
                int code = bind( _bind_index, value );
146
 
                if( code != SQLITE_OK ) throw sqlite_error( _database, code );
147
 
                _bind_index++;
148
 
                return *this;
149
 
        }
150
 
 
151
135
//______________________________________________________________________________
152
136
//                                                                implementation
153
137
private:
158
142
};
159
143
 
160
144
 
161
 
// template specialisations for query::operator <<()
162
 
template< >
163
 
query &query::operator << < detail::null_t >(
164
 
        const detail::null_t & );
165
 
template< >
166
 
query &query::operator << < detail::set_index_t >(
167
 
        const detail::set_index_t &t );
168
 
 
169
 
 
170
145
} // namespace sqlite
171
146
 
172
147