SQLiteXX  0.1.0
 All Classes Namespaces Files Functions Enumerations Enumerator
Public Member Functions | List of all members
sqlite::reader< T > Class Template Reference

Base class used to help with reading "sqlite3_stmt" information. More...

#include <Statement.h>

Public Member Functions

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

template<typename T>
class sqlite::reader< T >

Base class used to help with reading "sqlite3_stmt" information.

This class is meant to be inherited from.

Definition at line 30 of file Statement.h.

Member Function Documentation

template<typename T>
int sqlite::reader< T >::column_count ( ) const
inlinenoexcept

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.

template<typename T>
const blob sqlite::reader< T >::get_blob ( const int  column) const
inlinenoexcept

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.

template<typename T>
const blob sqlite::reader< T >::get_blob ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
int sqlite::reader< T >::get_bytes ( const int  column) const
inlinenoexcept

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.

template<typename T>
int sqlite::reader< T >::get_bytes ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
int sqlite::reader< T >::get_column_index ( const std::string &  name) const
inline

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.

template<typename T>
const char* sqlite::reader< T >::get_column_name ( const int  index) const
inlinenoexcept

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.

template<typename T>
const char16_t* sqlite::reader< T >::get_column_wide_name ( const int  index) const
inlinenoexcept

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.

template<typename T>
double sqlite::reader< T >::get_double ( const int  column) const
inlinenoexcept

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.

template<typename T>
double sqlite::reader< T >::get_double ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
int sqlite::reader< T >::get_int ( const int  column) const
inlinenoexcept

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.

template<typename T>
int sqlite::reader< T >::get_int ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
int64_t sqlite::reader< T >::get_int64 ( const int  column) const
inlinenoexcept

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.

template<typename T>
int64_t sqlite::reader< T >::get_int64 ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
const std::string sqlite::reader< T >::get_string ( const int  column) const
inlinenoexcept

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.

template<typename T>
const std::string sqlite::reader< T >::get_string ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
datatype sqlite::reader< T >::get_type ( const int  column) const
inlinenoexcept

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.

template<typename T>
datatype sqlite::reader< T >::get_type ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
const std::u16string sqlite::reader< T >::get_u16string ( const int  column) const
inlinenoexcept

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.

template<typename T>
const std::u16string sqlite::reader< T >::get_u16string ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
unsigned int sqlite::reader< T >::get_uint ( const int  column) const
inlinenoexcept

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.

template<typename T>
unsigned int sqlite::reader< T >::get_uint ( const std::string &  name) const
inlinenoexcept

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.

template<typename T>
value sqlite::reader< T >::get_value ( const int  column) const
inlinenoexcept

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.

template<typename T>
value sqlite::reader< T >::get_value ( const std::string &  name) const
inline

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.


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