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

Class holding an exception array, the function map and the handle for one database. More...

#include <sql_interface.hpp>

+ Collaboration diagram for SQLstackitem:

Public Member Functions

 SQLstackitem ()
 Ctor.
 
 ~SQLstackitem ()
 Dtor.
 
sqlite3 * dbid ()
 Return.
 
ValueMexgetException ()
 Returns the exception array for this database.
 
void throwOnException ()
 (Re-)Throws an exception, if any occurred
 
MexFunctorsMapfcnmap ()
 Returns the function map for this database.
 
void setProgressHandler (bool enable=true)
 Installing progress handler to enable aborting by Ctrl+C.
 
bool openDb (const char *filename, int openFlags, SQLerror &err)
 Opens (or create) database. More...
 
bool closeDb (SQLerror &err)
 Close database.
 
bool isOpen ()
 Returns true, if database is opened.
 
void attachBuiltinFunctions ()
 Attach builtin functions to database object. More...
 

Static Public Member Functions

static int progressHandler (void *data)
 Progress handler (watchdog)
 

Private Types

typedef map< string, MexFunctors * > MexFunctorsMap
 Dictionary: function name => function handles.
 

Private Attributes

sqlite3 * m_db
 SQLite db object.
 
MexFunctorsMap m_fcnmap
 MEX function map with MATLAB functions for application-defined SQL functions.
 
ValueMex m_exception
 MATALAB exception array, may be thrown when mksqlite function leaves.
 

Detailed Description

Class holding an exception array, the function map and the handle for one database.

Definition at line 353 of file sql_interface.hpp.

Member Function Documentation

◆ attachBuiltinFunctions()

void SQLstackitem::attachBuiltinFunctions ( )
inline

Attach builtin functions to database object.

Following builtin functions are involved:

  • pow
  • regex
  • bcdratio
  • bdcpacktime
  • bdcunpacktime
  • md5

Definition at line 525 of file sql_interface.hpp.

References BDC_pack_time_func(), BDC_ratio_func(), BDC_unpack_time_func(), exp_func(), lg_func(), ln_func(), MD5_func(), pow_func(), and regex_func().

◆ openDb()

bool SQLstackitem::openDb ( const char *  filename,
int  openFlags,
SQLerror err 
)
inline

Opens (or create) database.

Parameters
[in]filenameName of database file
[in]openFlagsFlags for access rights (see SQLite documentation for sqlite3_open_v2())
[out]errError information
Returns
true if succeeded

Definition at line 434 of file sql_interface.hpp.

References MEM_ALLOC, Err::set(), and utils_latin2utf().


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