|
Ananas Library 0.9.5
|
#include <aextsql.h>
Public Slots | |
| QSqlSelectCursor * | Cursor () const |
| Return inner cursor which contains result of last call method ExecQuery or ExecScalar. | |
| QVariant | Value (int col) const |
| int | Size () const |
| Return record count in result. . | |
| int | Count () const |
| Return column count in result. . | |
| bool | ExecQuery (const QString &query) |
| Function for query execution. | |
| QVariant | ExecScalar (const QString &query) |
| This function similar to described above ExecQuery(),. | |
| bool | First () |
| Make first record of result as current. | |
| bool | Next () |
| Make next record of result as current. | |
| bool | Last () |
| Make last record of result as current. | |
| bool | Prev () |
| Make previous record of result as current. | |
| QString | SqlFieldName (aObject *obj, const QString &userFieldName, const QString &tableType="") const |
| Gets sql name of field by its user name. | |
| QString | SqlTableName (aObject *obj, const QString &tableType="") const |
| QString | SqlTableName (const QString &objName) const |
| Not implemented yet. . | |
| QString | SqlFieldName (const QString &fieldName) const |
| Not implemented yet. . | |
| QString | LastError () const |
| Returns text representation last error or emty text, if no error occured. | |
Public Member Functions | |
| aExtSQL () | |
| Constructor . | |
| virtual int | init (aDatabase *database) |
| Init function, owerrides function in base class, creates inner database specific object and variables. . | |
| ~aExtSQL () | |
| Destructor . | |
Public Member Functions inherited from AExtension | |
| AExtension (const char *name=0) | |
| virtual int | init (aDatabase *dbo) |
Additional Inherited Members | |
Signals inherited from AExtension | |
| void | event (const QString &data) |
Public Attributes inherited from AExtension | |
| aDatabase * | db |
| aExtSQL::aExtSQL | ( | ) |
Constructor .
| aExtSQL::~aExtSQL | ( | ) |
Destructor .
|
slot |
Return column count in result. .
|
slot |
Return inner cursor which contains result of last call method ExecQuery or ExecScalar.
|
slot |
Function for query execution.
|
slot |
This function similar to described above ExecQuery(),.
|
slot |
Make first record of result as current.
|
virtual |
Init function, owerrides function in base class, creates inner database specific object and variables. .
Reimplemented from AExtension.
References aDatabase::db().
|
slot |
Make last record of result as current.
|
slot |
Returns text representation last error or emty text, if no error occured.
|
slot |
Make next record of result as current.
|
slot |
Make previous record of result as current.
|
slot |
Return record count in result. .
|
slot |
Gets sql name of field by its user name.
References aObject::table().
|
slot |
Not implemented yet. .
References aDatabase::cfg, aCfg::find(), aCfg::id(), and aCfg::objClass().
|
slot |
\if english
\brief Gets SQL name of primary or one of secondary object tables.
All Ananas objects except Report store theyr values in sql tables. For Catalogue this is group table and element table (pri), for Document - data header table, for Journal - always system journal table, for IRegister - one table for all data, for ARegister - main table for store operations (pri) and X table for store saldo, where X - dimensions count. So if you want get name of primary table, leave parameter \atableType or set in to empty string. If you want get name of secondary table, set parameter \atableType to "group" for catalogue group table or dimension user name for accumulation register saldo table for that dimension.
\param obj (in) - Object for getting table name.
\param tableType (optional) - Table type
\return sql table name
References aObject::table().
|
slot |
Not implemented yet. .
References aDatabase::cfg, aCfg::find(), aCfg::objClass(), and aDatabase::tableDbName().
|
slot |
Gets value of column number \acol (zero based) from current record or QVariant::Invalid if error occured or \acol value out of range.
| col | (in) - Column Index |