VSQLite++  0.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
sqlite::result Struct Reference

result can only be created by a query object. An object of this class is not copyable. More...

#include <result.hpp>

Inheritance diagram for sqlite::result:
Inheritance graph
Collaboration diagram for sqlite::result:
Collaboration graph

Public Member Functions

 ~result ()
 destructor
 
bool next_row ()
 Increases the row index.
 
int get_row_count ()
 Returns the number of rows in the result.
 
int get_column_count ()
 Returns the number of columns.
 
type get_column_type (int idx)
 Returns the type of the column.
 
std::string get_column_decltype (int idx)
 Returns the type of the column.
 
variant_t get_variant (int index)
 Retrieves a the current typ into variant_t.
 
int get_int (int idx)
 Returns the data at the given index as 32-Bit Integer.
 
boost::int64_t get_int64 (int idx)
 Returns the data at the given index as 64-Bit Integer.
 
std::string get_string (int idx)
 Returns the data at the given index as String.
 
double get_double (int idx)
 Returns the data at the given index as double.
 
size_t get_binary_size (int idx)
 Returns the size of the data at the given index in bytes.
 
void get_binary (int idx, void *buf, size_t buf_size)
 Used to retrieve a binary value.
 
void get_binary (int idx, std::vector< unsigned char > &vec)
 Used to retrieve a binary value.
 
std::string get_column_name (int idx)
 Returns the column name at the given index.
 

Private Types

typedef boost::shared_ptr
< result_construct_params_private
construct_params
 

Private Member Functions

 result (construct_params)
 
void access_check (int)
 

Private Attributes

construct_params m_params
 
int m_columns
 
int m_row_count
 

Friends

struct query
 

Detailed Description

result can only be created by a query object. An object of this class is not copyable.

Definition at line 46 of file result.hpp.

Member Typedef Documentation

Definition at line 48 of file result.hpp.

Constructor & Destructor Documentation

sqlite::result::result ( construct_params  )
private
sqlite::result::~result ( )

destructor

Member Function Documentation

void sqlite::result::access_check ( int  )
private
void sqlite::result::get_binary ( int  idx,
void *  buf,
size_t  buf_size 
)

Used to retrieve a binary value.

Parameters
idxcolumn index of the current row in the results
bufpointer to the buffer which should be filled
buf_sizesize in bytes of the buffer
void sqlite::result::get_binary ( int  idx,
std::vector< unsigned char > &  vec 
)

Used to retrieve a binary value.

Parameters
idxcolumn index of the current row in the results
veca std::vector<unsigned char> which will be filled the method will increase the allocated buffer if needed
size_t sqlite::result::get_binary_size ( int  idx)

Returns the size of the data at the given index in bytes.

Parameters
idxcolumn index of the current row in the results
Returns
a size_t value which represents the number of bytes needed for the binary data at idx
int sqlite::result::get_column_count ( )

Returns the number of columns.

Returns
an integer
std::string sqlite::result::get_column_decltype ( int  idx)

Returns the type of the column.

Parameters
idxcolumn index of the current row in the results
Returns
a string
std::string sqlite::result::get_column_name ( int  idx)

Returns the column name at the given index.

Parameters
idxcolumn index of the current row in the results
Returns
a std::string object containing the name of the column
type sqlite::result::get_column_type ( int  idx)

Returns the type of the column.

Parameters
idxcolumn index of the current row in the results
Returns
the column type
double sqlite::result::get_double ( int  idx)

Returns the data at the given index as double.

Parameters
idxcolumn index of the current row in the results
Returns
a double
int sqlite::result::get_int ( int  idx)

Returns the data at the given index as 32-Bit Integer.

Returns
a 32-Bit Integer
boost::int64_t sqlite::result::get_int64 ( int  idx)

Returns the data at the given index as 64-Bit Integer.

Parameters
idxcolumn index of the current row in the results
Returns
a 64-Bit Integer
int sqlite::result::get_row_count ( )

Returns the number of rows in the result.

Returns
an integer
std::string sqlite::result::get_string ( int  idx)

Returns the data at the given index as String.

Parameters
idxcolumn index of the current row in the results
Returns
a std::string object
variant_t sqlite::result::get_variant ( int  index)

Retrieves a the current typ into variant_t.

Parameters
idxcolumn index of the current row in the results
Returns
a value of variant_t
bool sqlite::result::next_row ( )

Increases the row index.

Returns
returns false if there is no more row, otherwise it returns true

Friends And Related Function Documentation

friend struct query
friend

Definition at line 49 of file result.hpp.

Member Data Documentation

int sqlite::result::m_columns
private

Definition at line 144 of file result.hpp.

construct_params sqlite::result::m_params
private

Definition at line 143 of file result.hpp.

int sqlite::result::m_row_count
private

Definition at line 145 of file result.hpp.


The documentation for this struct was generated from the following file: