mksqlite  2.5
A MATLAB interface to SQLite
Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
ValueSQLCol Class Reference

Class encapsulating a complete SQL table column with type and name. More...

#include <value.hpp>

Public Types

typedef pair< string, string > StringPair
 Holds one table column name (first=SQL name, second=MATLAB name)
 
typedef vector< StringPairStringPairList
 list of string pairs
 

Public Member Functions

 ValueSQLCol (StringPair name)
 Ctor with column name-pair.
 
 ~ValueSQLCol ()
 Dtor. More...
 
void Destroy (int row)
 Deleting a single row element. More...
 
size_t size ()
 Returns the row count.
 
const ValueSQL operator[] (int index)
 Indexing operator. More...
 
void swapToAnyType ()
 Transform storage type. More...
 
void append (double value)
 Appends a new row element (floating point)
 
void append (sqlite3_int64 value)
 Appends a new row element (integer)
 
void append (const char *value)
 Appends a new row element (const text)
 
void append (char *value)
 Appends a new row element (non-const text)
 
void append (const mxArray *value)
 Appends a new row element (const MATLAB array)
 
void append (mxArray *value)
 Appends a new row element (non-const MATLAB array)
 
void append (const ValueSQL &item)
 Appends a new row element (const SQL value)
 
void append (ValueSQL &item)
 Appends a new row element (non-const SQL value)
 

Public Attributes

string m_col_name
 Table column name (SQL)
 
string m_name
 Table column name (MATLAB)
 
bool m_isAnyType
 true, if it's pure double (integer) type
 
vector< ValueSQLm_any
 row elements with type information
 
vector< double > m_float
 row elements as pure double type
 

Private Member Functions

 ValueSQLCol ()
 Standard ctor (inhibited)
 

Detailed Description

Class encapsulating a complete SQL table column with type and name.

In case of double (integer) type, a complete row may be returned as MATLAB matrix (vector). If any (row) element is non scalar, or an integer has no acceptable precise double representation, only a MATALB struct or cell variable can be returned. ValueSQL holds the double type up until its not tenable any more. Then all rows are stored with its individual value types.

Definition at line 1039 of file value.hpp.

Constructor & Destructor Documentation

◆ ~ValueSQLCol()

ValueSQLCol::~ValueSQLCol ( )
inline

Dtor.

Elements taking memory space will be freed.

Definition at line 1068 of file value.hpp.

Member Function Documentation

◆ Destroy()

void ValueSQLCol::Destroy ( int  row)
inline

Deleting a single row element.

Parameters
[in]rowRow number (0 based)

Definition at line 1081 of file value.hpp.

◆ operator[]()

const ValueSQL ValueSQLCol::operator[] ( int  index)
inline

Indexing operator.

Parameters
[in]indexRow number (0 based)
Returns
Always returns a copy of the original (no reference!)

Definition at line 1101 of file value.hpp.

◆ swapToAnyType()

void ValueSQLCol::swapToAnyType ( )
inline

Transform storage type.

Switches from pure double representation to individual value types. Each former double element will be converted to ValueSQL type.

Definition at line 1112 of file value.hpp.


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