1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_sdbc_ResultSet_idl__ 24#define __com_sun_star_sdbc_ResultSet_idl__ 25 26#ifndef __com_sun_star_lang_XComponent_idl__ 27#include <com/sun/star/lang/XComponent.idl> 28#endif 29 30#ifndef __com_sun_star_beans_XPropertySet_idl__ 31#include <com/sun/star/beans/XPropertySet.idl> 32#endif 33 34#ifndef __com_sun_star_util_XCancellable_idl__ 35#include <com/sun/star/util/XCancellable.idl> 36#endif 37 38 module com { module sun { module star { module sdbc { 39 40 published interface XStatement; 41 published interface XRow; 42 published interface XRowUpdate; 43 published interface XResultSet; 44 published interface XResultSetUpdate; 45 published interface XResultSetMetaDataSupplier; 46 published interface XWarningsSupplier; 47 published interface XColumnLocate; 48 published interface XCloseable; 49 50 51/** provides access to a table of data. A ResultSet 52 object is usually generated by executing a Statement. 53 54 55 56 <p> 57 A ResultSet maintains a cursor pointing to its current row of 58 data. Initially the cursor is positioned before the first row. 59 The 'next' method moves the cursor to the next row. 60 </p> 61 <p> 62 The getXXX methods retrieve column values for the current 63 row. You can retrieve values using either the index number of the 64 column. Columns are numbered from 1. 65 </p> 66 <p> 67 For maximum portability, ResultSet columns within each row should be 68 read in left-to-right order and each column should be read only once. 69 </p> 70 <p> 71 For the getXXX methods, the SDBC driver attempts to convert the 72 underlying data to the specified type and returns a suitable 73 value. 74 </p> 75 <p> 76 Column names used as input to the findColumn method are case 77 insensitive. When several columns have the same name, then the value 78 of the first matching column will be returned. The column name option is 79 designed to be used when column names are used in the SQL 80 query. For columns that are NOT explicitly named in the query, it 81 is best to use column numbers. If column names are used, there is 82 no way for the programmer to guarantee that they actually refer to 83 the intended columns. 84 </p> 85 <p> 86 A ResultSet is automatically closed (disposed) by the Statement that 87 generated it when that Statement is closed, re-executed, or used 88 to retrieve the next result from a sequence of multiple results. 89 </p> 90 <p> 91 The number, types, and properties of a ResultSet's columns are 92 provided by the ResultSetMetaData object returned by the getMetaData 93 method. 94 </p> 95 */ 96published service ResultSet 97{ 98 99 /** optional for implementation; controls the releasing of resources 100 and the notification of registered listeners. 101 */ 102 [optional] interface com::sun::star::lang::XComponent; 103 104 105 /** freeing all resources of a result set. 106 107 <p> 108 The creating statement will still be open after disposing. 109 </p> 110 111 <p> 112 This interface is mandatory only for JDBC conformance, 113 otherwise it is optional. 114 </p> 115 */ 116 [optional] interface XCloseable; 117 118 // gives access to the properties. 119 interface com::sun::star::beans::XPropertySet; 120 121 122 /** controls the chaining of warnings, which may occur on every call 123 to the connected database. 124 125 <p> 126 Chained warnings from previous calls will be cleared before processing a new call. 127 </p> 128 129 <p> 130 This interface is mandatory only for JDBC conformance, otherwise it is optional. 131 </p> 132 */ 133 [optional] interface XWarningsSupplier; 134 135 136 /** provides the access to the result set description. 137 */ 138 interface XResultSetMetaDataSupplier; 139 140 141 /** is the interface for navigating on the rows on a result set. 142 */ 143 interface XResultSet; 144 145 146 /** is the interface for updating row data to the database. 147 148 <p> 149 The implementation is optional. 150 </p> 151 */ 152 [optional] interface XResultSetUpdate; 153 154 155 /** is the interface for accessing the data of the current row. 156 */ 157 interface XRow; 158 159 160 /** is used for locating a column by it's name. 161 */ 162 interface XColumnLocate; 163 164 165 /** is the interface for updating the data of the current row. 166 167 <p> 168 The implementation is optional. 169 </p> 170 */ 171 [optional] interface XRowUpdate; 172 173 174 /** defines the SQL cursor name that will be used by subsequent Statement 175 <code>execute</code> 176 methods. 177 178 179 <p> 180 This name can then be used in SQL positioned update/delete statements to 181 identify the current row in the ResultSet generated by this statement. If 182 the database doesn't support positioned update/delete, this property is 183 a noop. To insure that a cursor has the proper isolation level to support 184 updates, the cursor's SELECT statement should be of the form 185 'select for update ...'. If the 'for update' phrase is omitted, 186 positioned updates may fail. 187 </p> 188 <p> 189 <b> 190 Note: 191 </b> 192 By definition, positioned update/delete 193 execution must be done by a different Statement than the one 194 which generated the ResultSet being used for positioning. Also, 195 cursor names must be unique within a connection. 196 </p> 197 */ 198 [optional, readonly, property] string CursorName; 199 200 201 /** retrieves the result set concurrency. 202 203 @see com::sun::star::sdbc::ResultSetConcurrency 204 */ 205 [readonly, property] long ResultSetConcurrency; 206 207 208 /** determines the result set type. 209 210 @see com::sun::star::sdbc::ResultSetType 211 */ 212 [readonly, property] long ResultSetType; 213 214 215 /** retrieves the direction for fetching rows from database tables 216 that is the default for result sets generated from this 217 <type scope="com::sun::star::sdbcx">Statement</type> 218 object. 219 <br/> 220 If this <code>Statement</code> object has not set a fetch direction, 221 the return value is implementation-specific. 222 */ 223 [property] long FetchDirection; 224 225 226 /** retrieves the number of result set rows that is the default fetch size 227 for result sets generated from this 228 <type scope="com::sun::star::sdbcx">Statement</type> 229 object. 230 <br/> 231 If this 232 <type scope="com::sun::star::sdbcx">Statement</type> 233 object has not set a fetch size, 234 the return value is implementation-specific. 235 */ 236 [property] long FetchSize; 237}; 238 239//============================================================================= 240 241}; }; }; }; 242 243/*=========================================================================== 244===========================================================================*/ 245#endif 246