Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Convenience class to help composing select, insert and update statements.
Definition: bpssqlvalues.h:54
QStringList keys(const QString &aPrefix=QString()) const
void insert(const QString &aKey, const QVariant &aValue)
Insert a key/value pair.
BpsSqlValues()
Default constructor for an empty record.
BpsSqlValues & operator=(const BpsSqlValues &aOther)
Assign other sql values to this object.
QString condPairs(Condition aCondition=CondEqualAnd, const QString &aPrefix=QString()) const
Get list of pairs as used for select conditions.
QVariantList values() const
BpsSqlValues & operator=(const QVariantMap &aOther)
Assign other variant map to this object.
QString columns(const QString &aPrefix=QString()) const
BpsSqlValues(const QVariantMap &aMap)
Create object from a variant map.
const QVariant operator[](const QString &aName) const
Get the named columns value.
Condition
Conditon pair building modes.
Definition: bpssqlvalues.h:61
@ CondEqualAnd
Compare if equal and combine the pairs with AND: c_aaa=? and c_bbb=? ...
Definition: bpssqlvalues.h:62
@ CondEqualOr
Compare if equal and combine the pairs with OR: c_aaa=? or c_bbb=? ...
Definition: bpssqlvalues.h:64
@ CondUnequalAnd
Compare if not equal and combine the pairs with AND: c_aaa<>? and c_bbb<>? ...
Definition: bpssqlvalues.h:63
QString condPairs(const QString &aSeparator, const QString &aPrefix=QString()) const
Get list of pairs as used for select conditions (depreciated).
void clear()
Clear the internal map.
QVariant & operator[](const QString &aName)
Get the value associated with the key aName as a modifiable reference.
void setMap(const QVariantMap &aMap)
Set the internal map.
int remove(const QString &aKey)
Removes all the items that have the key aKey from the map.
QString pairs(const QString &aPrefix=QString()) const
Get list of pairs as used for update statements.
void insert(const BpsSqlValues &aOther)
Inserts (merges) all key/value pairs from the other BpsSqlValues object.
QVariant value(const QString &aName) const
Get the named columns value.
BpsSqlValues(const BpsSqlValues &aOther)
Copy constructor.
BpsSqlValues & operator=(const QSqlRecord &aOther)
Assign values of a sql record to this object.
BpsSqlValues(const QSqlRecord &aRec)
Create object from a sql record.
QVariant fromValue(const T &value)