@@ -36,7 +36,7 @@
|
||||
|
||||
class CollectionQuery : public SqlQuery {
|
||||
public:
|
||||
explicit CollectionQuery(const QSqlDatabase &db, const QString &songs_table, const QString &fts_table, const CollectionFilterOptions &filter_options = CollectionFilterOptions());
|
||||
explicit CollectionQuery(const QSqlDatabase &db, const QString &songs_table, const CollectionFilterOptions &filter_options = CollectionFilterOptions());
|
||||
|
||||
QVariant Value(const int column) const;
|
||||
QVariant value(const int column) const { return Value(column); }
|
||||
@@ -51,7 +51,6 @@ class CollectionQuery : public SqlQuery {
|
||||
QStringList where_clauses() const { return where_clauses_; }
|
||||
QVariantList bound_values() const { return bound_values_; }
|
||||
bool include_unavailable() const { return include_unavailable_; }
|
||||
bool join_with_fts() const { return join_with_fts_; }
|
||||
bool duplicates_only() const { return duplicates_only_; }
|
||||
int limit() const { return limit_; }
|
||||
|
||||
@@ -63,14 +62,9 @@ class CollectionQuery : public SqlQuery {
|
||||
|
||||
void SetWhereClauses(const QStringList &where_clauses) { where_clauses_ = where_clauses; }
|
||||
|
||||
// Removes = < > <= >= <> from the beginning of the input string and returns the operator
|
||||
// If the input String has no operator, returns "="
|
||||
QString RemoveSqlOperator(QString &token);
|
||||
// Adds a fragment of WHERE clause. When executed, this Query will connect all the fragments with AND operator.
|
||||
// Please note that IN operator expects a QStringList as value.
|
||||
void AddWhere(const QString &column, const QVariant &value, const QString &op = QStringLiteral("="));
|
||||
void AddWhereArtist(const QVariant &value);
|
||||
void AddWhereRating(const QVariant &value, const QString &op = QStringLiteral("="));
|
||||
|
||||
void SetBoundValues(const QVariantList &bound_values) { bound_values_ = bound_values; }
|
||||
void SetDuplicatesOnly(const bool duplicates_only) { duplicates_only_ = duplicates_only; }
|
||||
@@ -83,7 +77,6 @@ class CollectionQuery : public SqlQuery {
|
||||
|
||||
QSqlDatabase db_;
|
||||
QString songs_table_;
|
||||
QString fts_table_;
|
||||
|
||||
QString column_spec_;
|
||||
QString order_by_;
|
||||
@@ -91,7 +84,6 @@ class CollectionQuery : public SqlQuery {
|
||||
QVariantList bound_values_;
|
||||
|
||||
bool include_unavailable_;
|
||||
bool join_with_fts_;
|
||||
bool duplicates_only_;
|
||||
int limit_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user