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_sdb_SingleSelectQueryAnalyzer_idl__
24#define __com_sun_star_sdb_SingleSelectQueryAnalyzer_idl__
25
26#ifndef __com_sun_star_sdb_XSingleSelectQueryAnalyzer_idl__
27#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl>
28#endif
29
30 module com {  module sun {  module star {  module sdbcx {
31interface XTablesSupplier;
32interface XColumnsSupplier;
33};};};};
34
35 module com {  module sun {  module star {  module sdb {
36
37 interface XParametersSupplier;
38/** represents a service for analyzing a single select statement.
39
40	<p>
41	It hides the complexity of parsing and evaluating a single select statement and provides
42	sophisticated methods for accessing a statements filter, group by, having and order
43	criteria, as well as the corresponding select columns and tables.
44	If supported, it even gives access to the parameters.
45	</p>
46
47	@see com::sun::star::sdb::SingleSelectQueryComposer
48 */
49service SingleSelectQueryAnalyzer
50{
51	interface XSingleSelectQueryAnalyzer;
52
53	/** access to the selected tables.
54
55        <p>The selected tables are those present in the <code>FROM</code> part
56        of a <code>SELECT</code> statement.</p>
57
58        <p>Note that OpenOffice.org since version 2.0.4 also supports queries which are
59        based on other queries. For example, given that you have a database containing
60        a query named <code>All Orders</code>, the SQL statement <code>SELECT * FROM "All Orders"</code>
61        is perfectly valid when used with a <type>SingleSelectQueryAnalyzer</type>.</p>
62
63        <p>In this case, the name container returned by <member scope="com::sun::star::sdbcx">XTablesSupplier::getTables</member>
64        will in fact not return a <type>Table</type>, but a <type>Query</type> object. Semantically, however,
65        this object still acts as a table in the SQL statement.</p>
66
67        @see XSingleSelectQueryAnalyzer::getQueryWithSubstitution
68	 */
69	interface com::sun::star::sdbcx::XTablesSupplier;
70
71	/** access the selected columns.
72	 */
73	interface com::sun::star::sdbcx::XColumnsSupplier;
74
75	/** access to the parameters which are used in the where clause.
76	 */
77	[optional] interface com::sun::star::sdb::XParametersSupplier;
78};
79
80//=============================================================================
81
82}; }; }; };
83
84/*===========================================================================
85===========================================================================*/
86#endif
87