#include <DatabaseQuery.h>
Public Member Functions | |
| CDatabaseQuery () | |
| virtual | ~CDatabaseQuery () |
| NS_DECL_ISUPPORTS NS_DECL_SBIDATABASEQUERY NS_DECL_NSICLASSINFO nsresult | Init () |
| nsresult | GetDatabaseLocation (nsACString &aURISpec) |
Public Member Functions inherited from sbIDatabaseQuery | |
| void | setAsyncQuery (in PRBool bAsyncQuery) |
| Set the query to run asynchronously (ie: execute() does not block) More... | |
| PRBool | isAyncQuery () |
| Return whether or not the query will run asynchronously. More... | |
| void | addSimpleQueryCallback (in sbIDatabaseSimpleQueryCallback dbPersistCB) |
| Add a sbIDatabaseSimpleQueryCallback instance to the query. More... | |
| void | removeSimpleQueryCallback (in sbIDatabaseSimpleQueryCallback dbPersistCB) |
| Remove a sbIDatabaseSimpleQueryCallback instance from the query. More... | |
| void | setDatabaseGUID (in AString dbGUID) |
| Set the database to be queried. More... | |
| AString | getDatabaseGUID () |
| Get the database identifier string. More... | |
| void | addQuery (in AString strQuery) |
| Add a SQL query string to the queue. More... | |
| sbIDatabasePreparedStatement | prepareQuery (in AString strQuery) |
| Create a prepared statement object to reduce overhead for repeated queries. More... | |
| void | addPreparedStatement (in sbIDatabasePreparedStatement PreparedStatement) |
| Add a prepared query to the queue. More... | |
| unsigned long | getQueryCount () |
| Return the number of query strings enqueued for execution. More... | |
| sbIDatabasePreparedStatement | getQuery (in unsigned long nIndex) |
| Get the query at the Nth index. More... | |
| void | resetQuery () |
| Clear out the query and make it all sparkly new. More... | |
| sbIDatabaseResult | getResultObject () |
| Get the results object for the query that has executed. More... | |
| long | getLastError () |
| Get the last error on the query that has executed. More... | |
| void | setLastError (in long dbError) |
| Set the last error on the query. More... | |
| long | execute () |
| Execute the queries enqueued in the object. More... | |
| long | waitForCompletion () |
| Wait until the query has finished executing asynchronously. More... | |
| boolean | isExecuting () |
| Return whether or not the query is currently executing. More... | |
| unsigned long | currentQuery () |
| Return the current index in the queue being indexed. More... | |
| boolean | abort () |
| Abort a currently executing query. More... | |
| void | bindUTF8StringParameter (in unsigned long aParamIndex, in AUTF8String aValue) |
| Binds a UTF8String to the last added query. More... | |
| void | bindStringParameter (in unsigned long aParamIndex, in AString aValue) |
| Binds a String to the last added query. More... | |
| void | bindDoubleParameter (in unsigned long aParamIndex, in double aValue) |
| Binds a double to the last added query. More... | |
| void | bindInt32Parameter (in unsigned long aParamIndex, in long aValue) |
| Binds an int32 to the last added query. More... | |
| void | bindInt64Parameter (in unsigned long aParamIndex, in long long aValue) |
| Binds an int64 to the last added query. More... | |
| void | bindNullParameter (in unsigned long aParamIndex) |
| Binds a null to the last added query. More... | |
Protected Member Functions | |
| CDatabaseResult * | GetResultObject () |
| void | SetResultObject (CDatabaseResult *aResultObject) |
| nsresult | PopQuery (sbIDatabasePreparedStatement **_retval) |
| bindParameterArray_t * | GetQueryParameters (PRUint32 aQueryIndex) |
| bindParameterArray_t * | PopQueryParameters () |
Protected Attributes | |
| PRLock * | m_pLock |
| nsCString | m_LocationURIString |
| PRBool | m_IsAborting |
| PRBool | m_IsExecuting |
| PRBool | m_AsyncQuery |
| PRUint32 | m_CurrentQuery |
| PRInt32 | m_LastError |
| nsRefPtr< CDatabaseResult > | m_QueryResult |
| nsString | m_DatabaseGUID |
| std::deque< nsCOMPtr < sbIDatabasePreparedStatement > > | m_DatabaseQueryList |
| PRMonitor * | m_pQueryRunningMonitor |
| PRBool | m_QueryHasCompleted |
| nsInterfaceHashtableMT < nsISupportsHashKey, sbIDatabaseSimpleQueryCallback > | m_CallbackList |
| std::deque< bindParameterArray_t > | m_BindParameters |
| PRUint64 | m_RollingLimit |
| PRUint32 | m_RollingLimitColumnIndex |
| PRUint32 | m_RollingLimitResult |
| nsCOMPtr< sbIDatabaseEngine > | mDatabaseEngine |
Friends | |
| class | CDatabaseEngine |
| class | QueryProcessorThread |
Additional Inherited Members | |
Public Attributes inherited from sbIDatabaseQuery | |
| attribute nsIURI | databaseLocation |
| Set a specific folder/directory URI for the database. More... | |
| attribute unsigned long long | rollingLimit |
| Set the rolling limit for this query. More... | |
| attribute unsigned long | rollingLimitColumnIndex |
| The index of the column used to add to the limit total. More... | |
| attribute unsigned long | rollingLimitResult |
| The number of the row (1 is the first row) that met or exceeded the limit. More... | |
Definition at line 121 of file DatabaseQuery.h.
| CDatabaseQuery::CDatabaseQuery | ( | ) |
|
virtual |
Definition at line 114 of file DatabaseQuery.cpp.
| nsresult CDatabaseQuery::GetDatabaseLocation | ( | nsACString & | aURISpec | ) |
Additional accessor to get the database location as a string spec. This is used when an nsIURI isn't needed and/or the caller is off of the main thread.
Definition at line 135 of file DatabaseQuery.cpp.
|
protected |
Definition at line 662 of file DatabaseQuery.cpp.
|
protected |
Definition at line 377 of file DatabaseQuery.cpp.
| nsresult CDatabaseQuery::Init | ( | ) |
Definition at line 124 of file DatabaseQuery.cpp.
|
protected |
|
protected |
|
protected |
|
friend |
Definition at line 124 of file DatabaseQuery.h.
|
friend |
Definition at line 125 of file DatabaseQuery.h.
|
protected |
Definition at line 159 of file DatabaseQuery.h.
|
protected |
Definition at line 172 of file DatabaseQuery.h.
|
protected |
Definition at line 171 of file DatabaseQuery.h.
|
protected |
Definition at line 161 of file DatabaseQuery.h.
|
protected |
Definition at line 165 of file DatabaseQuery.h.
|
protected |
Definition at line 166 of file DatabaseQuery.h.
|
protected |
Definition at line 157 of file DatabaseQuery.h.
|
protected |
Definition at line 158 of file DatabaseQuery.h.
|
protected |
Definition at line 162 of file DatabaseQuery.h.
|
protected |
Definition at line 155 of file DatabaseQuery.h.
|
protected |
Definition at line 153 of file DatabaseQuery.h.
|
protected |
Definition at line 168 of file DatabaseQuery.h.
|
protected |
Definition at line 169 of file DatabaseQuery.h.
|
protected |
Definition at line 164 of file DatabaseQuery.h.
|
protected |
Definition at line 174 of file DatabaseQuery.h.
|
protected |
Definition at line 175 of file DatabaseQuery.h.
|
protected |
Definition at line 176 of file DatabaseQuery.h.
|
protected |
Definition at line 178 of file DatabaseQuery.h.