Search completed in 0.99 seconds.
mozIStorageStatement
storage/public/
mozistoragestatement.idlscriptable this interface lets you create and execute sql statements on a mozistorageconnection.
... method overview void initialize(in mozistorageconnection adbconnection, in autf8string asqlstatement); obsolete since gecko 1.9.1 void finalize();
mozistoragestatement clone(); autf8string getparametername(in unsigned long aparamindex); unsigned long getparameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8string aname); void reset(); astring escapestringforlike(in astring avalue, in wchar aescapechar); void bindparameters(in mozistoragebindin...
...32parameter(in unsigned long aparamindex, in long avalue); void bindint64parameter(in unsigned long aparamindex, in long long avalue); void bindnullparameter(in unsigned long aparamindex); void bindblobparameter(in unsigned long aparamindex, [array,const,size_is(avaluesize)] in octet avalue, in unsigned long avaluesize); mozistoragependingstatement executeasync(
mozistoragestatementcallback acallback); boolean executestep(); boolean step(); void execute(); attributes attribute type description columncount unsigned long number of columns returned.
...And 7 more matches
mozIStorageStatementWrapper
the
mozistoragestatementwrapper interface is a storage statement wrapper.
... when you call the mozistorageconnection interface's createstatement() method, you get a
mozistoragestatement which has just direct bindings to sqlite.
... firefox 3.5 note firefox 3.5 adds support for these features directly into the
mozistoragestatement interface, so this interface is essentially deprecated.
...And 6 more matches
mozIStorageStatementCallback
the
mozistoragestatementcallback interface represents a callback handler that the storage api calls with result, error, and completion notifications while handling asynchronous database queries.
... storage/public/
mozistoragestatementcallback.idlscriptable please add a summary to this article.
mozIStorageStatementRow
for example, say you create a statement like so: var statement = dbconn.createstatement("select id, name from table_name"); the object would have two properties, id and name, that can be used to get the value of the column after you have called
mozistoragestatement.executestep() like so: while (statement.executestep()) { let id = statement.row.id; let name = statement.row.name; } see also storage
mozistoragestatement ...
Storage
create statements to execute on the connection -
mozistoragestatement.
...for a complete reference see
mozistoragestatement.
...similarly, the c++ looks like this: nscomptr<
mozistoragestatement> statement; rv = dbconn->createstatement(ns_literal_cstring("select * from table_name where column_name = ?1"), getter_addrefs(statement)); ns_ensure_success(rv, rv); this example uses the numbered placeholder indexed by zero for a parameter to be bound later (described in binding parameters).
...And 19 more matches
mozIStorageConnection
method overview void asyncclose([optional] in mozistoragecompletioncallback acallback); void begintransaction(); void begintransactionas(in print32 transactiontype);
mozistoragestatement clone([optional] in boolean areadonly); void close(); void committransaction(); void createaggregatefunction(in autf8string afunctionname, in long anumarguments, in mozistorageaggregatefunction afunction); mozistorageasyncstatement createasyncstatement(in autf8string asqlstatement); void createfunction(in autf8string afunctionname, in long anumargu...
...ments, in mozistoragefunction afunction);
mozistoragestatement createstatement(in autf8string asqlstatement); void createtable(in string atablename, in string atableschema); mozistoragependingstatement executeasync([array, size_is(anumstatements)] in mozistoragebasestatement astatements, in unsigned long anumstatements, [optional] in
mozistoragestatementcallback acallback ); void executesimplesql(in autf8string asqlstatement); boolean indexexists(in autf8string aindexname); void preload(); obsolete since gecko 1.9 void removefunction(in autf8string afunctionname); mozistorageprogresshandler removeprogresshandler(); void rollbacktransaction(); void setgrowthincrement(in print32 aincrement, in autf8string adatabasename)...
... createstatement() creates a
mozistoragestatement for the given sql expression.
...And 7 more matches
Index
205 mozistoragebindingparams interfaces, interfaces:scriptable, storage the mozistoragebindingparams interface is used to bind values to parameters prior to calling
mozistoragestatement.executeasync().
... 206 mozistoragebindingparamsarray interfaces, interfaces:scriptable, storage the mozistoragebindingparamsarray interface is a container for mozistoragebindingparams objects, and is used to store sets of bound parameters that will be used by the
mozistoragestatement.executeasync().
... 215 mozistorageservice interfaces, interfaces:scriptable, storage, xpcom, xpcom api reference, xpcom interface reference see mozistorageconnection 216
mozistoragestatement interfaces, storage, xpcom, xpcom api reference for an introduction on how to use this interface, see the storage overview document.
...And 5 more matches
mozIStorageFunction
if you use mozistorageconnection.executeasync() or,
mozistoragestatement.executeasync() this callback will run on a different thread from the rest of your code.
...nscomptr<
mozistoragestatement> stmt; rv = dbconn->createstatement(ns_literal_cstring( "select square(value) from some_table"), getter_addrefs(stmt) ); ns_ensure_success(rv, rv); prbool hasmore; while (ns_succeeded(stmt->executestep(&hasmore)) && hasmore) { // handle the results } see also storage introduction and how-to article mozistorageconnection database connection to a specific file or in-memory data storage ...
...
mozistoragestatement create and execute sql statements on a sqlite database.
...
mozistoragestatementwrapper storage statement wrapper ...
mozIStorageAggregateFunction
if you use mozistorageconnection.executeasync() or,
mozistoragestatement.executeasync() this callback will run on a different thread from the rest of your code.
...if you use mozistorageconnection.executeasync() or,
mozistoragestatement.executeasync() this callback will run on a different thread from the rest of your code.
...nscomptr<
mozistoragestatement> stmt; rv = dbconn->createstatement(ns_literal_cstring( "select stddev(value) from some_table"), getter_addrefs(stmt) ); ns_ensure_success(rv, rv); prbool hasmore; while (ns_succeeded(stmt->executestep(&hasmore)) && hasmore) { // handle the results } ...
mozIStorageAsyncStatement
this differs from
mozistoragestatement by only being usable for asynchronous execution.
... (
mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread.
... in contrast,
mozistoragestatement may need to acquire the primitives and consequently can cause the main thread to lock for extended intervals while the asynchronous thread performs some long-running operation.
mozIStorageBindingParamsArray
the mozistoragebindingparamsarray interface is a container for mozistoragebindingparams objects, and is used to store sets of bound parameters that will be used by the
mozistoragestatement.executeasync().
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the
mozistoragestatement.newbindingparamsarray().
...the appended parameters will be used when
mozistoragestatement.executeasync() is called.
Monitoring downloads - Archive of obsolete content
to iterate over the results, we use a while loop that calls the
mozistoragestatement object's executestep() method.
... the interesting bits to take away from this:
mozistoragestatement has several data getter routines for fetching search results, including getstring(), getdouble(), and getint64().
mozIStorageProgressHandler
see also storage mozstorage introduction and how-to article mozistorageconnection database connection to a specific file or in-memory data storage
mozistoragestatement create and execute sql statements on a sqlite database.
...
mozistoragestatementwrapper storage statement wrapper ...
mozIStorageValueArray
see also storage introduction and how-to article mozistorageconnection database connection to a specific file or in-memory data storage
mozistoragestatement create and execute sql statements on a sqlite database.
...
mozistoragestatementwrapper storage statement wrapper ...
Observer Notifications
if you are referencing instances of
mozistoragestatement referencing places databases when this notification occurs, you should call their
mozistoragestatement.finalize() method places-sync-finished sent when the places database has been successfully flushed to disk.
mozIStorageBindingParams
the mozistoragebindingparams interface is used to bind values to parameters prior to calling
mozistoragestatement.executeasync().
mozIStorageRow
see also storage mozistorageresultset mozistorageconnection
mozistoragestatement ...
XPCOM Interface Reference
arymoziplaceinfomoziplacesautocompletemoziregistrymozirepresentativecolorcallbackmozispellcheckingenginemozistorageaggregatefunctionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservice
mozistoragestatementmozistoragestatementcallback
mozistoragestatementparams
mozistoragestatementrow
mozistoragestatementwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxttohtmlconvmozithirdpartyutilmozivisitinfomozivisitinfocallbackmozivisitstatuscallbacknsiabcardnsiaboutmodulensiabstractworkernsiaccelerometerupdatensiaccessnodensiaccessibilityservicensiaccessiblensiaccessiblecaretmoveeventnsiaccessiblecoor...