mksqlite  2.5
A MATLAB interface to SQLite
Classes | Typedefs | Functions
sql_interface.hpp File Reference

SQLite interface class. More...

#include "sql_builtin_functions.hpp"
#include <map>
+ Include dependency graph for sql_interface.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SQLerror
 Class holding an error. More...
 
class  MexFunctors
 Functors for SQL application-defined (aggregation) functions. More...
 
class  SQLstackitem
 Class holding an exception array, the function map and the handle for one database. More...
 
class  SQLiface
 SQLite interface. More...
 
struct  SQLiface::to_alphanum
 Converts one char to a printable (non-white-space) character. More...
 

Typedefs

typedef vector< ValueSQLColValueSQLCols
 type for column container
 

Functions

bool utIsInterruptPending ()
 
bool utSetInterruptEnabled (bool)
 
bool utSetInterruptHandled (bool)
 
ValueMex createItemFromValueSQL (const ValueSQL &value, int &err_id)
 Transfer fetched SQL value into MATLAB array. More...
 
ValueSQL createValueSQLFromItem (const ValueMex &item, bool bStreamable, int &iTypeComplexity, int &err_id)
 Transfer MATLAB array into a SQL value. More...
 

Detailed Description

SQLite interface class.

SQLite accessing functions, for single-file databases

See also
http://undocumentedmatlab.com/blog/serializing-deserializing-matlab-data
Authors
Martin Kortmann mail@.nosp@m.kort.nosp@m.mann..nosp@m.de, Andreas Martin andim.nosp@m.arti.nosp@m.n@use.nosp@m.rs.s.nosp@m.ource.nosp@m.forg.nosp@m.e.net
Version
2.5
Date
2008-2017
Precondition
Warning
Bug:

Definition in file sql_interface.hpp.

Function Documentation

◆ createItemFromValueSQL()

ValueMex createItemFromValueSQL ( const ValueSQL value,
int &  err_id 
)

Transfer fetched SQL value into MATLAB array.

Parameters
[in]valueencapsulated SQL field value
[out]err_idError ID (see MSG_IDS)
Returns
a MATLAB array due to value type (string or numeric content)
See also
g_result_type

Definition at line 260 of file mksqlite.cpp.

References g_NULLasNaN, and ValueSQL::m_typeID.

◆ createValueSQLFromItem()

ValueSQL createValueSQLFromItem ( const ValueMex item,
bool  bStreamable,
int &  iTypeComplexity,
int &  err_id 
)

Transfer MATLAB array into a SQL value.

Parameters
[in]itemencapsulated MATLAB array
[in]bStreamabletrue, if serialization is active
[out]iTypeComplexitysee ValueMex::type_complexity_e
[out]err_idError ID (see MSG_IDS)
Returns
a SQL value type
See also
g_result_type

Definition at line 354 of file mksqlite.cpp.

References ValueMex::Complexity(), ValueMex::Item(), ValueMex::TC_COMPLEX, ValueMex::TC_EMPTY, and typed_blobs_mode_on().