aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/Database.h45
1 files changed, 36 insertions, 9 deletions
diff --git a/xbmc/Database.h b/xbmc/Database.h
index 1cc29d523d..618313ea7f 100644
--- a/xbmc/Database.h
+++ b/xbmc/Database.h
@@ -49,28 +49,55 @@ public:
static CStdString FormatSQL(CStdString strStmt, ...);
CStdString PrepareSQL(CStdString strStmt, ...) const;
- /**
- * Get a single value from a table
+ /*!
+ * @brief Get a single value from a table.
+ * @param strTable The table to get the value from.
+ * @param strColumn The column to get.
+ * @param strWhereClause If set, use this WHERE clause.
+ * @param strOrderBy If set, use this ORDER BY clause.
+ * @return The requested value or an empty string if it wasn't found.
*/
CStdString GetSingleValue(const CStdString &strTable, const CStdString &strColumn, const CStdString &strWhereClause = CStdString(), const CStdString &strOrderBy = CStdString());
- /**
- * Delete values from a table
+ /*!
+ * @brief Delete values from a table.
+ * @param strTable The table to delete the values from.
+ * @param strWhereClause If set, use this WHERE clause.
+ * @return True if the query was executed successfully, false otherwise.
*/
bool DeleteValues(const CStdString &strTable, const CStdString &strWhereClause = CStdString());
- /**
- * Executes a query
+ /*!
+ * @brief Execute a query that does not return any result.
+ * @param strQuery The query to execute.
+ * @return True if the query was executed successfully, false otherwise.
*/
bool ExecuteQuery(const CStdString &strQuery);
+
+ /*!
+ * @brief Execute a query that returns a result.
+ * @param strQuery The query to execute.
+ * @return The number of rows that were returned by the query or -1 if it didn't execute successfully.
+ */
int ResultQuery(const CStdString &strQuery);
- /**
- * Open a new dataset
+ /*!
+ * @brief Open a new dataset.
+ * @return True if the dataset was created successfully, false otherwise.
*/
bool OpenDS();
+ /*!
+ * @brief Put an INSERT or REPLACE query in the queue.
+ * @param strQuery The query to queue.
+ * @return True if the query was added successfully, false otherwise.
+ */
bool QueueInsertQuery(const CStdString &strQuery);
+
+ /*!
+ * @brief Commit all queries in the queue.
+ * @return True if all queries were executed successfully, false otherwise.
+ */
bool CommitInsertQueries();
protected:
@@ -94,6 +121,6 @@ protected:
private:
bool UpdateVersionNumber();
- bool m_bMultiWrite;
+ bool m_bMultiWrite; /*!< True if there are any queries in the queue, false otherwise */
int m_iRefCount;
};