PersistencySqlite Class Reference

Manage the Percistency storage inside SQLite data source. More...

#include <PersistencySqlite.h>

Inheritance diagram for PersistencySqlite:

Public Member Functions

 PersistencySqlite (const std::string &filename="persistency.db")
 
virtual ~PersistencySqlite (void)
 
void initialize (void)
 creates the tables and sets up an empty database More...
 
void purge (const std::string &tablename, int i=-1) override
 
int countRows (const std::string &tablename, int i=-1) override
 
int getId (void) override
 
void remove (int i, const std::string &tablename) override
 
int countCID (int i, const std::string &tablename) override
 
void push_transaction (void) override
 increment transaction depth More...
 
void pop_transaction (void) override
 decrement transaction depth; if depth reaches zero, commit More...
 
int insertObject (const Persistent &object, int offset) override
 
void retrieveObject (int id, std::string &uuid, std::string &tag, std::string &description, std::string &type, int &parentId, int &rootId, double &created_at, double &modified_at) override
 retrieves the node based on the id pseudocode for SQL query is SELECT UUID, TAG, DESCRIPTION, TYPE, PARENT, ROOT FROM N WHERE ID = id More...
 
void retrieveObject (const std::string &uuid, int &id, std::string &tag, std::string &description, std::string &type, int &parentId, int &rootId, double &created_at, double &modified_at) override
 retrieves the node based on the uuid pseudocode for SQL query is SELECT ID, TAG, DESCRIPTION, TYPE, PARENT, ROOT FROM N WHERE UUID = uuid More...
 
void retrieveChildren (int id, std::vector< std::pair< int, std::string > > &children) override
 retrieves the node's children based on the id pseudocode for SQL query is SELECT ID, TYPE FROM N WHERE PARENT = id ORDER BY ID More...
 
void removeObject (int id) override
 remove object from persistency database pseudocode for SQL query is: DELETE FROM {IVV,SVV,QVV,QMV} JOIN {IV,SV,QV,QM} ON IVV.VID = IV.ID WHERE IV.NID IN [id, id+RANGE] DELETE FROM {I,IV,S,SV,Q,QV,QM} WHERE NID IN [id, id+RANGE] DELETE FROM N WHERE ID IN [id, id+RANGE] More...
 
bool try_lock (int id, std::string &user, int duration) override
 
bool check_lock (int id, std::string &user) override
 
bool release_lock (int id, std::string &user) override
 
void update (int id) override
 
void insert (const std::map< std::string, Integer * > &elements, int offset) override
 
void read (int id, std::map< std::string, Integer * > &elements) override
 
void update (int id, const std::map< std::string, Integer * > &elements) override
 
void insert (const std::map< std::string, Quantity * > &elements, int offset) override
 
void read (int id, std::map< std::string, Quantity * > &elements) override
 
void update (int id, const std::map< std::string, Quantity * > &elements) override
 
void insert (const std::map< std::string, String * > &elements, int offset) override
 
void read (int id, std::map< std::string, String * > &elements) override
 
void update (int id, const std::map< std::string, String * > &elements) override
 
void insert (const std::map< std::string, IntegerVector * > &elements, int offset) override
 
void read (int id, std::map< std::string, IntegerVector * > &elements) override
 
void update (int id, const std::map< std::string, IntegerVector * > &elements) override
 
void insert (const std::map< std::string, QuantityVector * > &elements, int offset) override
 
void read (int id, std::map< std::string, QuantityVector * > &elements) override
 
void update (int id, const std::map< std::string, QuantityVector * > &elements) override
 
void insert (const std::map< std::string, QuantityMatrix * > &elements, int offset) override
 
void read (int id, std::map< std::string, QuantityMatrix * > &elements) override
 
void update (int id, const std::map< std::string, QuantityMatrix * > &elements) override
 
void insert (const std::map< std::string, StringVector * > &elements, int offset) override
 
void read (int id, std::map< std::string, StringVector * > &elements) override
 
void update (int id, const std::map< std::string, StringVector * > &elements) override
 
- Public Member Functions inherited from Persistency
 Persistency (void)
 
virtual ~Persistency (void)
 terminates connection to database More...
 
virtual void push_transaction (void)=0
 increment transaction depth More...
 
virtual void pop_transaction (void)=0
 decrement transaction depth; if depth reaches zero, commit More...
 
int transaction_depth (void)
 
