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_XMultipleResults_idl__
24#define __com_sun_star_sdbc_XMultipleResults_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 published interface XResultSet;
37
38
39/** is used for inspecting multiple results produced by the execution of a
40	SQL statement.
41
42
43	<p>
44	Under some (uncommon) situations a single SQL statement may return
45	multiple result sets and/or update counts.  Normally you can ignore
46	this unless you are (1) executing a stored procedure that you know may
47	return multiple results or (2) you are dynamically executing an
48	unknown SQL string. The methods
49	<member scope="com::sun::star::sdbc">XMultipleResults::getMoreResults()</member>
50	,
51	<member scope="com::sun::star::sdbc">XMultipleResults::getResultSet()</member>
52	and
53	<member scope="com::sun::star::sdbc">XMultipleResults::getUpdateCount()</member>
54	let you navigate through multiple results.
55
56	</p>
57	@see com::sun::star::sdbc::XStatement
58	 @see com::sun::star::sdbc::XPreparedStatement
59 */
60published interface XMultipleResults: com::sun::star::uno::XInterface
61{
62
63	/** returns the current result as a
64		<type scope="com::sun::star::sdbc">ResultSet</type>
65		object.
66		This method should be called only once per result.
67		@returns
68			the ResultSet object
69		@throws SQLException
70			if a database access error occurs.
71	 */
72	XResultSet getResultSet() raises (SQLException);
73	//-------------------------------------------------------------------------
74
75	/** returns the current result as an update count.
76
77
78		<p>
79		If the result is a ResultSet or there are no more results, -1
80		is returned. This method should be called only once per result.
81		</p>
82		@returns
83			the current result as an update count.
84		@throws SQLException
85			if a database access error occurs.
86	 */
87	long getUpdateCount() raises (SQLException);
88    //-------------------------------------------------------------------------
89
90	/** moves to a Statement's next result. It returns <TRUE/> if
91		this result is a ResultSet.  This method also implicitly
92		closes any current ResultSet obtained with getResultSet.
93
94		<p>
95		There are no more results when <code>(!getMoreResults() &amp;amp;&amp;amp;
96		getUpdateCount() == -1)</code>.
97
98		</p>
99		@returns
100			<TRUE/> if there exists more ResultSet objects
101		@throws SQLException
102			if a database access error occurs.
103	 */
104	boolean getMoreResults() raises (SQLException);
105};
106
107//=============================================================================
108
109}; }; }; };
110
111/*===========================================================================
112===========================================================================*/
113#endif
114