1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdbc_XArray_idl__
28 #define __com_sun_star_sdbc_XArray_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 module com
{ module sun
{ module star
{ module container
{
35 published
interface XNameAccess
;
38 #ifndef __com_sun_star_sdbc_SQLException_idl__
39 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
42 module com
{ module sun
{ module star
{ module sdbc
{
44 published
interface XResultSet
;
47 /** is used for mapping the SQL type
48 <member scope= "com::sun::star::sdbc">DataType::ARRAY</member>
52 is a transaction duration
53 reference to an SQL array. By default, an
57 is implemented using a SQL LOCATOR(array) internally.
59 published
interface XArray
: com
::sun
::star
::uno
::XInterface
62 /** returns the SQL type name of the elements in
63 the array designated by this
67 If the elements are a built-in type, it returns
68 the database-specific type name of the elements.
69 If the elements are a user-defined type (UDT),
70 this method returns the fully-qualified SQL type name.
73 a String that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDT
76 if a database access error occurs.
78 string getBaseTypeName
() raises
(SQLException
);
80 //-------------------------------------------------------------------------
82 /** returns the SDBC type of the elements in the array designated
87 a constant from the SDBC types that is the type code for the elements in the array designated by this Array object.
89 if a database access error occurs.
91 long getBaseType
() raises
(SQLException
);
93 //-------------------------------------------------------------------------
95 /** retrieves the contents of the SQL array designated by this
97 object, using the specified
99 for type map customizations.
101 If the base type of the array does not match a user-defined type
104 , the standard mapping is used instead.
107 is a map object that contains mappings of SQL type names to
113 associated with the connection for customizations of the type-mappings
117 an sequence that contains the ordered elements
118 of the SQL array designated by this object.
121 if an error occurs while attempting to access the array.
123 sequence
<any
> getArray
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
124 raises
(SQLException
);
126 //-------------------------------------------------------------------------
128 /** returns an array containing a slice of the SQL array, beginning with the
133 successive elements of the SQL array.
136 is the array index of the first element to retrieve;
137 the first element is at index 1.
139 is the number of successive SQL array elements to retrieve.
141 is a map object that contains mappings of SQL type names to
147 associated with the connection for customizations of the type-mappings
150 an array containing up to
153 of the SQL array, beginning with element
157 if an error occurs while attempting to access the array.
159 sequence
<any
> getArrayAtIndex
([in]long index
,
161 [in]com
::sun
::star
::container
::XNameAccess
163 raises
(SQLException
);
165 //-------------------------------------------------------------------------
167 /** returns a result set that contains the elements of the array
170 object and uses the given
172 to map the array elements. If the base
173 type of the array does not match a user-defined type in
180 the connection type mapping is used instead.
184 The result set contains one row for each array element, with
185 two columns in each row. The second column stores the element
186 value; the first column stores the index into the array for
187 that element (with the first array element being at index 1).
188 The rows are in ascending order corresponding to
189 the order of the indices.
193 contains mapping of SQL user-defined types to classes in the UNO programming language
195 a ResultSet object containing one row for each of the elements in the array designated by this Array object,
196 with the rows in ascending order based on the indices.
198 if a database access error occurs.
200 XResultSet getResultSet
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
201 raises
(SQLException
);
203 //-------------------------------------------------------------------------
205 /** returns a result set holding the elements of the subarray that
210 successive elements. This method uses the given
212 to map the array elements. If the base
213 type of the array does not match a user-defined type in
220 the connection type mapping is used instead.
224 The result set contains one row for each array element, with
225 two columns in each row. The second column stores the element
226 value; the first column stores the index into the array for
227 that element (with the first array element being at index 1).
228 The rows are in ascending order corresponding to
229 the order of the indices.
232 the array index of the first element to retrieve; the first element is at index 1.
234 the number of successive SQL array elements to retrieve,
236 the Map object that contains the mapping of SQL type names to classes in the UNO programming language.
238 a ResultSet object containing up to count consecutive elements of the SQL array
239 designated by this Array object, starting at index index.
241 if a database access error occurs.
243 XResultSet getResultSetAtIndex
([in]long index
,
245 [in]com
::sun
::star
::container
::XNameAccess typeMap
)
246 raises
(SQLException
);
249 //=============================================================================
253 /*===========================================================================
254 ===========================================================================*/