32 #ifndef __DATABASE_QUERY_H__
33 #define __DATABASE_QUERY_H__
49 #include <nsAutoPtr.h>
51 #include <nsCOMArray.h>
53 #include <nsStringGlue.h>
54 #include <nsIClassInfo.h>
55 #include <nsInterfaceHashtable.h>
56 #include <nsHashKeys.h>
58 #include "sbIDatabaseQuery.h"
59 #include "sbIDatabasePreparedStatement.h"
63 #define SONGBIRD_DATABASEQUERY_CONTRACTID \
64 "@songbirdnest.com/Songbird/DatabaseQuery;1"
65 #define SONGBIRD_DATABASEQUERY_CLASSNAME \
66 "Songbird Database Query Interface"
67 #define SONGBIRD_DATABASEQUERY_CID \
72 {0xa9, 0x41, 0xd4, 0x88, 0xab, 0xb5, 0xa8, 0xaa} \
116 class QueryProcessorThread;
117 class nsIEventTarget;
133 NS_DECL_SBIDATABASEQUERY
171 nsInterfaceHashtableMT<nsISupportsHashKey, sbIDatabaseSimpleQueryCallback>
m_CallbackList;
181 nsresult EnsureLastQueryParameter(PRUint32 aParamIndex);
184 #endif // __DATABASE_QUERY_H__
std::vector< CQueryParameter > bindParameterArray_t
std::deque< bindParameterArray_t > m_BindParameters
Songbird Database Object Definition.
PRBool m_QueryHasCompleted
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
nsCString m_LocationURIString
NS_DECL_ISUPPORTS NS_DECL_SBIDATABASEQUERY NS_DECL_NSICLASSINFO nsresult Init()
nsresult GetDatabaseLocation(nsACString &aURISpec)
friend class QueryProcessorThread
virtual ~CDatabaseQuery()
PRMonitor * m_pQueryRunningMonitor
bindParameterArray_t * GetQueryParameters(PRUint32 aQueryIndex)
void SetResultObject(CDatabaseResult *aResultObject)
nsRefPtr< CDatabaseResult > m_QueryResult
nsCString utf8StringValue
nsresult PopQuery(sbIDatabasePreparedStatement **_retval)
nsInterfaceHashtableMT< nsISupportsHashKey, sbIDatabaseSimpleQueryCallback > m_CallbackList
nsCOMPtr< sbIDatabaseEngine > mDatabaseEngine
PRUint32 m_RollingLimitColumnIndex
An object responsible for executing SQL queries on the database.
PRUint32 m_RollingLimitResult
std::deque< nsCOMPtr< sbIDatabasePreparedStatement > > m_DatabaseQueryList
CQueryParameter(const CQueryParameter &queryParameter)
CDatabaseResult * GetResultObject()
A prepared database statement.
bindParameterArray_t * PopQueryParameters()