1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdbc_Statement_idl__
28 #define __com_sun_star_sdbc_Statement_idl__
30 #ifndef __com_sun_star_lang_XComponent_idl__
31 #include
<com
/sun
/star
/lang
/XComponent.idl
>
34 #ifndef __com_sun_star_beans_XPropertySet_idl__
35 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
38 #ifndef __com_sun_star_util_XCancellable_idl__
39 #include
<com
/sun
/star
/util
/XCancellable.idl
>
42 module com
{ module sun
{ module star
{ module sdbc
{
44 published
interface XWarningsSupplier
;
45 published
interface XStatement
;
46 published
interface XBatchExecution
;
47 published
interface XMultipleResults
;
48 published
interface XCloseable
;
51 /** is used for executing a static SQL statement and obtaining the results
55 Only one ResultSet per Statement can be open at any point in
56 time. Therefore, if the reading of one ResultSet is interleaved
57 with the reading of another, each must have been generated by
58 different Statements. All statement <code>execute</code> methods implicitly
59 close a statement's current ResultSet if an open one exists.
62 published service Statement
65 /** optional for implementation, controls the releasing of resources
66 and the notification of registered listeners.
68 [optional] interface com
::sun
::star
::lang
::XComponent
;
71 /** freeing all resources of a statement. A related resultset will be
76 // gives access to the properties.
77 interface com
::sun
::star
::beans
::XPropertySet
;
79 /** could be used for cancelling the execution of SQL statements if both
80 the DBMS and the driver support aborting an SQL statement.
81 The implementation is optional.
83 [optional] interface com
::sun
::star
::util
::XCancellable
;
85 /** is the interface for executing SQL commands.
90 /** provides the ability of batch execution. This interface is optional
93 A driver implementing batch execution must return
96 <member scope= "com::sun::star::sdbc"> XDatabaseMetaData::supportsBatchUpdates()</member>
99 [optional] interface XBatchExecution
;
102 /** controls the chaining of warnings, which may occur on every call
103 to the connected database. Chained warnings from previous calls will be
104 cleared before processing a new call.
106 interface XWarningsSupplier
;
109 /** covers the handling of multiple results after executing an SQL command.
110 The implementation is optional.
112 [optional] interface XMultipleResults
;
115 /** retrieves the number of seconds the driver will wait for a Statement
116 to execute. If the limit is exceeded, a SQLException is thrown.
117 There is no limitation, if set to zero.
119 [property
] long QueryTimeOut
;
122 /** returns the maximum number of bytes allowed for any column value.
125 This limit is the maximum number of bytes that can be returned
126 for any column value. The limit applies only to
127 <member scope= "com::sun::star::sdbc">DataType::BINARY</member>
129 <member scope= "com::sun::star::sdbc">DataType::VARBINARY</member>
131 <member scope= "com::sun::star::sdbc">DataType::LONGVARBINARY</member>
133 <member scope= "com::sun::star::sdbc">DataType::CHAR</member>
135 <member scope= "com::sun::star::sdbc">DataType::VARCHAR</member>
138 <member scope= "com::sun::star::sdbc">DataType::LONGVARCHAR</member>
140 If the limit is exceeded, the excess data is silently discarded.
142 There is no limitation, if set to zero.
145 [property
] long MaxFieldSize
;
148 /** retrieves the maximum number of rows that a ResultSet can contain.
149 If the limit is exceeded, the excess rows are silently dropped.
151 There is no limitation, if set to zero.
153 [property
] long MaxRows
;
156 /** defines the SQL cursor name that will be used by subsequent Statement
161 This name can then be used in SQL positioned update/delete statements to
162 identify the current row in the ResultSet generated by this statement. If
163 the database does not support positioned update/delete, this property is
164 a noop. To insure that a cursor has the proper isolation level to support
165 updates, the cursor's SELECT statement should be of the form
166 'select for update ...'. If the 'for update' phrase is omitted,
167 positioned updates may fail.
173 By definition, positioned update/delete
174 execution must be done by a different Statement than the one
175 which generated the ResultSet being used for positioning. Also,
176 cursor names must be unique within a connection.
179 [property
] string CursorName
;
182 /** retrieves the result set concurrency.
184 @see com::sun::star::sdbc::ResultSetConcurrency
186 [property
] long ResultSetConcurrency
;
189 /** determine the result set type.
191 @see com::sun::star::sdbc::ResultSetType
193 [property
] long ResultSetType
;
196 /** retrieves the direction for fetching rows from database tables
197 that is the default for result sets generated from this
198 <code>Statement</code>
202 <code>Statement</code>
203 object has not set a fetch direction,
204 the return value is implementation-specific.
206 [property
] long FetchDirection
;
209 /** retrieves the number of result set rows that is the default fetch size
210 for result sets generated from this
211 <code>Statement</code>
215 <code>Statement</code>
216 object has not set a fetch size,
217 the return value is implementation-specific.
219 [property
] long FetchSize
;
222 /** returns if escape processing is on or off.
223 If escape scanning is on (the default), the driver will do
224 escape substitution before sending the SQL to the database.
226 [property
] boolean EscapeProcessing
;
229 //=============================================================================