00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00033 #include "nsISupports.idl"
00034
00035 interface nsIURI;
00036 interface sbIDatabaseResult;
00037 interface sbIDatabasePreparedStatement;
00038
00053 [scriptable, uuid(918745AE-0F40-4d08-BA4E-27A739459952)]
00054 interface sbIDatabaseSimpleQueryCallback : nsISupports
00055 {
00066 void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery);
00067 };
00068
00069
00083 [scriptable, uuid(A901158A-3735-44fd-9AD2-1753F1407284)]
00084 interface sbIDatabaseQueryCallback : nsISupports
00085 {
00096 void onQueryError(in long dbError, in AString dbGUID, in AString strQuery);
00097
00107 void onQueryStart(in AString dbGUID, in AString strQuery);
00108
00119 void onQueryRow(in sbIDatabaseResult dbResultObject, in unsigned long dbRowResult, in unsigned long dbRowTotal);
00120
00131 void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery);
00132 };
00133
00166 [scriptable, uuid(192FE564-1D86-49c8-A31A-5798D62B2525)]
00167 interface sbIDatabaseQuery : nsISupports
00168 {
00179 attribute nsIURI databaseLocation;
00180
00188 void setAsyncQuery(in PRBool bAsyncQuery);
00189
00196 PRBool isAyncQuery();
00197
00203 void addSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB);
00204
00210 void removeSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB);
00211
00225 void setDatabaseGUID(in AString dbGUID);
00226
00232 AString getDatabaseGUID();
00233
00243 void addQuery(in AString strQuery);
00244
00257 sbIDatabasePreparedStatement prepareQuery(in AString strQuery);
00258
00266 void addPreparedStatement(in sbIDatabasePreparedStatement PreparedStatement);
00267
00273 unsigned long getQueryCount();
00274
00281 sbIDatabasePreparedStatement getQuery(in unsigned long nIndex);
00282
00292 void resetQuery();
00293
00301 sbIDatabaseResult getResultObject();
00302
00310 long getLastError();
00311
00319 void setLastError(in long dbError);
00320
00326 long execute();
00327
00335 long waitForCompletion();
00336
00342 boolean isExecuting();
00343
00349 unsigned long currentQuery();
00350
00358 boolean abort();
00359
00371 attribute unsigned long long rollingLimit;
00372
00376 attribute unsigned long rollingLimitColumnIndex;
00377
00382 attribute unsigned long rollingLimitResult;
00383
00389 void bindUTF8StringParameter(in unsigned long aParamIndex,
00390 in AUTF8String aValue);
00391
00397 void bindStringParameter(in unsigned long aParamIndex,
00398 in AString aValue);
00399
00405 void bindDoubleParameter(in unsigned long aParamIndex,
00406 in double aValue);
00407
00413 void bindInt32Parameter(in unsigned long aParamIndex,
00414 in long aValue);
00415
00421 void bindInt64Parameter(in unsigned long aParamIndex,
00422 in long long aValue);
00423
00428 void bindNullParameter(in unsigned long aParamIndex);
00429 };