Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
#include <publicdatabase.h>
Public Member Functions | |
PublicDatabase (const QSqlDatabase &db) | |
void | prepare () |
bool | code2Record (const QString &code, const QString &table, QSqlRecord &rec) |
QString | findAlias (const QString &name, const QString &type, const QString &nspace) |
The PublicDatabase class exposes the internal database of Ilwis to the outside world. The default implementation is an in memory sqllite database
PublicDatabase::PublicDatabase | ( | const QSqlDatabase & | db | ) |
PublicDatabase initializes the database. Default sqllite is used but by using this constructor one can overrule it. Care has to be taken that the dialect of sql choosen matches.
db |
bool PublicDatabase::code2Record | ( | const QString & | code, |
const QString & | table, | ||
QSqlRecord & | rec | ||
) |
convenience method to translate a code to record of the database
Codes are unique for a particular set of classes (e.g. ellipsoids). So if you know the code you can figure out which data belongs to it. To simplify getting the data for a code this method exist
code | unique identifier for an instance of a class |
table | table in which the code is the key column |
rec | the record with the data |
void PublicDatabase::prepare | ( | ) |
prepare initializes the public database
*this method loads all the system tables in the database. If an error occurs at this level ilwis will abort an log an appropriate message.