virtual void purge (const std::string &tablename, int i=-1)=0
 
void purgeAll (void)
 purges all tables, N as last More...
 
virtual int countRows (const std::string &tablename, int i=-1)=0
 
virtual int getId (void)=0
 
virtual void remove (int i, const std::string &tablename)=0
 
virtual int countCID (int i, const std::string &)=0
 
virtual int insertObject (const Persistent &object, int offset)=0
 
virtual void retrieveObject (int id, std::string &uuid, std::string &tag, std::string &description, std::string &type, int &parentId, int &rootId, double &created_at, double &modified_at)=0
 retrieves the node based on the id pseudocode for SQL query is SELECT UUID, TAG, DESCRIPTION, TYPE, PARENT, ROOT FROM N WHERE ID = id More...
 
virtual void retrieveObject (const std::string &uuid, int &id, std::string &tag, std::string &description, std::string &type, int &parentId, int &rootId, double &created_at, double &modified_at)=0
 retrieves the node based on the uuid pseudocode for SQL query is SELECT ID, TAG, DESCRIPTION, TYPE, PARENT, ROOT FROM N WHERE UUID = uuid More...
 
virtual void retrieveChildren (int id, std::vector< std::pair< int, std::string > > &children)=0
 retrieves the node's children based on the id pseudocode for SQL query is SELECT ID, TYPE FROM N WHERE PARENT = id ORDER BY ID More...
 
virtual void removeObject (int id)=0
 remove object from persistency database pseudocode for SQL query is: DELETE FROM {IVV,SVV,QVV,QMV} JOIN {IV,SV,QV,QM} ON IVV.VID = IV.ID WHERE IV.NID IN [id, id+RANGE] DELETE FROM {I,IV,S,SV,Q,QV,QM} WHERE NID IN [id, id+RANGE] DELETE FROM N WHERE ID IN [id, id+RANGE] More...
 
virtual void update (int id)=0
 
virtual bool try_lock (int id, std::string &user, int duration)=0
 
virtual bool check_lock (int id, std::string &user)=0
 
virtual bool release_lock (int id, std::string &user)=0
 
virtual void insert (const std::map< std::string, Integer * > &elements, int offset)=0
 
virtual void read (int id, std::map< std::string, Integer * > &elements)=0
 
virtual void update (int id, const std::map< std::string, Integer * > &elements)=0
 
int readInteger (int id, const std::string &tag)
 
virtual void insert (const std::map< std::string, Quantity * > &elements, int offset)=0
 
virtual void read (int id, std::map< std::string, Quantity * > &elements)=0
 
virtual void update (int id, const std::map< std::string, Quantity * > &elements)=0
 
virtual void insert (const std::map< std::string, String * > &elements, int offset)=0
 
virtual void read (int id, std::map< std::string, String * > &elements)=0
 
virtual void update (int id, const std::map< std::string, String * > &elements)=0
 
std::string readString (int id, const std::string &tag)
 
virtual void insert (const std::map< std::string, IntegerVector * > &elements, int offset)=0
 
virtual void read (int id, std::map< std::string, IntegerVector * > &elements)=0
 
virtual void update (int id, const std::map< std::string, IntegerVector * > &elements)=0
 
virtual void insert (const std::map< std::string, QuantityVector * > &elements, int offset)=0
 
virtual void read (int id, std::map< std::string, QuantityVector * > &elements)=0
 
virtual void update (int id, const std::map< std::string, QuantityVector * > &elements)=0
 
virtual void insert (const std::map< std::string, QuantityMatrix * > &elements, int offset)=0
 
virtual void read (int id, std::map< std::string, QuantityMatrix * > &elements)=0
 
virtual void update (int id, const std::map< std::string, QuantityMatrix * > &elements)=0
 
virtual void insert (const std::map< std::string, StringVector * > &elements, int offset)=0
 
virtual void read (int id, std::map< std::string, StringVector * > &elements)=0
 
virtual void update (int id, const std::map< std::string, StringVector * > &elements)=0
 
- Public Member Functions inherited from Diagnostic
 Diagnostic (void)
 
void setVerbosity (int verbosity)
 sets the verbosity level for this instance More...
 
int verbosity (void) const
 

Additional Inherited Members

- Protected Member Functions inherited from Persistency
void init (void)
 
void destroy (void)
 
void lock (void)
 
void unlock (void)
 
