forked from amazingfate/loongoffice
Conflicts: offapi/com/sun/star/awt/XCallback.idl offapi/com/sun/star/awt/XContainerWindowEventHandler.idl offapi/com/sun/star/awt/XContainerWindowProvider.idl offapi/com/sun/star/awt/XDialogEventHandler.idl offapi/com/sun/star/awt/XDialogProvider.idl offapi/com/sun/star/awt/XRequestCallback.idl offapi/com/sun/star/awt/XUnitConversion.idl offapi/com/sun/star/awt/grid/GridColumnEvent.idl offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl offapi/com/sun/star/awt/tree/ExpandVetoException.idl offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl offapi/com/sun/star/awt/tree/XMutableTreeNode.idl offapi/com/sun/star/awt/tree/XTreeControl.idl offapi/com/sun/star/awt/tree/XTreeDataModel.idl offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl offapi/com/sun/star/awt/tree/XTreeEditListener.idl offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl offapi/com/sun/star/awt/tree/XTreeNode.idl offapi/com/sun/star/document/DocumentEvent.idl offapi/com/sun/star/document/XDocumentEventListener.idl offapi/com/sun/star/frame/XLayoutManagerListener.idl offapi/com/sun/star/geometry/XMapping2D.idl offapi/com/sun/star/inspection/XObjectInspectorUI.idl offapi/com/sun/star/inspection/XPropertyControl.idl offapi/com/sun/star/inspection/XPropertyControlFactory.idl offapi/com/sun/star/inspection/XPropertyControlObserver.idl offapi/com/sun/star/inspection/XPropertyHandler.idl offapi/com/sun/star/inspection/XStringRepresentation.idl offapi/com/sun/star/logging/LogRecord.idl offapi/com/sun/star/logging/XLogFormatter.idl offapi/com/sun/star/logging/XLogHandler.idl offapi/com/sun/star/logging/XLogger.idl offapi/com/sun/star/presentation/XSlideShowListener.idl offapi/com/sun/star/presentation/XSlideShowView.idl offapi/com/sun/star/rendering/FontInfo.idl offapi/com/sun/star/rendering/StrokeAttributes.idl offapi/com/sun/star/rendering/VolatileContentDestroyedException.idl offapi/com/sun/star/rendering/XAnimatedSprite.idl offapi/com/sun/star/rendering/XAnimation.idl offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl offapi/com/sun/star/rendering/XBitmapCanvas.idl offapi/com/sun/star/rendering/XBufferController.idl offapi/com/sun/star/rendering/XCachedPrimitive.idl offapi/com/sun/star/rendering/XCanvas.idl offapi/com/sun/star/rendering/XCanvasFont.idl offapi/com/sun/star/rendering/XColorSpace.idl offapi/com/sun/star/rendering/XCustomSprite.idl offapi/com/sun/star/rendering/XGraphicDevice.idl offapi/com/sun/star/rendering/XLinePolyPolygon2D.idl offapi/com/sun/star/rendering/XParametricPolyPolygon2D.idl offapi/com/sun/star/rendering/XPolyPolygon2D.idl offapi/com/sun/star/rendering/XSprite.idl offapi/com/sun/star/rendering/XSpriteCanvas.idl offapi/com/sun/star/rendering/XTextLayout.idl offapi/com/sun/star/report/XFixedLine.idl offapi/com/sun/star/report/XFixedText.idl offapi/com/sun/star/report/XFormatCondition.idl offapi/com/sun/star/report/XFormattedField.idl offapi/com/sun/star/report/XFunction.idl offapi/com/sun/star/report/XFunctions.idl offapi/com/sun/star/report/XFunctionsSupplier.idl offapi/com/sun/star/report/XGroup.idl offapi/com/sun/star/report/XGroups.idl offapi/com/sun/star/report/XImageControl.idl offapi/com/sun/star/report/XReportComponent.idl offapi/com/sun/star/report/XReportControlModel.idl offapi/com/sun/star/report/XReportDefinition.idl offapi/com/sun/star/report/XSection.idl offapi/com/sun/star/report/XShape.idl offapi/com/sun/star/report/inspection/DefaultComponentInspectorModel.idl offapi/com/sun/star/resource/XStringResourceResolver.idl offapi/com/sun/star/resource/XStringResourceWithLocation.idl offapi/com/sun/star/sdb/XDocumentDataSource.idl offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl offapi/com/sun/star/sdb/tools/XConnectionTools.idl offapi/com/sun/star/security/SecurityInfrastructureException.idl offapi/com/sun/star/ui/XUIConfigurationManager.idl offapi/com/sun/star/ui/XUIElement.idl offapi/com/sun/star/ui/XUIElementSettings.idl offapi/com/sun/star/util/XModifiable2.idl offapi/com/sun/star/view/XMultiSelectionSupplier.idl offapi/com/sun/star/xml/crypto/SEInitializer.idl offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl
255 lines
11 KiB
Plaintext
255 lines
11 KiB
Plaintext
/*************************************************************************
|
|
*
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* This file is part of OpenOffice.org.
|
|
*
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
* only, as published by the Free Software Foundation.
|
|
*
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License version 3 for more details
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
* <http://www.openoffice.org/license.html>
|
|
* for a copy of the LGPLv3 License.
|
|
*
|
|
************************************************************************/
|
|
#ifndef __com_sun_star_sdb_XSingleSelectQueryAnalyzer_idl__
|
|
#define __com_sun_star_sdb_XSingleSelectQueryAnalyzer_idl__
|
|
|
|
#include <com/sun/star/beans/XPropertySet.idl>
|
|
#include <com/sun/star/beans/PropertyValue.idl>
|
|
#include <com/sun/star/sdbc/SQLException.idl>
|
|
|
|
module com { module sun { module star { module container {
|
|
published interface XIndexAccess;
|
|
};};};};
|
|
//=============================================================================
|
|
|
|
module com { module sun { module star { module sdb {
|
|
|
|
//=============================================================================
|
|
|
|
/** simplifies the analyzing of single select statements.
|
|
|
|
<p>
|
|
The interface can be used for analyzing single SELECT statements without knowing the
|
|
structure of the used query.
|
|
</p>
|
|
*/
|
|
published interface XSingleSelectQueryAnalyzer : com::sun::star::uno::XInterface
|
|
{
|
|
|
|
/** returns the query.
|
|
@returns
|
|
the query
|
|
*/
|
|
string getQuery();
|
|
//-------------------------------------------------------------------------
|
|
|
|
/** sets a new query for the composer, which may be expanded by filters, group by, having
|
|
and sort criteria.
|
|
@param command
|
|
the single select statement to set
|
|
@throws com::sun::star::sdbc::SQLException
|
|
if a database access error occurs
|
|
or the statement isn't a single select statement
|
|
or the statement isn't valid
|
|
or the statement can not be parsed.
|
|
*/
|
|
void setQuery([in] string command )
|
|
raises (com::sun::star::sdbc::SQLException);
|
|
//-------------------------------------------------------------------------
|
|
// FILTER
|
|
//-------------------------------------------------------------------------
|
|
|
|
/** returns the used filter.
|
|
<p>
|
|
The filter criteria returned is part of the where condition of the
|
|
select command, but it does not contain the where token.
|
|
</p>
|
|
@returns
|
|
the filter
|
|
*/
|
|
string getFilter();
|
|
//-------------------------------------------------------------------------
|
|
|
|
/** returns the currently used filter.
|
|
<p>
|
|
The filter criteria is split into levels. Each level represents the
|
|
OR criteria. Within each level, the filters are provided as an AND criteria
|
|
with the name of the column and the filter condition. The filter condition
|
|
is of type string. The operator used, is defined by <type scope="com::sun::star::sdb">SQLFilterOperator</type>.
|
|
</p>
|
|
@returns
|
|
the structured filter
|
|
*/
|
|
sequence< sequence<com::sun::star::beans::PropertyValue> >
|
|
getStructuredFilter();
|
|
|
|
//-------------------------------------------------------------------------
|
|
// GROUP BY
|
|
//-------------------------------------------------------------------------
|
|
|
|
/** returns the currently used GROUP BY.
|
|
<p>
|
|
The group criteria returned is part of the GROUP BY clause of the
|
|
select command, but it does not contain the GROUP BY keyword .
|
|
</p>
|
|
@returns
|
|
the group
|
|
*/
|
|
string getGroup();
|
|
|
|
//-------------------------------------------------------------------------
|
|
/** returns the currently used group.
|
|
<p>
|
|
The columns returned form the GROUP BY clause.
|
|
</p>
|
|
@returns
|
|
a collection of <type scope="com::sun::star::sdb">GroupColumn</type> which form the GROUP BY.
|
|
*/
|
|
com::sun::star::container::XIndexAccess getGroupColumns();
|
|
|
|
//-------------------------------------------------------------------------
|
|
// HAVING
|
|
//-------------------------------------------------------------------------
|
|
|
|
/** returns the used HAVING filter.
|
|
<p>
|
|
The HAVING filter criteria returned is part of the HAVING condition of the
|
|
select command, but it does not contain the HAVING token.
|
|
</p>
|
|
@returns
|
|
the filter
|
|
*/
|
|
string getHavingClause();
|
|
//-------------------------------------------------------------------------
|
|
|
|
/** returns the currently used HAVING filter.
|
|
<p>
|
|
The HAVING filter criteria is split into levels. Each level represents the
|
|
OR criteria. Within each level, the filters are provided as an AND criteria
|
|
with the name of the column and the filter condition. The filter condition
|
|
is of type string. The operator used, is defined by <type scope="com::sun::star::sdb">SQLFilterOperator</type>.
|
|
</p>
|
|
@returns
|
|
the structured HAVING filter
|
|
*/
|
|
sequence< sequence<com::sun::star::beans::PropertyValue> >
|
|
getStructuredHavingClause();
|
|
|
|
//-------------------------------------------------------------------------
|
|
// ORDER BY
|
|
//-------------------------------------------------------------------------
|
|
/** returns the currently used sort order.
|
|
<p>
|
|
The order criteria returned is part of the ORDER BY clause of the
|
|
select command, but it does not contain the ORDER BY keyword .
|
|
</p>
|
|
@returns
|
|
the order
|
|
*/
|
|
string getOrder();
|
|
|
|
//-------------------------------------------------------------------------
|
|
/** returns the currently used sort order.
|
|
<p>
|
|
The order criteria returned is part of the ORDER BY clause of the
|
|
select command, but it does not contain the ORDER BY keyword .
|
|
</p>
|
|
@returns
|
|
a collection of <type scope="com::sun::star::sdb">OrderColumn</type> which form the ORDER BY.
|
|
*/
|
|
com::sun::star::container::XIndexAccess getOrderColumns();
|
|
|
|
//-------------------------------------------------------------------------
|
|
/** returns the query previously set at the analyzer, with all application-level
|
|
features being substituted by their database-level counterparts.
|
|
|
|
<p>The <type>XSingleSelectQueryAnalyzer</type> is an application-level component,
|
|
which in some respect understands SQL features usually not present at the database
|
|
level. As a prominent example, you might pass a <code>SELECT</code> statement to the analyzer
|
|
which is based on another query.</p>
|
|
|
|
<p>While all other methods will handle those additional features transparently - e.g.
|
|
the query in the <code>FROM</code> part of a <code>SELECT</code> statement will be handled
|
|
as if it really is a table -, <code>getQueryWithSubstitution</code> gives you the SQL statement
|
|
where all those features have been stripped, and replaced with appropriate standard SQL.</p>
|
|
|
|
<p>For example, consider a database document which contains a client-side query named <code>All Orders</code>.
|
|
This query is not known to the underlying database, so an SQL statement like
|
|
<code>SELECT * from "All Orders"</code> would be rejected by the database. However, instantiating
|
|
a <type>SingleSelectQueryAnalyzer</type> at the <type>Connection</type> object, and passing it the above query,
|
|
you can then use <code>getQueryWithSubstitution</code> to retrieve a statement where <code>"All Orders"</code>
|
|
has been replaced with the <code>SELECT</code> statement which actually constitutes the <code>"All Orders"</code>
|
|
query.</p>
|
|
|
|
@throws com::sun::star::sdbc::SQLException
|
|
if the query represented cannot be completely substituted. A usual case for this is a recursion in
|
|
the sub queries: Consider a query named <code>foo</code>, which is defined as <code>SELECT * FROM "bar"</code>.
|
|
Now assume that <code>bar</code> is a query defined as <code>SELECT * FROM "foo"</code>. Passing either
|
|
of those statements to an analyzer, and calling <member>getQueryWithSubstitution</member>, would result
|
|
in an exception being thrown, since it's impossible to substitute the sub queries with their
|
|
constituting statements.
|
|
|
|
@see Connection
|
|
@see XQueriesSupplier
|
|
@see DatabaseDocument
|
|
|
|
@since OOo 2.0.4
|
|
*/
|
|
string getQueryWithSubstitution()
|
|
raises (com::sun::star::sdbc::SQLException);
|
|
|
|
/** sets a new query for the composer, which may be expanded by filters, group by, having
|
|
and sort criteria.
|
|
@param Command
|
|
is the command which should be executed, the type of command depends
|
|
on the CommandType.
|
|
|
|
<p>In case of a <member>CommandType</member> of <member>CommandType::COMMAND</member>,
|
|
means in case the <member>Command</member> specifies an SQL statement, the inherited
|
|
<member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
|
|
becomes relevant:<br/>
|
|
It then can be to used to specify whether the SQL statement should be analyzed on the
|
|
client side before sending it to the database server.<br/>
|
|
The default value for <member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
|
|
is <TRUE/>. By switching it to <FALSE/>, you can pass backend-specific SQL statements,
|
|
which are not standard SQL, to your database.</p>
|
|
|
|
@see com::sun::star::sdb::CommandType
|
|
@see com::sun::star::sdbc::RowSet::EscapeProcessing
|
|
@param CommandType
|
|
is the type of the command.
|
|
@see com::sun::star::sdb::CommandType
|
|
@throws com::sun::star::sdbc::SQLException
|
|
if a database access error occurs
|
|
or the statement isn't a single select statement
|
|
or the statement isn't valid
|
|
or the statement can not be parsed.
|
|
*/
|
|
void setCommand([in] string Command ,[in] long CommandType)
|
|
raises (com::sun::star::sdbc::SQLException);
|
|
};
|
|
|
|
//=============================================================================
|
|
|
|
}; }; }; };
|
|
|
|
/*=============================================================================
|
|
|
|
=============================================================================*/
|
|
#endif
|
|
|