SQLiteXX  0.1.0
 All Classes Namespaces Files Functions Enumerations Enumerator
Public Member Functions | List of all members
sqlite::row Class Reference

Represents a returned row when stepping through a "SELECT" statement. More...

#include <Statement.h>

Inheritance diagram for sqlite::row:
sqlite::reader< row >

Public Member Functions

 row (sqlite3_stmt *const statement) noexcept
 Constructs a row object from a sqlite3_stmt.
 
sqlite3_stmt * handle () const noexcept
 Returns pointer to the underlying "sqlite3_stmt" object.
 
value operator[] (int column) const
 Access specified element of a row. More...
 
value operator[] (const std::string &name) const
 Access specified element of a row. More...
 
int get_int (const int column) const noexcept
 Returns the specified column value as an integer. More...
 
int get_int (const std::string &name) const noexcept
 Returns the specified column value as an integer. More...
 
int64_t get_int64 (const int column) const noexcept
 Returns the specified column value as a 64-bit integer. More...
 
int64_t get_int64 (const std::string &name) const noexcept
 Returns the specified column value as a 64-bit integer. More...
 
unsigned int get_uint (const int column) const noexcept
 Returns the specified column value as an unsigned integer. More...
 
unsigned int get_uint (const std::string &name) const noexcept
 Returns the specified column value as an unsigned integer. More...
 
double get_double (const int column) const noexcept
 Returns the specified column value as a double. More...
 
double get_double (const std::string &name) const noexcept
 Returns the specified column value as a double. More...
 
const blob get_blob (const int column) const noexcept
 Returns the specified column value as a blob object. More...
 
const blob get_blob (const std::string &name) const noexcept
 Returns the specified column value as a Blob object. More...
 
const std::string get_string (const int column) const noexcept
 Returns the specified column value as a string. More...
 
const std::string get_string (const std::string &name) const noexcept
 Returns the specified column value as a string. More...
 
const std::u16string get_u16string (const int column) const noexcept
 Returns the specified column value as a UTF-16 string. More...
 
const std::u16string get_u16string (const std::string &name) const noexcept
 Returns the specified column value as a UTF-16 string. More...
 
value get_value (const int column) const noexcept
 Returns the specified column value as a value object. More...
 
value get_value (const std::string &name) const
 Returns the specified column value as a value object. More...
 
int get_bytes (const int column) const noexcept
 Returns the size in bytes of the column value. More...
 
int get_bytes (const std::string &name) const noexcept
 Returns the size in bytes of the column value. More...
 
datatype get_type (const int column) const noexcept
 Returns the type of the specified column. More...
 
datatype get_type (const std::string &name) const noexcept
 Returns the type of the specified column. More...
 
int column_count () const noexcept
 Returns the number of columns in the result set returned by the prepared statement. More...
 
const char * get_column_name (const int index) const noexcept
 Returns the name assigned to a particular column. More...
 
const char16_t * get_column_wide_name (const int index) const noexcept
 Returns the name assigned to a particular column. More...
 
int get_column_index (const std::string &name) const
 Returns the position of a column with the specified name. More...
 

Detailed Description

Represents a returned row when stepping through a "SELECT" statement.

Definition at line 307 of file Statement.h.

Member Function Documentation

int sqlite::reader< row >::column_count ( ) const
inlinenoexceptinherited

Returns the number of columns in the result set returned by the prepared statement.

If this method returns 0, that means the prepared statment returns no data (for example an UPDATE).

Returns
The number of columns in the result set.

Definition at line 234 of file Statement.h.

const blob sqlite::reader< row >::get_blob ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as a blob object.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 116 of file Statement.h.

const blob sqlite::reader< row >::get_blob ( const std::string &  name) const
inlinenoexceptinherited

Returns the specified column value as a Blob object.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 126 of file Statement.h.

int sqlite::reader< row >::get_bytes ( const int  column) const
inlinenoexceptinherited

Returns the size in bytes of the column value.

Parameters
[in]columnposition of the column to return
Returns
the size in bytes of the column value

Definition at line 196 of file Statement.h.