- Protected Member Functions inherited from Diagnostic
virtual ~Diagnostic ()=default
 
- Protected Attributes inherited from Persistency
int transaction_depth_
 
- Protected Attributes inherited from Diagnostic
int verbosityInstance
 

Detailed Description

Manage the Percistency storage inside SQLite data source.

#include "PersistencySqlite.h"

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ PersistencySqlite()

PersistencySqlite::PersistencySqlite ( const std::string &  filename = "persistency.db")
explicit

Costructor

Parameters
filenamename of the SQLite data source/storage

◆ ~PersistencySqlite()

virtual PersistencySqlite::~PersistencySqlite ( void  )
virtual

Member Function Documentation

◆ check_lock()

bool PersistencySqlite::check_lock ( int  id,
std::string &  user 
)
overridevirtual

check lock on item id

Returns
true if we still hold the lock, false if there is no lock or if somebody else is holding the lock
Parameters
idid in N of item to lock
username of the locking user (input / output: on input, the user attempting the lock, on output unchanged if lock successful, or the user currently holding the lock if unsuccessful)

Implements Persistency.

◆ countCID()

int PersistencySqlite::countCID ( int  i,
const std::string &   
)
overridevirtual

counts the records with NID == i in table tablename the argument i can only be >=-1 if it is == -1 the function returns the number of records in table tablename The SQL query is: "SELECT COUNT(*) FROM " + tablename if it is >= 0 the function returns the number of records in table tablename with NID equal to the value of the i parameter The SQL query is: "SELECT COUNT(*) FROM " + tablename + " WHERE NID = "+ i Throws an exception if table tablename does not exist.

Implements Persistency.

◆ countRows()

int PersistencySqlite::countRows ( const std::string &  tablename,
int  i = -1 
)
overridevirtual

count rows in table tablename; if i is greater or equal to zero, filter for ID == i the argument i can only be >=-1 if it is == -1 the function returns the number of records in table tablename The SQL query is: SELECT COUNT(*) FROM " + tablename if it is >= 0 the function returns the number of records in table tablename with ID equal to the value of the i parameter; since ID is a primary key for all tables, in this case only two return values are possible: 0 or 1 The SQL query is: "SELECT COUNT(*) FROM " + tablename + " WHERE ID = " + i Throws an exception if table tablename does not exist.

Implements Persistency.

◆ getId()

int PersistencySqlite::getId ( void  )
overridevirtual
Returns
the next available id, or 0 if no row is yet present in table N The SQL query is: "SELECT MAX(ID+range-1) FROM N"
Exceptions
Errorin case of error

Implements Persistency.

◆ initialize()

void PersistencySqlite::initialize ( void  )

creates the tables and sets up an empty database

◆ insert() [1/7]

void PersistencySqlite::insert ( const std::map< std::string, Integer * > &  elements,
int  offset 
)
overridevirtual

bulk insert for Integers; uses an efficient mechanism similar to ODBC's SQLPrepare / SQLBindParameter / SQLExecute

Note
SQL pseudo-code: insert into I(NID, TAG, DESCRIPTION, VALUE) values(?, ?, ?, ?)
Parameters
elementscollection of Integer variables
offsetoffset is added to each parent()->id() to get the NID

Implements Persistency.

◆ insert() [2/7]

void PersistencySqlite::insert ( const std::map< std::string, IntegerVector * > &  elements,
int  offset 
)
overridevirtual

bulk insert for IntegerVectors; uses an efficient mechanism similar to ODBC's SQLPrepare / SQLBindParameter / SQLExecute

Parameters
elementscollection of IntegerVector variables
offsetoffset is added to each parent()->id() to get the NID

Implements Persistency.

◆ insert() [3/7]

void PersistencySqlite::insert ( const std::map< std::string, Quantity * > &  elements,
int  offset 
)
overridevirtual

bulk insert for Quantities; uses an efficient mechanism similar to ODBC's SQLPrepare / SQLBindParameter / SQLExecute

Note
SQL pseudo-code: insert into Q(NID, TAG, DESCRIPTION, VALUE) values(?, ?, ?, ?)
Parameters
elementscollection of Quantity variables
offsetoffset is added to each parent()->id() to get the NID

Implements Persistency.

◆ insert() [4/7]

void PersistencySqlite::insert ( const std::map< std::string, QuantityMatrix * > &  elements,
int  offset 
)
overridevirtual

