1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
;
34 module com
{ module sun
{ module star
{ module container
{
35 published
interface XNameAccess
;
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.
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
62 `TRUE` if last column read was SQL NULL and `FALSE` otherwise
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.
70 the first column is 1, the second is 2,
72 the column value; if the value is SQL NULL, the result is null
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.
80 the first column is 1, the second is 2,
82 the column value; if the value is SQL NULL, the result is null
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.
90 the first column is 1, the second is 2,
92 the column value; if the value is SQL NULL, the result is null
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.
100 the first column is 1, the second is 2,
102 the column value; if the value is SQL NULL, the result is null
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.
110 the first column is 1, the second is 2,
112 the column value; if the value is SQL NULL, the result is null
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.
120 the first column is 1, the second is 2,
122 the column value; if the value is SQL NULL, the result is null
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.
130 the first column is 1, the second is 2,
132 the column value; if the value is SQL NULL, the result is null
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.
140 the first column is 1, the second is 2,
142 the column value; if the value is SQL NULL, the result is null
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.
151 the first column is 1, the second is 2, ...
153 the column value; if the value is SQL NULL, the result is empty.
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.
161 the first column is 1, the second is 2,
163 the column value; if the value is SQL NULL, the result is null
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.
172 the first column is 1, the second is 2,
174 the column value; if the value is SQL NULL, the result is null
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.
183 the first column is 1, the second is 2,
185 the column value; if the value is SQL NULL, the result is null
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
208 the first column is 1, the second is 2,
210 the column value; if the value is SQL NULL, the result is null
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
233 the first column is 1, the second is 2,
235 the column value; if the value is SQL NULL, the result is null
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
245 object for the custom mapping of the SQL structure or distinct type
246 that is being retrieved.
248 the first column is 1, the second is 2,
250 the map of types which should be used to get the column value
252 the column value; if the value is SQL NULL, the result is null
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(&lt;structured-type&gt;) column value from the current row.
262 the first column is 1, the second is 2,
264 the column value; if the value is SQL NULL, the result is null
266 if a database access error occurs.
268 XRef getRef
([in]long columnIndex
) raises
(SQLException
);
270 /** gets a BLOB value in the current row.
272 the first column is 1, the second is 2,
274 the column value; if the value is SQL NULL, the result is null
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>
284 the first column is 1, the second is 2,
286 the column value; if the value is SQL NULL, the result is null
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>
296 the first column is 1, the second is 2,
298 the column value; if the value is SQL NULL, the result is null
300 if a database access error occurs.
302 XArray getArray
([in]long columnIndex
) raises
(SQLException
);
308 /*===========================================================================
309 ===========================================================================*/
312 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */