From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- offapi/com/sun/star/sdb/DataAccessDescriptor.idl | 253 +++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 offapi/com/sun/star/sdb/DataAccessDescriptor.idl (limited to 'offapi/com/sun/star/sdb/DataAccessDescriptor.idl') diff --git a/offapi/com/sun/star/sdb/DataAccessDescriptor.idl b/offapi/com/sun/star/sdb/DataAccessDescriptor.idl new file mode 100644 index 000000000..d3734b764 --- /dev/null +++ b/offapi/com/sun/star/sdb/DataAccessDescriptor.idl @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_sdb_DataAccessDescriptor_idl__ +#define __com_sun_star_sdb_DataAccessDescriptor_idl__ + +#include +#include +#include +#include + +module com { module sun { module star { module sdb { + +/** descriptor for accessing basic data access objects. + +

Various components interacting with the database access world require to specify (or provide themselves) an object + such as a query, a table, a result set, a connection to a data source, a column within a table, and so on.
+ All of these objects are usually not specified with a single property, but with a set of properties, and for + various objects, various (but not always different) properties are needed.
+ The DataAccessDescriptor describes the super set of the properties for the most common + data access objects.

+ +

Every component providing or requiring a DataAccessDescriptor for some functionality + is urged to specify which properties are mandatory, and which ones optional. Additionally, + it's free to specify any additional requirements about the relations of properties.