bulk insert for QuantityMatrix; uses an efficient mechanism similar to ODBC's SQLPrepare / SQLBindParameter / SQLExecute

Parameters
elementscollection of QuantityMatrix variables
offsetoffset is added to each parent()->id() to get the NID

Implements Persistency.

◆ insert() [5/7]

void PersistencySqlite::insert ( const std::map< std::string, QuantityVector * > &  elements,
int  offset 
)
overridevirtual

bulk insert for QuantityVectors; uses an efficient mechanism similar to ODBC's SQLPrepare / SQLBindParameter / SQLExecute

Parameters
elementscollection of QuantityVector variables
offsetoffset is added to each parent()->id() to get the NID

Implements Persistency.

◆ insert() [6/7]

void PersistencySqlite::insert ( const std::map< std::string, String * > &  elements,
int  offset 
)
overridevirtual

bulk insert for Strings; uses an efficient mechanism similar to ODBC's SQLPrepare / SQLBindParameter / SQLExecute

Note
SQL pseudo-code: insert into S(NID, TAG, DESCRIPTION, VALUE) values(?, ?, ?, ?)
Parameters
elementscollection of String variables
offsetoffset is added to each parent()->id() to get the NID

Implements Persistency.

◆ insert() [7/7]

void PersistencySqlite::insert ( const std::map< std::string, StringVector * > &  elements,
int  offset 
)
overridevirtual

bulk insert for StringVectors; uses an efficient mechanism similar to ODBC's SQLPrepare / SQLBindParameter / SQLExecute

Parameters
elementscollection of StringVector variables
offsetoffset is added to each parent()->id() to get the NID

Implements Persistency.

◆ insertObject()

int PersistencySqlite::insertObject ( const Persistent object,
int  offset 
)
overridevirtual

insert object into persistency database SQL Query string: INSERT INTO N (ID, TAG, DESCRIPTION, TYPE, GID, COMPLETETAG, PARENT) VALUES (...)

Returns
the database ID of the new object
Parameters
objectthe item to insert
offsetoffset is added to o.id() and o.parentId() when inserting

Implements Persistency.

◆ pop_transaction()

void PersistencySqlite::pop_transaction ( void  )
overridevirtual

decrement transaction depth; if depth reaches zero, commit

Implements Persistency.

◆ purge()

void PersistencySqlite::purge ( const std::string &  tablename,
int  i = -1 
)
overridevirtual

Deletes all records in the table tablename if i=-1, else a filter is applied see below

Parameters
tablenamethe name of the table
iif tablename == N, delete from N where ID = 1; if tablename == TC delete from TC where finish = i; else delete from tablename where nid = 1 Do nothing if table has no record. Throws an exception if table tablename does not exist. Will be called for the [Q,I,S]TBL tables before so that the relations with the N are enforces at all times even during purging.

Implements Persistency.

◆ push_transaction()

void PersistencySqlite::push_transaction ( void  )
overridevirtual

increment transaction depth

Implements Persistency.

◆ read() [1/7]

void PersistencySqlite::read ( int  id,
std::map< std::string, Integer * > &  elements 
)
overridevirtual

bulk read for Integers; only matching Item's values are updated, if no matching is found a warning is issued

Note
SQL pseudo-code: SELECT TAG, VALUE FROM I WHERE NID = id
Parameters
idthe database id of the current Object
elementscollection of Integer variables

Implements Persistency.

◆ read() [2/7]

void PersistencySqlite::read ( int  id,
std::map< std::string, IntegerVector * > &  elements 
)
overridevirtual

bulk read for Integers; only matching Item's values are updated, if no matching is found a warning is issued

Parameters
idthe database id of the current Object
elementscollection of IntegerVector variables

Implements Persistency.

◆ read() [3/7]

void PersistencySqlite::read ( int  id,
std::map< std::string, Quantity * > &  elements 
)
overridevirtual

bulk read for Quantities; only matching Item's values are updated, if no matching is found a warning is issued

Note
SQL pseudo-code: SELECT TAG, VALUE FROM Q WHERE NID = id
Parameters
idthe database id of the current Object
elementscollection of Quantity variables

Implements Persistency.

◆ read() [4/7]

void PersistencySqlite::read ( int  id,
std::map< std::string, QuantityMatrix * > &  elements 
)
overridevirtual

