Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / sdbc / ResultSet.idl
blob3a6acadedb8d2f7e42f0b6cff762e43be1cc03eb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_sdbc_ResultSet_idl__
29 #define __com_sun_star_sdbc_ResultSet_idl__
31 #include <com/sun/star/lang/XComponent.idl>
33 #include <com/sun/star/beans/XPropertySet.idl>
35 #include <com/sun/star/util/XCancellable.idl>
37 module com { module sun { module star { module sdbc {
39 published interface XStatement;
40 published interface XRow;
41 published interface XRowUpdate;
42 published interface XResultSet;
43 published interface XResultSetUpdate;
44 published interface XResultSetMetaDataSupplier;
45 published interface XWarningsSupplier;
46 published interface XColumnLocate;
47 published interface XCloseable;
50 /** provides access to a table of data. A ResultSet
51 object is usually generated by executing a Statement.
55 <p>
56 A ResultSet maintains a cursor pointing to its current row of
57 data. Initially the cursor is positioned before the first row.
58 The "next" method moves the cursor to the next row.
59 </p>
60 <p>
61 The getXXX methods retrieve column values for the current
62 row. You can retrieve values using either the index number of the
63 column. Columns are numbered from 1.
64 </p>
65 <p>
66 For maximum portability, ResultSet columns within each row should be
67 read in left-to-right order and each column should be read only once.
68 </p>
69 <p>
70 For the getXXX methods, the SDBC driver attempts to convert the
71 underlying data to the specified type and returns a suitable
72 value.
73 </p>
74 <p>
75 Column names used as input to the findColumn method are case
76 insensitive. When several columns have the same name, then the value
77 of the first matching column will be returned. The column name option is
78 designed to be used when column names are used in the SQL
79 query. For columns that are NOT explicitly named in the query, it
80 is best to use column numbers. If column names are used, there is
81 no way for the programmer to guarantee that they actually refer to
82 the intended columns.
83 </p>
84 <p>
85 A ResultSet is automatically closed (disposed) by the Statement that
86 generated it when that Statement is closed, re-executed, or used
87 to retrieve the next result from a sequence of multiple results.
88 </p>
89 <p>
90 The number, types, and properties of a ResultSet's columns are
91 provided by the ResultSetMetaData object returned by the getMetaData
92 method.
93 </p>
95 published service ResultSet
98 /** optional for implementation; controls the releasing of resources
99 and the notification of registered listeners.
101 [optional] interface com::sun::star::lang::XComponent;
104 /** freeing all resources of a result set.
107 The creating statement will still be open after disposing.
108 </p>
111 This interface is mandatory only for JDBC conformance,
112 otherwise it is optional.
113 </p>
115 [optional] interface XCloseable;
117 // gives access to the properties.
118 interface com::sun::star::beans::XPropertySet;
121 /** controls the chaining of warnings, which may occur on every call
122 to the connected database.
125 Chained warnings from previous calls will be cleared before processing a new call.
126 </p>
129 This interface is mandatory only for JDBC conformance, otherwise it is optional.
130 </p>
132 [optional] interface XWarningsSupplier;
135 /** provides the access to the result set description.
137 interface XResultSetMetaDataSupplier;
140 /** is the interface for navigating on the rows on a result set.
142 interface XResultSet;
145 /** is the interface for updating row data to the database.
148 The implementation is optional.
149 </p>
151 [optional] interface XResultSetUpdate;
154 /** is the interface for accessing the data of the current row.
156 interface XRow;
159 /** is used for locating a column by it's name.
161 interface XColumnLocate;
164 /** is the interface for updating the data of the current row.
167 The implementation is optional.
168 </p>
170 [optional] interface XRowUpdate;
173 /** defines the SQL cursor name that will be used by subsequent Statement
174 <code>execute</code>
175 methods.
179 This name can then be used in SQL positioned update/delete statements to
180 identify the current row in the ResultSet generated by this statement. If
181 the database doesn't support positioned update/delete, this property is
182 a noop. To insure that a cursor has the proper isolation level to support
183 updates, the cursor's SELECT statement should be of the form
184 "select for update ...". If the "for update" phrase is omitted,
185 positioned updates may fail.
186 </p>
189 Note:
190 </b>
191 By definition, positioned update/delete
192 execution must be done by a different Statement than the one
193 which generated the ResultSet being used for positioning. Also,
194 cursor names must be unique within a connection.
195 </p>
197 [optional, readonly, property] string CursorName;
200 /** retrieves the result set concurrency.
202 @see com::sun::star::sdbc::ResultSetConcurrency
204 [readonly, property] long ResultSetConcurrency;
207 /** determines the result set type.
209 @see com::sun::star::sdbc::ResultSetType
211 [readonly, property] long ResultSetType;
214 /** retrieves the direction for fetching rows from database tables
215 that is the default for result sets generated from this
216 <type scope="com::sun::star::sdbcx">Statement</type>
217 object.
218 <br/>
219 If this <code>Statement</code> object has not set a fetch direction,
220 the return value is implementation-specific.
222 [property] long FetchDirection;
225 /** retrieves the number of result set rows that is the default fetch size
226 for result sets generated from this
227 <type scope="com::sun::star::sdbcx">Statement</type>
228 object.
229 <br/>
230 If this
231 <type scope="com::sun::star::sdbcx">Statement</type>
232 object has not set a fetch size,
233 the return value is implementation-specific.
235 [property] long FetchSize;
238 //=============================================================================
240 }; }; }; };
242 /*===========================================================================
243 ===========================================================================*/
244 #endif
246 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */