Back to index

lightning-sunbird  0.9+nobinonly
mozIStorageStatement.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Oracle Corporation code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  *  Oracle Corporation
00019  * Portions created by the Initial Developer are Copyright (C) 2004
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Vladimir Vukicevic <vladimir.vukicevic@oracle.com>
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either the GNU General Public License Version 2 or later (the "GPL"), or
00027  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #include "nsISupports.idl"
00040 #include "mozIStorageValueArray.idl"
00041 
00042 interface mozIStorageConnection;
00043 interface mozIStorageDataSet;
00044 interface nsISimpleEnumerator;
00045 
00046 [ptr] native sqlite3stmtptr(struct sqlite3_stmt);
00047 
00048 [scriptable, uuid(1f39bc95-090d-40a5-9dee-6d5a591e48bf)]
00049 interface mozIStorageStatement : mozIStorageValueArray {
00054   void initialize(in mozIStorageConnection aDBConnection,
00055                   in AUTF8String aSQLStatement);
00056 
00064   mozIStorageStatement clone();
00065 
00066   /*
00067    * Number of parameters
00068    */
00069   readonly attribute unsigned long parameterCount;
00070 
00074   AUTF8String getParameterName(in unsigned long aParamIndex);
00075 
00079   void getParameterIndexes
00080     (in AUTF8String aParameterName,
00081      out unsigned long aCount,
00082      [array,size_is(aCount),retval] out unsigned long aIndexes);
00083 
00087   readonly attribute unsigned long columnCount;
00088 
00092   AUTF8String getColumnName(in unsigned long aColumnIndex);
00093 
00097   void reset();
00098 
00102   void bindUTF8StringParameter(in unsigned long aParamIndex,
00103                                in AUTF8String aValue);
00104   void bindStringParameter(in unsigned long aParamIndex, in AString aValue);
00105   void bindDoubleParameter(in unsigned long aParamIndex, in double aValue);
00106   void bindInt32Parameter(in unsigned long aParamIndex, in long aValue);
00107   void bindInt64Parameter(in unsigned long aParamIndex, in long long aValue);
00108   void bindNullParameter(in unsigned long aParamIndex);
00109   void bindBlobParameter(in unsigned long aParamIndex,
00110                          [array,const,size_is(aValueSize)] in octet aValue,
00111                          in unsigned long aValueSize);
00112 
00120   void execute();
00121 
00132   boolean executeStep();
00133 
00138   const long MOZ_STORAGE_STATEMENT_INVALID = 0;
00139   const long MOZ_STORAGE_STATEMENT_READY = 1;
00140   const long MOZ_STORAGE_STATEMENT_EXECUTING = 2;
00141 
00142   readonly attribute long state;
00143 
00144   [noscript,notxpcom] sqlite3stmtptr getNativeStatementPointer();
00145 };