libtabula::StoreQueryResult Class Reference

StoreQueryResult set type for "store" queries. More...

#include <result.h>

Inheritance diagram for libtabula::StoreQueryResult:
Inheritance graph
Collaboration diagram for libtabula::StoreQueryResult:
Collaboration graph

List of all members.

Public Types

typedef std::vector< Rowlist_type
 type of vector base class

Public Member Functions

 StoreQueryResult ()
 Default constructor.
 StoreQueryResult (MYSQL_RES *result, DBDriver *dbd, bool te=true)
 Fully initialize object.
 StoreQueryResult (const StoreQueryResult &other)
 Initialize object as a copy of another StoreQueryResult object.
 ~StoreQueryResult ()
 Destroy result set.
list_type::size_type num_rows () const
 Returns the number of rows in this result set.
StoreQueryResultoperator= (const StoreQueryResult &rhs)
 Copy another StoreQueryResult object's data into this object.
 operator private_bool_type () const
 Test whether the query that created this result succeeded.

Detailed Description

StoreQueryResult set type for "store" queries.

This is the obvious C++ implementation of a class to hold results from a SQL query that returns rows: a specialization of std::vector holding Row objects in memory so you get random-access semantics. Libtabula also supports UseQueryResult which is less friendly, but has better memory performance. See the user manual for more details on the distinction and the usage patterns required.

Member Function Documentation

libtabula::StoreQueryResult::operator private_bool_type (  )  const [inline]

Test whether the query that created this result succeeded.

If you test this object in bool context and it's false, it's a signal that the query this was created from failed in some way. Call Query::error() or Query::errnum() to find out what exactly happened.

The documentation for this class was generated from the following files:

Generated on 26 May 2014 for Libtabula by  doxygen 1.6.1