Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / sdbc / Statement.idl
blob755c216b1e46de9da1f337f43e5e9f615a86b019
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Statement.idl,v $
10 * $Revision: 1.16 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_sdbc_Statement_idl__
31 #define __com_sun_star_sdbc_Statement_idl__
33 #ifndef __com_sun_star_lang_XComponent_idl__
34 #include <com/sun/star/lang/XComponent.idl>
35 #endif
37 #ifndef __com_sun_star_beans_XPropertySet_idl__
38 #include <com/sun/star/beans/XPropertySet.idl>
39 #endif
41 #ifndef __com_sun_star_util_XCancellable_idl__
42 #include <com/sun/star/util/XCancellable.idl>
43 #endif
45 module com { module sun { module star { module sdbc {
47 published interface XWarningsSupplier;
48 published interface XStatement;
49 published interface XBatchExecution;
50 published interface XMultipleResults;
51 published interface XCloseable;
54 /** is used for executing a static SQL statement and obtaining the results
55 produced by it.
57 <p>
58 Only one ResultSet per Statement can be open at any point in
59 time. Therefore, if the reading of one ResultSet is interleaved
60 with the reading of another, each must have been generated by
61 different Statements. All statement <code>execute</code> methods implicitly
62 close a statement's current ResultSet if an open one exists.
63 </p>
65 published service Statement
68 /** optional for implementation, controls the releasing of resources
69 and the notification of registered listeners.
71 [optional] interface com::sun::star::lang::XComponent;
74 /** freeing all resources of a statement. A related resultset will be
75 freed as well.
77 interface XCloseable;
79 // gives access to the properties.
80 interface com::sun::star::beans::XPropertySet;
82 /** could be used for cancelling the execution of SQL statements if both
83 the DBMS and the driver support aborting an SQL statement.
84 The implementation is optional.
86 [optional] interface com::sun::star::util::XCancellable;
88 /** is the interface for executing SQL commands.
90 interface XStatement;
93 /** provides the ability of batch execution. This interface is optional
94 for execution.
95 <p>
96 A driver implementing batch execution must return
97 <TRUE/>
98 for
99 <member scope= "com::sun::star::sdbc"> XDatabaseMetaData::supportsBatchUpdates()</member>
100 </p>
102 [optional] interface XBatchExecution;
105 /** controls the chaining of warnings, which may occur on every call
106 to the connected database. Chained warnings from previous calls will be
107 cleared before processing a new call.
109 interface XWarningsSupplier;
112 /** covers the handling of multiple results after executing an SQL command.
113 The implementation is optional.
115 [optional] interface XMultipleResults;
118 /** retrieves the number of seconds the driver will wait for a Statement
119 to execute. If the limit is exceeded, a SQLException is thrown.
120 There is no limitation, if set to zero.
122 [property] long QueryTimeOut;
125 /** returns the maximum number of bytes allowed for any column value.
128 This limit is the maximum number of bytes that can be returned
129 for any column value. The limit applies only to
130 <member scope= "com::sun::star::sdbc">DataType::BINARY</member>
132 <member scope= "com::sun::star::sdbc">DataType::VARBINARY</member>
134 <member scope= "com::sun::star::sdbc">DataType::LONGVARBINARY</member>
136 <member scope= "com::sun::star::sdbc">DataType::CHAR</member>
138 <member scope= "com::sun::star::sdbc">DataType::VARCHAR</member>
141 <member scope= "com::sun::star::sdbc">DataType::LONGVARCHAR</member>
142 columns.
143 If the limit is exceeded, the excess data is silently discarded.
144 <br/>
145 There is no limitation, if set to zero.
146 </p>
148 [property] long MaxFieldSize;
151 /** retrieves the maximum number of rows that a ResultSet can contain.
152 If the limit is exceeded, the excess rows are silently dropped.
153 <br/>
154 There is no limitation, if set to zero.
156 [property] long MaxRows;
159 /** defines the SQL cursor name that will be used by subsequent Statement
160 <code>execute</code>
161 methods.
164 This name can then be used in SQL positioned update/delete statements to
165 identify the current row in the ResultSet generated by this statement. If
166 the database does not support positioned update/delete, this property is
167 a noop. To insure that a cursor has the proper isolation level to support
168 updates, the cursor's SELECT statement should be of the form
169 'select for update ...'. If the 'for update' phrase is omitted,
170 positioned updates may fail.
171 </p>
174 Note:
175 </b>
176 By definition, positioned update/delete
177 execution must be done by a different Statement than the one
178 which generated the ResultSet being used for positioning. Also,
179 cursor names must be unique within a connection.
180 </p>
182 [property] string CursorName;
185 /** retrieves the result set concurrency.
187 @see com::sun::star::sdbc::ResultSetConcurrency
189 [property] long ResultSetConcurrency;
192 /** determine the result set type.
194 @see com::sun::star::sdbc::ResultSetType
196 [property] long ResultSetType;
199 /** retrieves the direction for fetching rows from database tables
200 that is the default for result sets generated from this
201 <code>Statement</code>
202 object.
203 <br/>
204 If this
205 <code>Statement</code>
206 object has not set a fetch direction,
207 the return value is implementation-specific.
209 [property] long FetchDirection;
212 /** retrieves the number of result set rows that is the default fetch size
213 for result sets generated from this
214 <code>Statement</code>
215 object.
216 <br/>
217 If this
218 <code>Statement</code>
219 object has not set a fetch size,
220 the return value is implementation-specific.
222 [property] long FetchSize;
225 /** returns if escape processing is on or off.
226 If escape scanning is on (the default), the driver will do
227 escape substitution before sending the SQL to the database.
229 [property] boolean EscapeProcessing;
232 //=============================================================================
234 }; }; }; };
236 #endif