+ + @since OOo 1.1.2 +*/ +published service DataAccessDescriptor +{ + /** specifies the name of the datasource to access. + +

This data source is usually used to create a Connection. If no DataSourceName is given + and the #DatabaseLocation and the #ConnectionResource are empty, then an #ActiveConnection + is required.

+ + @see com::sun::star::sdb::DatabaseContext + @see ActiveConnection + */ + [optional, property] string DataSourceName; + + /** specifies the URL of the database file. + +

This database location is usually used to create a Connection. If no DatabaseLocation is given + and the #ConnectionResource is empty, then an #ActiveConnection is required.

+ + @see com::sun::star::sdb::DatabaseContext + @see ActiveConnection + */ + [optional, property] string DatabaseLocation; + + /** specifies the database URL which locates a database driver. + +

This database URL is usually used to create a Connection. If no ConnectionResource is given, + then an #ActiveConnection is required.

+ + @see com::sun::star::sdb::DatabaseContext + @see ActiveConnection + */ + [optional, property] string ConnectionResource; + + /** specifies additional info to use when creating a connection from a ConnectionResource + +

This member is evaluated only when ConnectionResource is used: In this case, + com::sun::star::sdbc::XDriverManager::getConnectionWithInfo() is used + to create a connection for the given connection resource, instead of + com::sun::star::sdbc::XDriverManager::getConnection().

+ +

If the sequence is empty, it is ignored.

+ */ + [optional, property] sequence< ::com::sun::star::beans::PropertyValue > ConnectionInfo; + + /** is a connection to use. + +

This object is guaranteed to be a com::sun::star::sdbc::Connection, but usually + it will be a Connection from the module com::sun::star::sdb.
+ Especially in the case where no #DataSourceName is given, but + #CommandType is CommandType::QUERY, the ActiveConnection needs + to fully support the Connection service, to actually retrieve the query specified by + #Command

+ +

If no ActiveConnection is given, then a #DataSourceName is required.

+ + @see DataSourceName + */ + [optional, property] com::sun::star::sdbc::XConnection ActiveConnection; + + /** specifies the command to execute to retrieve a result set. + +

This property is only meaningful together with the #CommandType + property, thus either both or none of them are present.

+ + @see CommandType + */ + [optional, property] string Command; + + + /** specifies the type of the command to be executed to retrieve a result set. + +

#Command needs to be interpreted depending on the value of this property.

+ +

This property is only meaningful together with the #Command + property, thus either both or none of them are present.

+ + @see com::sun::star::sdb::CommandType + */ + [optional, property] long CommandType; + + /** specifies an additional filter to optionally use. + +

The Filter string has to form a WHERE-clause, without the + WHERE-string itself.

+ +

If a #DataSourceName, #Command and #CommandType + are specified, a RowSet can be created with this information. If the results provided by the + row set are to be additionally filtered, the Filter property can be used.

+ +

Note that the Filter property does not make sense if a #ResultSet has been specified + in the DataAccessDescriptor.

+ + @see com::sun::star::sdb::RowSet + @see ResultSet + */ + [optional, property] string Filter; + + /** specifies an additional ORDER BY clause which should be applied on top of + the given #Command. + +

The keyword ORDER BY itself is not part of this property.

+ */ + [optional, property] string Order; + + /** specifies an additional HAVING clause which should be applied on top of + the given #Command. + +

The keyword HAVING itself is not part of this property.

+ */ + [optional, property] string HavingClause; + + /** specifies an additional GROUP BY clause which should be applied on top of + the given #Command. + +

The keyword GROUP BY itself is not part of this property.

+ */ + [optional, property] string GroupBy; + + /** specifies if the #Command should be analyzed on the client side before sending it + to the database server. + +

The default value of this property is `TRUE`. By switching it to `FALSE`, you can pass + backend-specific SQL statements, which are not standard SQL, to your database.

+ +

This property is usually present together with the #Command and + #CommandType properties, and is evaluated if and only if #CommandType + equals CommandType::COMMAND.

+ */ + [optional, property] boolean EscapeProcessing; + + /** specifies an already existent result set to use. + +

Usually, you use the properties #DataSourceName (alternatively + #ActiveConnection), #Command and #CommandType to specify + how to obtain a result set. However, in scenarios where the provider of a DataAccessDescriptor + has access to an already existent result set, it can pass it along for reusage. This is encouraged + to increase performance.

+ +

The object will at least support the com::sun::star::sdbc::ResultSet service.

+ +

Note that any superservices of com::sun::star::sdbc::ResultSet + are also allowed. Especially, this member can denote an instance of the + com::sun::star::sdb::RowSet, or an instance obtained + by calling com::sun::star::sdb::XResultSetAccess::createResultSet() + on such a com::sun::star::sdb::RowSet. This becomes important in + conjunction with the #Selection property.

+ + @see com::sun::star::sdb::XResultSetAccess + */ + [optional, property] com::sun::star::sdbc::XResultSet ResultSet; + + /** specifies a selection to confine the records in a result set. + +

When you specify a result set either implicitly (#DataSourceName, #Command, + #CommandType) or explicitly (#ResultSet), the set of results can be + additionally refined with this property.

+ +

The single elements of the #Selection are either record numbers (see + com::sun::star::sdbc::XResultSet::getRow()), or bookmarks (see + com::sun::star::sdbcx::XRowLocate::getBookmark()).
+ It is up to the component which provides or requires a DataAccessDescriptor to specify which of the + two alternatives it expects. If it does not specify this, then the property + #BookmarkSelection becomes mandatory.

+ +

If the elements specify bookmarks, and a #ResultSet has been specified, then + this result set is required to support the com::sun::star::sdbcx::XRowLocate interface.

+ */ + [optional, property] sequence< any > Selection; + + /** specifies how to interpret #Selection + +

If present, #BookmarkSelection specifies the semantics of #Selection. If + not present, it's up to the implementing component to specify this semantics.

+ +

If `TRUE`, then the single elements of the array specified by #Selection are + bookmarks relative to the result set, if `FALSE`, they're record numbers.

+ + @see com::sun::star::sdbcx::XRowLocate + @see com::sun::star::sdbc::XResultSet + @see com::sun::star::sdb::XResultSetAccess + */ + [optional, property] boolean BookmarkSelection; + + /** specifies a column name. + +

This property is usually used together with the #Command and + #CommandType properties.

+ + @see Column + */ + [optional, property] string ColumnName; + + /** specifies a column object + +

For reasons of performance and saving resources, a supplier of an DataAccessDescriptor which is + used to describe a column object can pass this object directly, instead of specifying it only implicitly + with the #ColumnName property.

+ +

The object will at least support the com::sun::star::sdbcx::Column service, but more + often it will even be a Column from the com::sun::star::sdb module.

+ */ + [optional, property] com::sun::star::beans::XPropertySet Column; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3