Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / sdbc / XRow.idl
blob9a2912dc45606cf43d809baebfa6805b484ec798
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_sdbc_XRow_idl__
20 #define __com_sun_star_sdbc_XRow_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/util/Date.idl>
26 #include <com/sun/star/util/DateTime.idl>
28 #include <com/sun/star/util/Time.idl>
30 module com { module sun { module star { module io {
31 published interface XInputStream;
32 };};};};
34 module com { module sun { module star { module container {
35 published interface XNameAccess;
36 };};};};
38 #include <com/sun/star/sdbc/SQLException.idl>
40 module com { module sun { module star { module sdbc {
42 published interface XRef;
43 published interface XArray;
44 published interface XBlob;
45 published interface XClob;
48 /** is used to access data which is collected in a row.
49 All methods raise a
50 com::sun::star::sdbc::SQLException
51 if a database access error occurs.
53 published interface XRow: com::sun::star::uno::XInterface
56 /** reports whether the last column read had a value of SQL NULL.
57 Note that you must first call getXXX on a column to try to read
58 its value and then call wasNull() to see if the value read was
59 SQL NULL.
61 @returns
62 `TRUE` if last column read was SQL NULL and `FALSE` otherwise
63 @throws SQLException
64 if a database access error occurs.
66 boolean wasNull() raises (SQLException);
68 /** gets the value of a column in the current row as a string.
69 @param columnIndex
70 the first column is 1, the second is 2,
71 @returns
72 the column value; if the value is SQL NULL, the result is null
73 @throws SQLException
74 if a database access error occurs.
76 string getString([in]long columnIndex) raises (SQLException);
78 /** gets the value of a column in the current row as boolean.
79 @param columnIndex
80 the first column is 1, the second is 2,
81 @returns
82 the column value; if the value is SQL NULL, the result is null
83 @throws SQLException
84 if a database access error occurs.
86 boolean getBoolean([in]long columnIndex) raises (SQLException);
88 /** get the value of a column in the current row as a byte.
89 @param columnIndex
90 the first column is 1, the second is 2,
91 @returns
92 the column value; if the value is SQL NULL, the result is null
93 @throws SQLException
94 if a database access error occurs.
96 byte getByte([in]long columnIndex) raises (SQLException);
98 /** gets the value of a column in the current row as a short.
99 @param columnIndex
100 the first column is 1, the second is 2,
101 @returns
102 the column value; if the value is SQL NULL, the result is null
103 @throws SQLException
104 if a database access error occurs.
106 short getShort([in]long columnIndex) raises (SQLException);
108 /** get the value of a column in the current row as an integer.
109 @param columnIndex
110 the first column is 1, the second is 2,
111 @returns
112 the column value; if the value is SQL NULL, the result is null
113 @throws SQLException
114 if a database access error occurs.
116 long getInt([in]long columnIndex) raises (SQLException);
118 /** get the value of a column in the current row as a long.
119 @param columnIndex
120 the first column is 1, the second is 2,
121 @returns
122 the column value; if the value is SQL NULL, the result is null
123 @throws SQLException
124 if a database access error occurs.
126 hyper getLong([in]long columnIndex) raises (SQLException);
128 /** gets the value of a column in the current row as a float.
129 @param columnIndex
130 the first column is 1, the second is 2,
131 @returns
132 the column value; if the value is SQL NULL, the result is null
133 @throws SQLException
134 if a database access error occurs.
136 float getFloat([in]long columnIndex) raises (SQLException);
138 /** gets the value of a column in the current row as a double.
139 @param columnIndex
140 the first column is 1, the second is 2,
141 @returns
142 the column value; if the value is SQL NULL, the result is null
143 @throws SQLException
144 if a database access error occurs.
146 double getDouble([in]long columnIndex) raises (SQLException);
148 /** gets the value of a column in the current row as a byte array.
149 The bytes represent the raw values returned by the driver.
150 @param columnIndex
151 the first column is 1, the second is 2, ...
152 @returns
153 the column value; if the value is SQL NULL, the result is empty.
154 @throws SQLException
155 if a database access error occurs.
157 sequence<byte> getBytes([in]long columnIndex) raises (SQLException);
159 /** gets the value of a column in the current row as a date object.
160 @param columnIndex
161 the first column is 1, the second is 2,
162 @returns
163 the column value; if the value is SQL NULL, the result is null
164 @throws SQLException
165 if a database access error occurs.
167 com::sun::star::util::Date getDate([in]long columnIndex)
168 raises (SQLException);
170 /** gets the value of a column in the current row as a time object.
171 @param columnIndex
172 the first column is 1, the second is 2,
173 @returns
174 the column value; if the value is SQL NULL, the result is null
175 @throws SQLException
176 if a database access error occurs.
178 com::sun::star::util::Time getTime([in]long columnIndex)
179 raises (SQLException);
181 /** gets the value of a column in the current row as a datetime object.
182 @param columnIndex
183 the first column is 1, the second is 2,
184 @returns
185 the column value; if the value is SQL NULL, the result is null
186 @throws SQLException
187 if a database access error occurs.
189 com::sun::star::util::DateTime getTimestamp([in]long columnIndex)
190 raises (SQLException);
192 /** gets the value of a column in the current row as a stream of
193 uninterpreted bytes. The value can then be read in chunks from the
194 stream. This method is particularly suitable for retrieving large
195 LONGVARBINARY values.
199 <b>Note:</b> All the data in the returned stream must be
200 read prior to getting the value of any other column. The next
201 call to a get method implicitly closes the stream. Also, a
202 stream may return 0 when the method
203 com::sun::star::io::XInputStream::available()
204 is called whether there is data
205 available or not.
206 </p>
207 @param columnIndex
208 the first column is 1, the second is 2,
209 @returns
210 the column value; if the value is SQL NULL, the result is null
211 @throws SQLException
212 if a database access error occurs.
214 com::sun::star::io::XInputStream getBinaryStream([in]long columnIndex)
215 raises (SQLException);
217 /** gets the value of a column in the current row as a stream of
218 uninterpreted bytes. The value can then be read in chunks from the
219 stream. This method is particularly suitable for retrieving large
220 LONGVARBINARY or LONGVARCHAR values.
224 <b>Note:</b> All the data in the returned stream must be
225 read prior to getting the value of any other column. The next
226 call to a get method implicitly closes the stream. Also, a
227 stream may return 0 when the method
228 com::sun::star::io::XInputStream::available()
229 is called whether there is data
230 available or not.
231 </p>
232 @param columnIndex
233 the first column is 1, the second is 2,
234 @returns
235 the column value; if the value is SQL NULL, the result is null
236 @throws SQLException
237 if a database access error occurs.
239 com::sun::star::io::XInputStream getCharacterStream([in]long columnIndex)
240 raises (SQLException);
242 /** returns the value of a column in the current row as an object.
243 This method uses the given
244 <code>Map</code>
245 object for the custom mapping of the SQL structure or distinct type
246 that is being retrieved.
247 @param columnIndex
248 the first column is 1, the second is 2,
249 @param typeMap
250 the map of types which should be used to get the column value
251 @returns
252 the column value; if the value is SQL NULL, the result is null
253 @throws SQLException
254 if a database access error occurs.
256 any getObject([in]long columnIndex,
257 [in]com::sun::star::container::XNameAccess typeMap)
258 raises (SQLException);
260 /** gets a REF(&amp;lt;structured-type&amp;gt;) column value from the current row.
261 @param columnIndex
262 the first column is 1, the second is 2,
263 @returns
264 the column value; if the value is SQL NULL, the result is null
265 @throws SQLException
266 if a database access error occurs.
268 XRef getRef([in]long columnIndex) raises (SQLException);
270 /** gets a BLOB value in the current row.
271 @param columnIndex
272 the first column is 1, the second is 2,
273 @returns
274 the column value; if the value is SQL NULL, the result is null
275 @throws SQLException
276 if a database access error occurs.
278 XBlob getBlob([in]long columnIndex) raises (SQLException);
280 /** gets a CLOB value in the current row of this
281 <code>ResultSet</code>
282 object.
283 @param columnIndex
284 the first column is 1, the second is 2,
285 @returns
286 the column value; if the value is SQL NULL, the result is null
287 @throws SQLException
288 if a database access error occurs.
290 XClob getClob([in]long columnIndex) raises (SQLException);
292 /** gets a SQL ARRAY value from the current row of this
293 <code>ResultSet</code>
294 object.
295 @param columnIndex
296 the first column is 1, the second is 2,
297 @returns
298 the column value; if the value is SQL NULL, the result is null
299 @throws SQLException
300 if a database access error occurs.
302 XArray getArray([in]long columnIndex) raises (SQLException);
306 }; }; }; };
308 /*===========================================================================
309 ===========================================================================*/
310 #endif
312 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */