74
73
const std::string &sql );
77
* Peform a step() and return row object that can be used to retrieve the
76
* Perform a step() and return row object that can be used to retrieve the
79
78
* @return a row object
84
* Get the number of columns in the result of
83
* Get the number of columns in the results
84
* @see sqlite3_column_count()
86
86
unsigned int column_count();
89
* Get the name of a column in the results
90
* @param index column index
91
* @see sqlite3_column_name()
93
const std::string column_name(
97
* Query iterator which can be used to obtain rows
101
public boost::iterator_facade< iterator, row,
102
boost::single_pass_traversal_tag, row >
106
explicit iterator( query &query, bool valid );
109
friend class boost::iterator_core_access;
111
row dereference() const;
113
bool equal( iterator const &other ) const;
115
/** is this iterator still pointing to a valid row? */
123
* Return an iterator to the initial row. Note that creating an iterator
124
* causes step() to be called, so it should only be called to begin
125
* iterating over the rows and not for comparison.
126
* @return a query iterator
131
* Return an iterator to after the last row (i.e., an invalid row).
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
145
int code = bind( _bind_index, value );
146
if( code != SQLITE_OK ) throw sqlite_error( _database, code );
151
//______________________________________________________________________________
155
/** next row index */
156
unsigned long long _next_row;
161
// template specialisations for query::operator <<()
163
query &query::operator << < detail::null_t >(
164
const detail::null_t & );
166
query &query::operator << < detail::set_index_t >(
167
const detail::set_index_t &t );
91
170
} // namespace sqlite