bulk read for QuantityMatrix; only matching Item's values are updated, if no matching is found a warning is issued

Parameters
idthe database id of the current Object
elementscollection of QuantityMatrix variables

Implements Persistency.

◆ read() [5/7]

void PersistencySqlite::read ( int  id,
std::map< std::string, QuantityVector * > &  elements 
)
overridevirtual

bulk read for QuantityVectors; only matching Item's values are updated, if no matching is found a warning is issued

Parameters
idthe database id of the current Object
elementscollection of QuantityVector variables

Implements Persistency.

◆ read() [6/7]

void PersistencySqlite::read ( int  id,
std::map< std::string, String * > &  elements 
)
overridevirtual

bulk read for Strings; only matching Item's values are updated, if no matching is found a warning is issued

Note
SQL pseudo-code: SELECT TAG, VALUE FROM S WHERE NID = id
Parameters
idthe database id of the current Object
elementscollection of String variables

Implements Persistency.

◆ read() [7/7]

void PersistencySqlite::read ( int  id,
std::map< std::string, StringVector * > &  elements 
)
overridevirtual

bulk read for StringVectors; only matching Item's values are updated, if no matching is found a warning is issued

Parameters
idthe database id of the current Object
elementscollection of StringVector variables

Implements Persistency.

◆ release_lock()

bool PersistencySqlite::release_lock ( int  id,
std::string &  user 
)
overridevirtual

release lock on item id

Returns
true if we were still holding the lock, false if not
Exceptions
ErrorRunTimeif we hold a lock on a parent object or if the lock cannot be released for any reason
Parameters
idid in N of item to lock
username of the locking user (input / output: on input, the user attempting the lock, on output unchanged if lock successful, or the user currently holding the lock if unsuccessful)

Implements Persistency.

◆ remove()

void PersistencySqlite::remove ( int  i,
const std::string &  tablename 
)
overridevirtual

removes the record with id == i in table tablename The SQL query is: "DELETE FROM " + tablename + " WHERE ID = " + i Throws an exception if table tablename does not exist.

Implements Persistency.

◆ removeObject()

void PersistencySqlite::removeObject ( int  id)
overridevirtual

remove object from persistency database pseudocode for SQL query is: DELETE FROM {IVV,SVV,QVV,QMV} JOIN {IV,SV,QV,QM} ON IVV.VID = IV.ID WHERE IV.NID IN [id, id+RANGE] DELETE FROM {I,IV,S,SV,Q,QV,QM} WHERE NID IN [id, id+RANGE] DELETE FROM N WHERE ID IN [id, id+RANGE]

Parameters
[in]idthe id of the node to retrieve

Implements Persistency.

◆ retrieveChildren()

void PersistencySqlite::retrieveChildren ( int  id,
std::vector< std::pair< int, std::string > > &  children 
)
overridevirtual

retrieves the node's children based on the id pseudocode for SQL query is SELECT ID, TYPE FROM N WHERE PARENT = id ORDER BY ID

Parameters
[in]idthe id of the node to retrieve
[out]childrena vector of child ids and types

Implements Persistency.

◆ retrieveObject() [1/2]

void PersistencySqlite::retrieveObject ( const std::string &  uuid,
int &  id,
std::string &  tag,
std::string &  description,
std::string &  type,
int &  parentId,
int &  rootId,
double &  created_at,
double &  modified_at 
)
overridevirtual

retrieves the node based on the uuid pseudocode for SQL query is SELECT ID, TAG, DESCRIPTION, TYPE, PARENT, ROOT FROM N WHERE UUID = uuid

Parameters
[in]uuidthe uuid of the node to retrieve
[out]idthe retrieved id of the node
[out]tagthe retrieved label of the node
[out]descriptionthe retrieved description of the node
[out]typethe retrieved type of the node
[out]parentIdthe retrieved parentId of the node
[out]rootIdthe retrieved rootId of the node
[out]created_attimestamp as UNIX epoch when the object was first created
[out]modified_attimestamp as UNIX epoch when the object was last modified

Implements Persistency.

◆ retrieveObject() [2/2]

void PersistencySqlite::retrieveObject ( int  id,
std::string &  uuid,
std::string &  tag,
std::string &  description,
std::string &  type,
int &  parentId,
int &  rootId,
double &  created_at,
double &  modified_at 
)
overridevirtual

