1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ResultSet.idl,v $
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_ResultSet_idl__
31 #define __com_sun_star_sdbc_ResultSet_idl__
33 #ifndef __com_sun_star_lang_XComponent_idl__
34 #include
<com
/sun
/star
/lang
/XComponent.idl
>
37 #ifndef __com_sun_star_beans_XPropertySet_idl__
38 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
41 #ifndef __com_sun_star_util_XCancellable_idl__
42 #include
<com
/sun
/star
/util
/XCancellable.idl
>
45 module com
{ module sun
{ module star
{ module sdbc
{
47 published
interface XStatement
;
48 published
interface XRow
;
49 published
interface XRowUpdate
;
50 published
interface XResultSet
;
51 published
interface XResultSetUpdate
;
52 published
interface XResultSetMetaDataSupplier
;
53 published
interface XWarningsSupplier
;
54 published
interface XColumnLocate
;
55 published
interface XCloseable
;
58 /** provides access to a table of data. A ResultSet
59 object is usually generated by executing a Statement.
64 A ResultSet maintains a cursor pointing to its current row of
65 data. Initially the cursor is positioned before the first row.
66 The 'next' method moves the cursor to the next row.
69 The getXXX methods retrieve column values for the current
70 row. You can retrieve values using either the index number of the
71 column. Columns are numbered from 1.
74 For maximum portability, ResultSet columns within each row should be
75 read in left-to-right order and each column should be read only once.
78 For the getXXX methods, the SDBC driver attempts to convert the
79 underlying data to the specified type and returns a suitable
83 Column names used as input to the findColumn method are case
84 insensitive. When several columns have the same name, then the value
85 of the first matching column will be returned. The column name option is
86 designed to be used when column names are used in the SQL
87 query. For columns that are NOT explicitly named in the query, it
88 is best to use column numbers. If column names are used, there is
89 no way for the programmer to guarantee that they actually refer to
93 A ResultSet is automatically closed (disposed) by the Statement that
94 generated it when that Statement is closed, re-executed, or used
95 to retrieve the next result from a sequence of multiple results.
98 The number, types, and properties of a ResultSet's columns are
99 provided by the ResultSetMetaData object returned by the getMetaData
103 published service ResultSet
106 /** optional for implementation; controls the releasing of resources
107 and the notification of registered listeners.
109 [optional] interface com
::sun
::star
::lang
::XComponent
;
112 /** freeing all resources of a result set.
115 The creating statement will still be open after disposing.
119 This interface is mandatory only for JDBC conformance,
120 otherwise it is optional.
123 [optional] interface XCloseable
;
125 // gives access to the properties.
126 interface com
::sun
::star
::beans
::XPropertySet
;
129 /** controls the chaining of warnings, which may occur on every call
130 to the connected database.
133 Chained warnings from previous calls will be cleared before processing a new call.
137 This interface is mandatory only for JDBC conformance, otherwise it is optional.
140 [optional] interface XWarningsSupplier
;
143 /** provides the access to the result set description.
145 interface XResultSetMetaDataSupplier
;
148 /** is the interface for navigating on the rows on a result set.
150 interface XResultSet
;
153 /** is the interface for updating row data to the database.
156 The implementation is optional.
159 [optional] interface XResultSetUpdate
;
162 /** is the interface for accessing the data of the current row.
167 /** is used for locating a column by it's name.
169 interface XColumnLocate
;
172 /** is the interface for updating the data of the current row.
175 The implementation is optional.
178 [optional] interface XRowUpdate
;
181 /** defines the SQL cursor name that will be used by subsequent Statement
187 This name can then be used in SQL positioned update/delete statements to
188 identify the current row in the ResultSet generated by this statement. If
189 the database doesn't support positioned update/delete, this property is
190 a noop. To insure that a cursor has the proper isolation level to support
191 updates, the cursor's SELECT statement should be of the form
192 'select for update ...'. If the 'for update' phrase is omitted,
193 positioned updates may fail.
199 By definition, positioned update/delete
200 execution must be done by a different Statement than the one
201 which generated the ResultSet being used for positioning. Also,
202 cursor names must be unique within a connection.
205 [optional, readonly, property
] string CursorName
;
208 /** retrieves the result set concurrency.
210 @see com::sun::star::sdbc::ResultSetConcurrency
212 [readonly, property
] long ResultSetConcurrency
;
215 /** determines the result set type.
217 @see com::sun::star::sdbc::ResultSetType
219 [readonly, property
] long ResultSetType
;
222 /** retrieves the direction for fetching rows from database tables
223 that is the default for result sets generated from this
224 <type scope="com::sun::star::sdbcx">Statement</type>
227 If this <code>Statement</code> object has not set a fetch direction,
228 the return value is implementation-specific.
230 [property
] long FetchDirection
;
233 /** retrieves the number of result set rows that is the default fetch size
234 for result sets generated from this
235 <type scope="com::sun::star::sdbcx">Statement</type>
239 <type scope="com::sun::star::sdbcx">Statement</type>
240 object has not set a fetch size,
241 the return value is implementation-specific.
243 [property
] long FetchSize
;
246 //=============================================================================
250 /*===========================================================================
251 ===========================================================================*/