Added support for settings

This commit is contained in:
2016-02-24 22:46:36 +01:00
parent 2bb07716b9
commit e569dfbc12
29 changed files with 927 additions and 147 deletions
+11 -2
View File
@@ -26,7 +26,7 @@ public:
m_pluginId = pluginId;
}
QList<QSharedPointer<T> > all() {
QList<QSharedPointer<T> > all(const QString &where = "") {
odb::database *db = Context::instance().db();
Q_ASSERT(db);
@@ -36,7 +36,16 @@ public:
try
{
odb::result<T> res = db->template query<T>();
odb::result<T> res;
if (where.isEmpty())
{
res = db->template query<T>();
}
else
{
res = db->template query<T>(where.toStdString());
}
for (typename odb::result<T>::iterator it = res.begin(); it != res.end(); it++) {
ret.append(it.load());