retrieves the node based on the id pseudocode for SQL query is SELECT UUID, TAG, DESCRIPTION, TYPE, PARENT, ROOT FROM N WHERE ID = id

Parameters
[in]idthe id of the node to retrieve
[out]uuidthe retrieved uuid of the node
[out]tagthe retrieved label of the node
[out]descriptionthe retrieved description of the node
[out]typethe retrieved type of the node
[out]parentIdthe retrieved parentId of the node
[out]rootIdthe retrieved rootId of the node
[out]created_attimestamp as UNIX epoch when the object was first created
[out]modified_attimestamp as UNIX epoch when the object was last modified

Implements Persistency.

◆ try_lock()

bool PersistencySqlite::try_lock ( int  id,
std::string &  user,
int  duration 
)
overridevirtual

try to lock item id, all its descendant objects and all related Q/S/ITBL

Returns
true if lock successful, false if not
Parameters
idid in N of item to lock
username of the locking user (input / output: on input, the user attempting the lock, on output unchanged if lock successful, or the user currently holding the lock if unsuccessful)
durationtime duration in seconds for the lock, after that the lock expires

Implements Persistency.

◆ update() [1/8]

void PersistencySqlite::update ( int  id)
overridevirtual

updates the UPDATED_AT field

Parameters
idthe database id of the current Object

Implements Persistency.

◆ update() [2/8]

void PersistencySqlite::update ( int  id,
const std::map< std::string, Integer * > &  elements 
)
overridevirtual

bulk update for Integers; only updates the value; uses an efficient mechanism similar to ODBC's SQLPrepare/ SQLBindParameter / SQLExecute;

Parameters
idthe database id of the current Object
elementscollection of Integer variables
Exceptions
ErrorIf one of the items present as second element of the map is not in the I table

Implements Persistency.

◆ update() [3/8]

void PersistencySqlite::update ( int  id,
const std::map< std::string, IntegerVector * > &  elements 
)
overridevirtual

bulk update for IntegerVector; only updates the vector size and the values; uses an efficient mechanism similar to ODBC's SQLPrepare/ SQLBindParameter / SQLExecute;

Parameters
idthe database id of the current Object
elementscollection of IntegerVector variables

Implements Persistency.

◆ update() [4/8]

void PersistencySqlite::update ( int  id,
const std::map< std::string, Quantity * > &  elements 
)
overridevirtual

bulk update for Quantities; only updates the value; uses an efficient mechanism similar to ODBC's SQLPrepare/ SQLBindParameter / SQLExecute;

Parameters
idthe database id of the current Object
elementscollection of Quantity variables
Exceptions
ErrorIf one of the items present as second element of the map is not in the Q table

Implements Persistency.

◆ update() [5/8]

void PersistencySqlite::update ( int  id,
const std::map< std::string, QuantityMatrix * > &  elements 
)
overridevirtual

bulk update for QuantityMatrix; only updates the matrix size and the values; uses an efficient mechanism similar to ODBC's SQLPrepare/ SQLBindParameter / SQLExecute;

Parameters
idthe database id of the current Object
elementscollection of QuantityMatrix variables

Implements Persistency.

◆ update() [6/8]

void PersistencySqlite::update ( int  id,
const std::map< std::string, QuantityVector * > &  elements 
)
overridevirtual

bulk update for QuantityVectors; only updates the vector size and the values; uses an efficient mechanism similar to ODBC's SQLPrepare/ SQLBindParameter / SQLExecute;

Parameters
idthe database id of the current Object
elementscollection of QuantityVector variables

Implements Persistency.

◆ update() [7/8]

void PersistencySqlite::update ( int  id,
const std::map< std::string, String * > &  elements 
)
overridevirtual

bulk update for Strings; only updates the value; uses an efficient mechanism similar to ODBC's SQLPrepare/ SQLBindParameter / SQLExecute;

Parameters
idthe database id of the current Object
elementscollection of Strings variables
Exceptions
ErrorIf one of the items present as second element of the map is not in the Q table

Implements Persistency.

◆ update() [8/8]

void PersistencySqlite::update ( int  id,
const std::map< std::string, StringVector * > &  elements 
)
overridevirtual

bulk update for StringVectors; only updates the vector size and the values; uses an efficient mechanism similar to ODBC's SQLPrepare/ SQLBindParameter / SQLExecute;

Parameters
idthe database id of the current Object
elementscollection of StringVectors variables

Implements Persistency.


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