[scriptable, uuid(1f39bc95-090d-40a5-9dee-6d5a591e48bf)]
interface mozIStorageStatement : mozIStorageValueArray

Constants

 The current state.  Row getters are only valid while
 the statement is in the "executing" state.
const long MOZ_STORAGE_STATEMENT_INVALID = 0

          
const long MOZ_STORAGE_STATEMENT_READY = 1

          
const long MOZ_STORAGE_STATEMENT_EXECUTING = 2

Attributes

 Number of columns returned
readonly attribute unsigned long columnCount

          
readonly attribute unsigned long parameterCount

          
readonly attribute long state

Methods


          
void bindBlobParameter(in unsigned long aParamIndex, [const, array, size_is(aValueSize)] in octet aValue, in unsigned long aValueSize)

          
void bindDoubleParameter(in unsigned long aParamIndex, in double aValue)

          
void bindInt32Parameter(in unsigned long aParamIndex, in long aValue)

          
void bindInt64Parameter(in unsigned long aParamIndex, in long long aValue)

          
void bindNullParameter(in unsigned long aParamIndex)

          
void bindStringParameter(in unsigned long aParamIndex, in AString aValue)
 Bind the given value to the parameter at aParamIndex.
void bindUTF8StringParameter(in unsigned long aParamIndex, in AUTF8String aValue)
 Create a clone of this statement, by initializing a new statement
 with the same connection and same SQL statement as this one.  It
 does not preserve statement state; that is, if a statement is
 being executed when it is cloned, the new statement will not be
 executing.
 Execute the query, ignoring any results.  This is accomplished by
 calling step() once, and then calling reset().

 Error and last insert info, etc. are available from
 the mozStorageConnection.
void execute()
 Execute a query, using any currently-bound parameters.  Reset
 must be called on the statement after the last call of
 executeStep.

 @returns a boolean indicating whether there are more rows or not;
 row data may be accessed using mozIStorageValueArray methods on
 the statement.

boolean executeStep()
 Name of nth column
AUTF8String getColumnName(in unsigned long aColumnIndex)

          
[noscript, notxpcom] sqlite3stmtptr getNativeStatementPointer()
 All indexes of a named parameter, if it's specified more than once
void getParameterIndexes(in AUTF8String aParameterName, out unsigned long aCount, [array, retval, size_is(aCount)] out unsigned long aIndexes)
 Name of nth parameter, if given
AUTF8String getParameterName(in unsigned long aParamIndex)
 Initialize this query with the given SQL statement.

void initialize(in mozIStorageConnection aDBConnection, in AUTF8String aSQLStatement)
 Reset parameters/statement execution
void reset()