29 #if !defined(MYSQLPP_RESULT_H) 
   30 #define MYSQLPP_RESULT_H 
   68                         ulonglong rows, 
const std::string& info) :
 
   69         copacetic_(copacetic),
 
   70         insert_id_(insert_id),
 
   82         operator private_bool_type()
 const 
   84                 return copacetic_ ? &SimpleResult::copacetic_ : 0;
 
   91         ulonglong 
rows()
 const { 
return rows_; }
 
   95         const char* 
info()
 const { 
return info_.c_str(); }
 
  118                         { 
return fields_.at(current_field_++); }
 
  122                         { 
return fields_.at(i); }
 
  125         const Field& 
field(
unsigned int i)
 const { 
return fields_.at(i); }
 
  128         const Fields& 
fields()
 const { 
return fields_; }
 
  132                         { 
return names_->at(i); }
 
  141         int field_num(
const std::string&) 
const;
 
  145                         { 
return types_->at(i); }
 
  157                         { 
return fields_.empty() ? 
"" : fields_[0].table(); }
 
  211                 public std::vector<Row>
 
  247         list_type::size_type 
num_rows()
 const { 
return size(); }
 
  252                         { 
return this != &rhs ? copy(rhs) : *
this; }
 
  260         operator private_bool_type()
 const 
  262                 return copacetic_ ? &StoreQueryResult::copacetic_ : 0;
 
  287                         mysql_free_result(doomed);
 
  322                         { 
return this != &rhs ? copy(rhs) : *
this; }
 
  326                         { 
return fields_.at(current_field_++); }
 
  330                         { 
return fields_.at(i); }
 
  337         const unsigned long* fetch_lengths() 
const;
 
  346         Row fetch_row() 
const;
 
  354         MYSQL_ROW fetch_raw_row() 
const;
 
  361                         { current_field_ = field; }
 
  385         operator MYSQL_RES*() 
const { 
return result_.raw(); }
 
  407 swap(StoreQueryResult& x, StoreQueryResult& y)
 
  409         StoreQueryResult tmp = x;
 
  416 swap(UseQueryResult& x, UseQueryResult& y)
 
  418         UseQueryResult tmp = x;
 
  425 #endif // !defined(MYSQLPP_RESULT_H) 
ResultBase()
Create empty object. 
Definition: result.h:161
StoreQueryResult set type for "store" queries. 
Definition: result.h:209
SimpleResult(bool copacetic, ulonglong insert_id, ulonglong rows, const std::string &info)
Initialize object. 
Definition: result.h:67
Declares a class to hold a list of SQL field type info. 
const Field & fetch_field(Fields::size_type i) const 
Returns the given field in this result set. 
Definition: result.h:329
const char * info() const 
Get any additional information about the query returned by the server. 
Definition: result.h:95
size_t num_fields() const 
Returns the number of fields in this result set. 
Definition: result.h:153
const RefCountedPointer< FieldTypes > & field_types() const 
Get a list of the types of the fields within this result set. 
Definition: result.h:149
void field_seek(Fields::size_type field) const 
Jumps to the given field within the result set. 
Definition: result.h:360
virtual ~ResultBase()
Destroy object. 
Definition: result.h:114
void operator()(MYSQL_RES *doomed) const 
Functor implementation. 
Definition: result.h:284
const FieldTypes::value_type & field_type(int i) const 
Get the type of a particular field within this result set. 
Definition: result.h:144
RefCountedPointer< FieldTypes > types_
list of field types in result 
Definition: result.h:187
const Fields & fields() const 
Get the underlying Fields structure. 
Definition: result.h:128
Holds information about the result of queries that don't return rows. 
Definition: result.h:48
Class to hold information about a SQL field. 
Definition: field.h:46
Functor to call delete on the pointer you pass to it. 
Definition: refcounted.h:45
Fields fields_
list of fields in result 
Definition: result.h:181
list_type::size_type num_rows() const 
Returns the number of rows in this result set. 
Definition: result.h:247
ulonglong insert_id() const 
Get the last value used for an AUTO_INCREMENT field. 
Definition: result.h:88
Declares the RefCountedPointer template. 
const Field & fetch_field() const 
Returns the next field in this result set. 
Definition: result.h:117
StoreQueryResult set type for "use" queries. 
Definition: result.h:298
SimpleResult()
Default ctor. 
Definition: result.h:59
ResultBase(const ResultBase &other)
Create object as a copy of another ResultBase. 
Definition: result.h:171
Fields::size_type current_field_
Default field index used by fetch_field() 
Definition: result.h:196
DBDriver * driver_
Access to DB driver; fully initted if nonzero. 
Definition: result.h:180
const char * table() const 
Return the name of the table the result set comes from. 
Definition: result.h:156
const Field & fetch_field() const 
Returns the next field in this result set. 
Definition: result.h:325
Declares a class to hold a list of field names. 
StoreQueryResult()
Default constructor. 
Definition: result.h:224
Manages rows from a result set. 
Definition: row.h:63
const RefCountedPointer< FieldNames > & field_names() const 
Get the names of the fields within this result set. 
Definition: result.h:135
Declares the MySQL++-specific exception classes. 
RefCountedPointer< FieldNames > names_
list of field names in result 
Definition: result.h:184
Interface allowing a class to have optional exceptions. 
Definition: noexceptions.h:71
ulonglong rows() const 
Get the number of rows affected by the query. 
Definition: result.h:91
StoreQueryResult(const StoreQueryResult &other)
Initialize object as a copy of another StoreQueryResult object. 
Definition: result.h:235
~UseQueryResult()
Destroy object. 
Definition: result.h:318
Base class for StoreQueryResult and UseQueryResult. 
Definition: result.h:110
const Field & field(unsigned int i) const 
Get the underlying Field structure given its index. 
Definition: result.h:125
~StoreQueryResult()
Destroy result set. 
Definition: result.h:244
Creates an object that acts as a reference-counted pointer to another object. 
Definition: refcounted.h:80
Declares the Field and Fields classes. 
Declares the classes for holding row data from a result set. 
UseQueryResult(const UseQueryResult &other)
Create a copy of another UseQueryResult object. 
Definition: result.h:311
This file includes top-level definitions for use both internal to the library, and outside it...
std::vector< Row > list_type
type of vector base class 
Definition: result.h:221
Declares interface that allows exceptions to be optional. 
Provides a thin abstraction layer over the underlying database client library. 
Definition: dbdriver.h:57
const std::string & field_name(int i) const 
Get the name of the field at the given index. 
Definition: result.h:131
UseQueryResult()
Default constructor. 
Definition: result.h:302
const Field & fetch_field(Fields::size_type i) const 
Returns the given field in this result set. 
Definition: result.h:121