VSQLite++ 0.3
Loading...
Searching...
No Matches
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_privateconstruct_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

◆ construct_params

Definition at line 48 of file result.hpp.

Constructor & Destructor Documentation

◆ result()

sqlite::result::result ( construct_params )
private

◆ ~result()

sqlite::result::~result ( )

destructor

Member Function Documentation

◆ access_check()

void sqlite::result::access_check ( int )
private

◆ get_binary() [1/2]

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

◆ get_binary() [2/2]

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

◆ get_binary_size()

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

◆ get_column_count()

int sqlite::result::get_column_count ( )

Returns the number of columns.

Returns
an integer

◆ get_column_decltype()

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

◆ get_column_name()

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

◆ get_column_type()

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

◆ get_double()

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

◆ get_int()

int sqlite::result::get_int ( int idx)

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

Returns
a 32-Bit Integer

◆ get_int64()

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

◆ get_row_count()

int sqlite::result::get_row_count ( )

Returns the number of rows in the result.

Returns
an integer

◆ get_string()

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

◆ get_variant()

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

◆ next_row()

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 Symbol Documentation

◆ query

friend struct query
friend

Definition at line 49 of file result.hpp.

Member Data Documentation

◆ m_columns

int sqlite::result::m_columns
private

Definition at line 144 of file result.hpp.

◆ m_params

construct_params sqlite::result::m_params
private

Definition at line 143 of file result.hpp.

◆ m_row_count

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: