1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_sdbc_XResultSetMetaData_idl__
24#define __com_sun_star_sdbc_XResultSetMetaData_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_sdbc_SQLException_idl__
31#include <com/sun/star/sdbc/SQLException.idl>
32#endif
33
34 module com {  module sun {  module star {  module sdbc {
35
36
37/** can be used to find out about the types and properties
38	of the columns in a ResultSet.
39 */
40published interface XResultSetMetaData: com::sun::star::uno::XInterface
41{
42
43	/** returns the number of columns in this ResultSet.
44		@returns
45			the column count
46		@throws SQLException
47			if a database access error occurs.
48	 */
49	long getColumnCount() raises (SQLException);
50    //-------------------------------------------------------------------------
51
52	/** indicates whether the column is automatically numbered, thus read-only.
53		@param column
54			the first column is 1, the second is 2,
55		@returns
56			<TRUE/> if so
57		@throws SQLException
58			if a database access error occurs.
59	 */
60	boolean isAutoIncrement([in]long column) raises (SQLException);
61	//-------------------------------------------------------------------------
62
63	/** indicates whether a column's case matters.
64		@param column
65			the first column is 1, the second is 2,
66		@returns
67			<TRUE/> if so
68		@throws SQLException
69			if a database access error occurs.
70	 */
71	boolean isCaseSensitive([in]long column) raises (SQLException);
72	//-------------------------------------------------------------------------
73
74	/** indicates whether the column can be used in a where clause.
75		@param column
76			the first column is 1, the second is 2,
77		@returns
78			<TRUE/> if so
79		@throws SQLException
80			if a database access error occurs.
81	 */
82	boolean isSearchable([in]long column) raises (SQLException);
83	//-------------------------------------------------------------------------
84
85	/** indicates whether the column is a cash value.
86		@param column
87			the first column is 1, the second is 2,
88		@returns
89			<TRUE/> if so
90		@throws SQLException
91			if a database access error occurs.
92	 */
93	boolean isCurrency([in]long column) raises (SQLException);
94	//-------------------------------------------------------------------------
95
96	/** indicates the nullability of values in the designated column.@see com::sun::star::sdbc::ColumnValue
97		@param column
98			the first column is 1, the second is 2,
99		@returns
100			<TRUE/> if so
101		@throws SQLException
102			if a database access error occurs.
103	 */
104	long isNullable([in]long column) raises (SQLException);
105	//-------------------------------------------------------------------------
106
107	/** indicates whether values in the column are signed numbers.
108		@param column
109			the first column is 1, the second is 2,
110		@returns
111			<TRUE/> if so
112		@throws SQLException
113			if a database access error occurs.
114	 */
115	boolean isSigned([in]long column) raises (SQLException);
116	//-------------------------------------------------------------------------
117
118	/** indicates the column's normal max width in chars.
119		@param column
120			the first column is 1, the second is 2,
121		@returns
122			the normal maximum number of characters allowed as the width of the designated column
123		@throws SQLException
124			if a database access error occurs.
125	 */
126	long getColumnDisplaySize([in]long column) raises (SQLException);
127	//-------------------------------------------------------------------------
128
129	/** gets the suggested column title for use in printouts and
130		displays.
131		@param column
132			the first column is 1, the second is 2,
133		@returns
134			the suggested column title
135		@throws SQLException
136			if a database access error occurs.
137	 */
138	string getColumnLabel([in]long column) raises (SQLException);
139	//-------------------------------------------------------------------------
140
141	/** gets a column's name.
142		@param column
143			the first column is 1, the second is 2,
144		@returns
145			the column name
146		@throws SQLException
147			if a database access error occurs.
148	 */
149	string getColumnName([in]long column) raises (SQLException);
150	//-------------------------------------------------------------------------
151
152	/** gets a column's table's schema.
153		@param column
154			the first column is 1, the second is 2,
155		@returns
156			the schema name
157		@throws SQLException
158			if a database access error occurs.
159	 */
160	string getSchemaName([in]long column) raises (SQLException);
161	//-------------------------------------------------------------------------
162
163	/** gets a column's number of decimal digits.
164		@param column
165			the first column is 1, the second is 2,
166		@returns
167			precision
168		@throws SQLException
169			if a database access error occurs.
170	 */
171	long getPrecision([in]long column) raises (SQLException);
172	//-------------------------------------------------------------------------
173
174	/** gets a column's number of digits to right of the decimal point.
175		@param column
176			the first column is 1, the second is 2,
177		@returns
178			scale
179		@throws SQLException
180			if a database access error occurs.
181	 */
182	long getScale([in]long column) raises (SQLException);
183	//-------------------------------------------------------------------------
184
185	/** gets a column's table name.
186		@param column
187			the first column is 1, the second is 2,
188		@returns
189			the table name
190		@throws SQLException
191			if a database access error occurs.
192	 */
193	string getTableName([in]long column) raises (SQLException);
194	//-------------------------------------------------------------------------
195
196	/** gets a column's table's catalog name.
197		@param column
198			the first column is 1, the second is 2,
199		@returns
200			the catalog name
201		@throws SQLException
202			if a database access error occurs.
203	 */
204	string getCatalogName([in]long column) raises (SQLException);
205	//-------------------------------------------------------------------------
206
207	/** retrieves a column's SQL type.
208		@param column
209			the first column is 1, the second is 2,
210		@returns
211			the column type
212		@throws SQLException
213			if a database access error occurs.
214	 */
215	long getColumnType([in]long column) raises (SQLException);
216	//-------------------------------------------------------------------------
217
218	/** retrieves a column's database-specific type name.
219		@param column
220			the first column is 1, the second is 2,
221		@returns
222			the type name
223		@throws SQLException
224			if a database access error occurs.
225	 */
226	string getColumnTypeName([in]long column) raises (SQLException);
227	//-------------------------------------------------------------------------
228
229	/** indicates whether a column is definitely not writable.
230		@param column
231			the first column is 1, the second is 2,
232		@returns
233			<TRUE/> if so
234		@throws SQLException
235			if a database access error occurs.
236	 */
237	boolean isReadOnly([in]long column) raises (SQLException);
238	//-------------------------------------------------------------------------
239
240	/** indicates whether it is possible for a write on the column to succeed.
241		@param column
242			the first column is 1, the second is 2,
243		@returns
244			<TRUE/> if so
245		@throws SQLException
246			if a database access error occurs.
247	 */
248	boolean isWritable([in]long column) raises (SQLException);
249	//-------------------------------------------------------------------------
250
251	/** indicates whether a write on the column will definitely succeed.
252		@param column
253			the first column is 1, the second is 2,
254		@returns
255			<TRUE/> if so
256		@throws SQLException
257			if a database access error occurs.
258	 */
259	boolean isDefinitelyWritable([in]long column) raises (SQLException);
260	//-------------------------------------------------------------------------
261
262	/** returns the fully-qualified name of the service whose instances
263		are manufactured if the method
264		<member scope="com::sun::star::sdbc">XResultSet::.getObject()</member>
265		is called to retrieve a value from the column.
266		@param column
267			the first column is 1, the second is 2,
268		@returns
269			the service name
270		@throws SQLException
271			if a database access error occurs.
272	 */
273	string getColumnServiceName([in]long column) raises (SQLException);
274};
275
276//=============================================================================
277
278}; }; }; };
279
280/*===========================================================================
281===========================================================================*/
282#endif
283