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 .
20 module com
{ module sun
{ module star
{ module io
{
21 published
interface XInputStream
;
24 module com
{ module sun
{ module star
{ module container
{
25 published
interface XNameAccess
;
28 module com
{ module sun
{ module star
{ module sdbc
{
30 published
interface XRef
;
31 published
interface XArray
;
32 published
interface XBlob
;
33 published
interface XClob
;
36 /** is used to access data which is collected in a row.
38 com::sun::star::sdbc::SQLException
39 if a database access error occurs.
41 published
interface XRow
: com
::sun
::star
::uno
::XInterface
44 /** reports whether the last column read had a value of SQL NULL.
45 Note that you must first call getXXX on a column to try to read
46 its value and then call wasNull() to see if the value read was
50 `TRUE` if last column read was SQL NULL and `FALSE` otherwise
52 if a database access error occurs.
54 boolean wasNull
() raises
(SQLException
);
56 /** gets the value of a column in the current row as a string.
58 the first column is 1, the second is 2,
60 the column value; if the value is SQL NULL, the result is null
62 if a database access error occurs.
64 string getString
([in]long columnIndex
) raises
(SQLException
);
66 /** gets the value of a column in the current row as boolean.
68 the first column is 1, the second is 2,
70 the column value; if the value is SQL NULL, the result is null
72 if a database access error occurs.
74 boolean getBoolean
([in]long columnIndex
) raises
(SQLException
);
76 /** get the value of a column in the current row as a byte.
78 the first column is 1, the second is 2,
80 the column value; if the value is SQL NULL, the result is null
82 if a database access error occurs.
84 byte getByte
([in]long columnIndex
) raises
(SQLException
);
86 /** gets the value of a column in the current row as a short.
88 the first column is 1, the second is 2,
90 the column value; if the value is SQL NULL, the result is null
92 if a database access error occurs.
94 short getShort
([in]long columnIndex
) raises
(SQLException
);
96 /** get the value of a column in the current row as an integer.
98 the first column is 1, the second is 2,
100 the column value; if the value is SQL NULL, the result is null
102 if a database access error occurs.
104 long getInt
([in]long columnIndex
) raises
(SQLException
);
106 /** get the value of a column in the current row as a long.
108 the first column is 1, the second is 2,
110 the column value; if the value is SQL NULL, the result is null
112 if a database access error occurs.
114 hyper getLong
([in]long columnIndex
) raises
(SQLException
);
116 /** gets the value of a column in the current row as a float.
118 the first column is 1, the second is 2,
120 the column value; if the value is SQL NULL, the result is null
122 if a database access error occurs.
124 float getFloat
([in]long columnIndex
) raises
(SQLException
);
126 /** gets the value of a column in the current row as a double.
128 the first column is 1, the second is 2,
130 the column value; if the value is SQL NULL, the result is null
132 if a database access error occurs.
134 double getDouble
([in]long columnIndex
) raises
(SQLException
);
136 /** gets the value of a column in the current row as a byte array.
137 The bytes represent the raw values returned by the driver.
139 the first column is 1, the second is 2, ...
141 the column value; if the value is SQL NULL, the result is empty.
143 if a database access error occurs.
145 sequence
<byte> getBytes
([in]long columnIndex
) raises
(SQLException
);
147 /** gets the value of a column in the current row as a date object.
149 the first column is 1, the second is 2,
151 the column value; if the value is SQL NULL, the result is null
153 if a database access error occurs.
155 com
::sun
::star
::util
::Date getDate
([in]long columnIndex
)
156 raises
(SQLException
);
158 /** gets the value of a column in the current row as a time object.
160 the first column is 1, the second is 2,
162 the column value; if the value is SQL NULL, the result is null
164 if a database access error occurs.
166 com
::sun
::star
::util
::Time getTime
([in]long columnIndex
)
167 raises
(SQLException
);
169 /** gets the value of a column in the current row as a datetime object.
171 the first column is 1, the second is 2,
173 the column value; if the value is SQL NULL, the result is null
175 if a database access error occurs.
177 com
::sun
::star
::util
::DateTime getTimestamp
([in]long columnIndex
)
178 raises
(SQLException
);
180 /** gets the value of a column in the current row as a stream of
181 uninterpreted bytes. The value can then be read in chunks from the
182 stream. This method is particularly suitable for retrieving large
183 LONGVARBINARY values.
187 <b>Note:</b> All the data in the returned stream must be
188 read prior to getting the value of any other column. The next
189 call to a get method implicitly closes the stream. Also, a
190 stream may return 0 when the method
191 com::sun::star::io::XInputStream::available()
192 is called whether there is data
196 the first column is 1, the second is 2,
198 the column value; if the value is SQL NULL, the result is null
200 if a database access error occurs.
202 com
::sun
::star
::io
::XInputStream getBinaryStream
([in]long columnIndex
)
203 raises
(SQLException
);
205 /** gets the value of a column in the current row as a stream of
206 uninterpreted bytes. The value can then be read in chunks from the
207 stream. This method is particularly suitable for retrieving large
208 LONGVARBINARY or LONGVARCHAR values.
212 <b>Note:</b> All the data in the returned stream must be
213 read prior to getting the value of any other column. The next
214 call to a get method implicitly closes the stream. Also, a
215 stream may return 0 when the method
216 com::sun::star::io::XInputStream::available()
217 is called whether there is data
221 the first column is 1, the second is 2,
223 the column value; if the value is SQL NULL, the result is null
225 if a database access error occurs.
227 com
::sun
::star
::io
::XInputStream getCharacterStream
([in]long columnIndex
)
228 raises
(SQLException
);
230 /** returns the value of a column in the current row as an object.
231 This method uses the given
233 object for the custom mapping of the SQL structure or distinct type
234 that is being retrieved.
236 the first column is 1, the second is 2,
238 the map of types which should be used to get the column value
240 the column value; if the value is SQL NULL, the result is null
242 if a database access error occurs.
244 any getObject
([in]long columnIndex
,
245 [in]com
::sun
::star
::container
::XNameAccess typeMap
)
246 raises
(SQLException
);
248 /** gets a REF(&lt;structured-type&gt;) column value from the current row.
250 the first column is 1, the second is 2,
252 the column value; if the value is SQL NULL, the result is null
254 if a database access error occurs.
256 XRef getRef
([in]long columnIndex
) raises
(SQLException
);
258 /** gets a BLOB value in the current row.
260 the first column is 1, the second is 2,
262 the column value; if the value is SQL NULL, the result is null
264 if a database access error occurs.
266 XBlob getBlob
([in]long columnIndex
) raises
(SQLException
);
268 /** gets a CLOB value in the current row of this
269 <code>ResultSet</code>
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 XClob getClob
([in]long columnIndex
) raises
(SQLException
);
280 /** gets a SQL ARRAY value from 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 XArray getArray
([in]long columnIndex
) raises
(SQLException
);
296 /*===========================================================================
297 ===========================================================================*/
299 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */