33 #include "nsISupports.idl"
53 [scriptable,
uuid(918745AE-0F40-4d08-BA4E-27A739459952)]
83 [scriptable,
uuid(A901158A-3735-44fd-9AD2-1753F1407284)]
96 void onQueryError(in
long dbError, in AString dbGUID, in AString strQuery);
107 void onQueryStart(in AString dbGUID, in AString strQuery);
168 [scriptable,
uuid(192FE564-1D86-49c8-A31A-5798D62B2525)]
void bindInt64Parameter(in unsigned long aParamIndex, in long long aValue)
Binds an int64 to the last added query.
void bindInt32Parameter(in unsigned long aParamIndex, in long aValue)
Binds an int32 to the last added query.
void bindDoubleParameter(in unsigned long aParamIndex, in double aValue)
Binds a double to the last added query.
void removeSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB)
Remove a sbIDatabaseSimpleQueryCallback instance from the query.
attribute nsIURI databaseLocation
Set a specific folder/directory URI for the database.
PRBool isAyncQuery()
Return whether or not the query will run asynchronously.
attribute unsigned long rollingLimitColumnIndex
The index of the column used to add to the limit total.
long execute()
Execute the queries enqueued in the object.
sbIDatabaseResult getResultObject()
Get the results object for the query that has executed.
void addPreparedStatement(in sbIDatabasePreparedStatement PreparedStatement)
Add a prepared query to the queue.
AString getDatabaseGUID()
Get the database identifier string.
void addQuery(in AString strQuery)
Add a SQL query string to the queue.
void bindUTF8StringParameter(in unsigned long aParamIndex, in AUTF8String aValue)
Binds a UTF8String to the last added query.
void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery)
Called when the query has completed.
sbIDatabasePreparedStatement getQuery(in unsigned long nIndex)
Get the query at the Nth index.
long waitForCompletion()
Wait until the query has finished executing asynchronously.
void setLastError(in long dbError)
Set the last error on the query.
void onQueryStart(in AString dbGUID, in AString strQuery)
Called for each query that executes.
A callback object used to inform client code that a query has completed.
void onQueryError(in long dbError, in AString dbGUID, in AString strQuery)
Called if the query has an error.
attribute unsigned long rollingLimitResult
The number of the row (1 is the first row) that met or exceeded the limit.
void addSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB)
Add a sbIDatabaseSimpleQueryCallback instance to the query.
An object containing the results of a database SELECT query.
void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery)
Called when the query has completed.
void bindStringParameter(in unsigned long aParamIndex, in AString aValue)
Binds a String to the last added query.
An object responsible for executing SQL queries on the database.
unsigned long getQueryCount()
Return the number of query strings enqueued for execution.
void setAsyncQuery(in PRBool bAsyncQuery)
Set the query to run asynchronously (ie: execute() does not block)
boolean abort()
Abort a currently executing query.
long getLastError()
Get the last error on the query that has executed.
unsigned long currentQuery()
Return the current index in the queue being indexed.
attribute unsigned long long rollingLimit
Set the rolling limit for this query.
void bindNullParameter(in unsigned long aParamIndex)
Binds a null to the last added query.
void resetQuery()
Clear out the query and make it all sparkly new.
A more complex callback object that can be used to read each row of the results in turn...
boolean isExecuting()
Return whether or not the query is currently executing.
sbIDatabasePreparedStatement prepareQuery(in AString strQuery)
Create a prepared statement object to reduce overhead for repeated queries.
void setDatabaseGUID(in AString dbGUID)
Set the database to be queried.
A prepared database statement.
void onQueryRow(in sbIDatabaseResult dbResultObject, in unsigned long dbRowResult, in unsigned long dbRowTotal)
Called as each row is added to the result set.