int sqlite::reader< row >::get_bytes ( const std::string &  name) const
inlinenoexceptinherited

Returns the size in bytes of the column value.

Parameters
[in]namename of the column to return
Returns
the size in bytes of the column value

Definition at line 205 of file Statement.h.

int sqlite::reader< row >::get_column_index ( const std::string &  name) const
inlineinherited

Returns the position of a column with the specified name.

Returns
The position of the column
Exceptions
SQLiteXXExceptionif no column with specified name was found

Definition at line 261 of file Statement.h.

const char* sqlite::reader< row >::get_column_name ( const int  index) const
inlinenoexceptinherited

Returns the name assigned to a particular column.

Parameters
[in]indexthe position of the column
Returns
The name of the specified column.

Definition at line 243 of file Statement.h.

const char16_t* sqlite::reader< row >::get_column_wide_name ( const int  index) const
inlinenoexceptinherited

Returns the name assigned to a particular column.

Parameters
[in]indexthe position of the column
Returns
The name of the specified column.

Definition at line 252 of file Statement.h.

double sqlite::reader< row >::get_double ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as a double.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 97 of file Statement.h.

double sqlite::reader< row >::get_double ( const std::string &  name) const
inlinenoexceptinherited

Returns the specified column value as a double.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 106 of file Statement.h.

int sqlite::reader< row >::get_int ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as an integer.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 40 of file Statement.h.

int sqlite::reader< row >::get_int ( const std::string &  name) const
inlinenoexceptinherited

Returns the specified column value as an integer.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 49 of file Statement.h.

int64_t sqlite::reader< row >::get_int64 ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as a 64-bit integer.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 59 of file Statement.h.

int64_t sqlite::reader< row >::get_int64 ( const std::string &  name) const
inlinenoexceptinherited

Returns the specified column value as a 64-bit integer.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 68 of file Statement.h.

const std::string sqlite::reader< row >::get_string ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as a string.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 136 of file Statement.h.

const std::string sqlite::reader< row >::get_string ( const std::string &  name) const
inlinenoexceptinherited

Returns the specified column value as a string.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 146 of file Statement.h.

datatype sqlite::reader< row >::get_type ( const int  column) const
inlinenoexceptinherited

Returns the type of the specified column.

Parameters
[in]columnposition of the column to return
Returns
The sqlite::datatype value for a column

Definition at line 215 of file Statement.h.

datatype sqlite::reader< row >::get_type ( const std::string &  name) const
inlinenoexceptinherited

Returns the type of the specified column.

Parameters
[in]namename of the column to return
Returns
The sqlite::datatype value for a column

Definition at line 224 of file Statement.h.

const std::u16string sqlite::reader< row >::get_u16string ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as a UTF-16 string.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 156 of file Statement.h.

const std::u16string sqlite::reader< row >::get_u16string ( const std::string &  name) const
inlinenoexceptinherited

Returns the specified column value as a UTF-16 string.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 166 of file Statement.h.

unsigned int sqlite::reader< row >::get_uint ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as an unsigned integer.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 78 of file Statement.h.

unsigned int sqlite::reader< row >::get_uint ( const std::string &  name) const
inlinenoexceptinherited

Returns the specified column value as an unsigned integer.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 87 of file Statement.h.

value sqlite::reader< row >::get_value ( const int  column) const
inlinenoexceptinherited

Returns the specified column value as a value object.

Parameters
[in]columnposition of the column to return
Returns
value of column as integer

Definition at line 176 of file Statement.h.

value sqlite::reader< row >::get_value ( const std::string &  name) const
inlineinherited

Returns the specified column value as a value object.

Parameters
[in]namename of the column to return
Returns
value of column as integer

Definition at line 185 of file Statement.h.

value sqlite::row::operator[] ( int  column) const
inline

Access specified element of a row.

Parameters
[in]columnposition of the column to return
Returns
value object representing requested element

Definition at line 328 of file Statement.h.

value sqlite::row::operator[] ( const std::string &  name) const
inline

Access specified element of a row.

Parameters
[in]namecolumn name of the column to return
Returns
value object representing requested element

Definition at line 337 of file Statement.h.


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