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 container
{
21 published
interface XNameAccess
;
24 module com
{ module sun
{ module star
{ module sdbc
{
26 published
interface XResultSet
;
29 /** is used for mapping the SQL type com::sun::star::sdbc::DataType::ARRAY.
31 By default, an <code>Array</code> is a transaction duration
32 reference to an SQL array. By default, an <code>Array</code>
33 is implemented using a SQL LOCATOR(array) internally.
35 published
interface XArray
: com
::sun
::star
::uno
::XInterface
38 /** returns the SQL type name of the elements in
39 the array designated by this
43 If the elements are a built-in type, it returns
44 the database-specific type name of the elements.
45 If the elements are a user-defined type (UDT),
46 this method returns the fully-qualified SQL type name.
49 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
52 if a database access error occurs.
54 string getBaseTypeName
() raises
(SQLException
);
57 /** returns the SDBC type of the elements in the array designated
62 a constant from the SDBC types that is the type code for the elements in the array designated by this Array object.
64 if a database access error occurs.
66 long getBaseType
() raises
(SQLException
);
69 /** retrieves the contents of the SQL array designated by this
71 object, using the specified
73 for type map customizations.
75 If the base type of the array does not match a user-defined type
78 , the standard mapping is used instead.
81 is a map object that contains mappings of SQL type names to
87 associated with the connection for customizations of the type-mappings
91 a sequence that contains the ordered elements
92 of the SQL array designated by this object.
95 if an error occurs while attempting to access the array.
97 sequence
<any
> getArray
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
98 raises
(SQLException
);
101 /** returns an array containing a slice of the SQL array, beginning with the
106 successive elements of the SQL array.
109 is the array index of the first element to retrieve;
110 the first element is at index 1.
112 is the number of successive SQL array elements to retrieve.
114 is a map object that contains mappings of SQL type names to
120 associated with the connection for customizations of the type-mappings
123 an array containing up to
125 consecutive elements of the SQL array, beginning with element
128 if an error occurs while attempting to access the array.
130 sequence
<any
> getArrayAtIndex
([in]long index
,
132 [in]com
::sun
::star
::container
::XNameAccess
134 raises
(SQLException
);
137 /** returns a result set that contains the elements of the array
140 object and uses the given
142 to map the array elements. If the base
143 type of the array does not match a user-defined type in
150 the connection type mapping is used instead.
154 The result set contains one row for each array element, with
155 two columns in each row. The second column stores the element
156 value; the first column stores the index into the array for
157 that element (with the first array element being at index 1).
158 The rows are in ascending order corresponding to
159 the order of the indices.
163 contains mapping of SQL user-defined types to classes in the UNO programming language
165 a ResultSet object containing one row for each of the elements in the array designated by this Array object,
166 with the rows in ascending order based on the indices.
168 if a database access error occurs.
170 XResultSet getResultSet
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
171 raises
(SQLException
);
174 /** returns a result set holding the elements of the subarray that
179 successive elements. This method uses the given
181 to map the array elements. If the base
182 type of the array does not match a user-defined type in
189 the connection type mapping is used instead.
193 The result set contains one row for each array element, with
194 two columns in each row. The second column stores the element
195 value; the first column stores the index into the array for
196 that element (with the first array element being at index 1).
197 The rows are in ascending order corresponding to
198 the order of the indices.
201 the array index of the first element to retrieve; the first element is at index 1.
203 the number of successive SQL array elements to retrieve,
205 the Map object that contains the mapping of SQL type names to classes in the UNO programming language.
207 a ResultSet object containing up to count consecutive elements of the SQL array
208 designated by this Array object, starting at index index.
210 if a database access error occurs.
212 XResultSet getResultSetAtIndex
([in]long index
,
214 [in]com
::sun
::star
::container
::XNameAccess typeMap
)
215 raises
(SQLException
);
221 /*===========================================================================
222 ===========================================================================*/
224 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */