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(656aa634-36e2-4977-802e-79bce39c1024)]
00049 interface mozIStorageStatement : mozIStorageValueArray {
00054   void initialize (in mozIStorageConnection aDBConnection, in AUTF8String aSQLStatement);
00055 
00056   mozIStorageStatement clone ();
00057 
00058   /*
00059    * Number of parameters
00060    */
00061   readonly attribute unsigned long parameterCount;
00062 
00063   /*
00064    * Name of nth parameter, if given
00065    */
00066   AUTF8String getParameterName(in unsigned long aParamIndex);
00067 
00068   /*
00069    * Indexes of named parameter
00070    */
00071   void getParameterIndexes(in AUTF8String aParameterName,
00072                            out unsigned long aCount,
00073                            [array,size_is(aCount),retval] out unsigned long aIndexes);
00074   /*
00075    * Number of columns returned
00076    */
00077   readonly attribute unsigned long columnCount;
00078 
00079   /*
00080    * Name of nth column
00081    */
00082   AUTF8String getColumnName(in unsigned long aColumnIndex);
00083 
00084   /*
00085    * Reset parameters/statement execution
00086    */
00087   void reset ();
00088 
00089   /*
00090    * Parameter binding
00091    */
00092   void bindCStringParameter (in unsigned long aParamIndex, in string aValue);
00093   void bindUTF8StringParameter (in unsigned long aParamIndex, in AUTF8String aValue);
00094 
00095   void bindWStringParameter (in unsigned long aParamIndex, in wstring aValue);
00096   void bindStringParameter (in unsigned long aParamIndex, in AString aValue);
00097 
00098   void bindDoubleParameter (in unsigned long aParamIndex, in double aValue);
00099   void bindInt32Parameter (in unsigned long aParamIndex, in long aValue);
00100   void bindInt64Parameter (in unsigned long aParamIndex, in long long aValue);
00101 
00102   void bindNullParameter (in unsigned long aParamIndex);
00103 
00104   void bindDataParameter (in unsigned long aParamIndex, [array,const,size_is(aValueSize)] in octet aValue, in unsigned long aValueSize);
00105 
00106   // void bindParameters (in string aFormatString, ...);
00107 
00115   void execute ();
00116 
00123   mozIStorageDataSet executeDataSet ();
00124 
00135   boolean executeStep ();
00136 
00141   const long MOZ_STORAGE_STATEMENT_INVALID = 0;
00142   const long MOZ_STORAGE_STATEMENT_READY = 1;
00143   const long MOZ_STORAGE_STATEMENT_EXECUTING = 2;
00144 
00145   readonly attribute long state;
00146 
00147   [noscript,notxpcom] sqlite3stmtptr getNativeStatementPointer();
00148 };

Generated on Sun Jan 29 09:41:52 2006 by  doxygen 1.4.5