From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001
From: Daniel Baumann In addition to the information provided by
+ com::sun::star::sdbc::SQLException
+ , a
+
+ SDBC provides a stored procedure SQL escape that allows stored procedures
+ to be called in a standard way for all RDBMSs. This escape syntax has one
+ form that includes a result parameter and one that does not. If used, the
+ result parameter must be registered as an OUT parameter. The other parameters
+ can be used for input, output, or both. Parameters are referred to sequentially,
+ by number. The first parameter is 1.
+
+
+ IN parameter values are set using the set methods inherited from
+ com::sun::star::sdbc::PreparedStatement
+ . The type of all
+ OUT parameters must be registered prior to executing the stored procedure;
+ their values are retrieved after execution via the
+
+ A
+
+ For maximum portability, a call's
+ com::sun::star::sdbc::ResultSet
+ objects and
+ update counts should be processed prior to getting the values of output
+ parameters.
+
+ Indicates that
+
+ Indicates that the only
+
+ Indicates that one can base all
+
+ Indicates that all
+
+ A Connection's database is able to provide information
+ describing its tables, its supported SQL grammar, its stored
+ procedures, and the capabilities of this connection. This
+ information is obtained with the
+ com::sun::star::sdbc::XConnection::getMetaData()
+ method.
+
+
+ Note:
+
+ By default the Connection automatically commits
+ changes after executing each statement. If auto commit has been
+ disabled, an explicit commit must be done or database changes will
+ not be saved.
+
+
+ When the method
+ com::sun::star::sdbc::XPooledConnection::getConnection()
+ is called,
+ the ConnectionPool will attempt to locate a suitable pooled connection
+ or create a new connection from the DriverManager. When the connection
+ will be released it will move to the pool of unused connections.
+
+
+ The properties for a connection contain additional information about how to connect to a database and
+ how to control the behavior of the resulting connection should be.
+
+
+ The properties for a connection contain additional information about how to connect to a database and
+ how to control the behavior of the resulting connection should be.
+
+
+ The SQL state for a
+
+ The actual type constant values are equivalent to those in the X/Open CLI.
+
+ Precise information about the specific types can be got from
+ XDatabaseMetaData::getTypeInfo().
+ Indicates deferrability. See SQL-92 for a definition.
+
+
+*/
+ const long INITIALLY_DEFERRED = 5;
+
+ /** A possible value for the column Indicates deferrability. See SQL-92 for a definition.
+ */
+ const long INITIALLY_IMMEDIATE = 6;
+
+ /** A possible value for the column Indicates deferrability. See SQL-92 for a definition.
+ */
+ const long NONE = 7;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/Driver.idl b/offapi/com/sun/star/sdbc/Driver.idl
new file mode 100644
index 000000000..4197838b7
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/Driver.idl
@@ -0,0 +1,68 @@
+/* -*- 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_sdbc_Driver_idl__
+#define __com_sun_star_sdbc_Driver_idl__
+
+ module com { module sun { module star { module sdbc {
+
+ published interface XDriver;
+
+
+/** is the service that every driver class must implement.
+
+
+ Each driver should supply a service that implements
+ the Driver interface.
+
+
+ The DriverManager will try to load as many drivers as it can
+ find and then for any given connection request, it will ask each
+ driver in turn to try to connect to the target URL.
+
+
+ It is strongly recommended that each Driver object should be
+ small and standalone so that the Driver object can be loaded and
+ queried without bringing in vast quantities of supporting code.
+
+
+ Each driver should be a one instance service.
+
+
+ The DriverPropertyInfo is of interest only to advanced programmers
+ who need to interact with a driver to discover and supply properties
+ for connections.
+
+ The properties for a connection contain additional information about how to connect to a database and
+ how to control the behavior of the resulting connection should be.
+
+ See the IANA character set list
+ for a list of valid values. For internal purposes (e.g., when using an encoding for which no IANA character set name
+ exists), this may also be an UNSIGNED SHORT value representing one of the rtl_TextEncoding
+ values in rtl/textenc.h.
+ The properties for a connection contain additional information about how to connect to a database and
+ how to control the behavior of the resulting connection should be.
+
+
+ Identifies table statistics that are returned in conjunction
+ with a table's index description.
+
+ Indicates that this table index is a clustered index.
+
+ Indicates that this table index is a hashed index.
+
+ Indicates that this table index is not a clustered
+ index, a hashed index, or table statistics;
+ it is something other than these.
+
+ The properties for a connection contain additional information about how to connect to a database and
+ how to control the behavior of the resulting connection should be.
+
+ The class path is a list of zero or more internal (see the
+ com::sun::star::uri::ExternalUriReferenceTranslator
+ service) URI references, where any space characters
+ ( The sequence contains an even amount of string values. Each pair describes
+ what should be searched for and what should be replaced if found.
+
+ BatchUpdateException
+ provides the update counts for all commands
+ that were executed successfully during the batch update, that is, all commands
+ that were executed before the error occurred. The order of elements in an
+ array of update counts corresponds to the order in which commands were added
+ to the batch.long
+ , with each element
+ indicating the update count for a SQL command that executed
+ successfully before the exception was thrown.
+ */
+ sequenceSCOPE
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ XDatabaseMetaData::getBestRowIdentifier().
+ */
+ const long TEMPORARY = 0;
+
+ /** indicates that the scope of the best row identifier is
+ the remainder of the current transaction.
+ A possible value for the column
+ SCOPE
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ XDatabaseMetaData::getBestRowIdentifier().
+ */
+ const long TRANSACTION = 1;
+
+ /** indicates that the scope of the best row identifier is
+ the remainder of the current session.
+ A possible value for the column
+ SCOPE
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ XDatabaseMetaData::getBestRowIdentifier().
+ */
+ const long SESSION = 2;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/BestRowType.idl b/offapi/com/sun/star/sdbc/BestRowType.idl
new file mode 100644
index 000000000..df95e3fb4
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/BestRowType.idl
@@ -0,0 +1,65 @@
+/* -*- 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_sdbc_BestRowType_idl__
+#define __com_sun_star_sdbc_BestRowType_idl__
+
+ module com { module sun { module star { module sdbc {
+
+
+/** determines the type of the best row identifier.
+ */
+published constants BestRowType
+{
+
+ /** indicates that the best row identifier may or may not be a pseudo-column.
+ A possible value for the column
+ PSEUDO_COLUMN
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ XDatabaseMetaData::getBestRowIdentifier().
+ */
+ const long UNKNOWN = 0;
+
+ /** indicates that the best row identifier is NOT a pseudo-column.
+ A possible value for the column
+ PSEUDO_COLUMN
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ XDatabaseMetaData::getBestRowIdentifier().
+ */
+ const long NOT_PSEUDO = 1;
+
+ /** indicates that the best row identifier is a pseudo-column.
+ A possible value for the column
+ PSEUDO_COLUMN
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ XDatabaseMetaData::getBestRowIdentifier().
+ */
+ const long PSEUDO = 2;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/CallableStatement.idl b/offapi/com/sun/star/sdbc/CallableStatement.idl
new file mode 100644
index 000000000..b61cd0c48
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/CallableStatement.idl
@@ -0,0 +1,95 @@
+/* -*- 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_sdbc_CallableStatement_idl__
+#define __com_sun_star_sdbc_CallableStatement_idl__
+
+#include {?=call<procedure-name>[<arg1>,<arg2>,...]}
+
{call<procedure-name>[<arg1>,<arg2>,...]}
+ get
methods provided by the com::sun::star::sdbc::XRow.
+ CallableStatement
+ can return one
+ com::sun::star::sdbc::XResultSet
+ or multiple
+ com::sun::star::sdbc::ResultSet
+ objects. Multiple
+ ResultSet
+ objects are handled using operations inherited from
+ com::sun::star::sdbc::XPreparedStatement.
+ SEARCHABLE
in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getTypeInfo().
+ WHERE
+ search clauses are not supported
+ for this type.
+ */
+ const long NONE = 0;
+
+ /** A possible value for column SEARCHABLE
in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getTypeInfo().
+ WHERE
+ search clause that can
+ be based on this type is
+ WHERE...LIKE
.
+ */
+ const long CHAR = 1;
+
+ /** A possible value for column SEARCHABLE
in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc">XDatabaseMetaData::getTypeInfo().
+ WHERE
+ search clauses
+ except
+ WHERE...LIKE
+ on this data type.
+ */
+ const long BASIC = 2;
+
+ /** A possible value for column
+ SEARCHABLE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc">XDatabaseMetaData::getTypeInfo().
+ WHERE
+ search clauses can be
+ based on this type.
+ */
+ const long FULL = 3;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/ColumnType.idl b/offapi/com/sun/star/sdbc/ColumnType.idl
new file mode 100644
index 000000000..026d24a72
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/ColumnType.idl
@@ -0,0 +1,65 @@
+/* -*- 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_sdbc_ColumnType_idl__
+#define __com_sun_star_sdbc_ColumnType_idl__
+
+ module com { module sun { module star { module sdbc {
+
+
+/** determines the type of a version column.
+ */
+published constants ColumnType
+{
+
+ /** indicates that this column may or may not be a pseudo-column.
+ A possible value for the column
+ PSEUDO_COLUMN
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getVersionColumns().
+ */
+ const long UNKNOWN = 0;
+
+ /** indicates that this column is NOT a pseudo-column.
+ A possible value for the column
+ PSEUDO_COLUMN
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getVersionColumns().
+ */
+ const long NOT_PSEUDO = 1;
+
+ /** indicates that this column is a pseudo-column.
+ A possible value for the column
+ PSEUDO_COLUMN
+ in the
+ com::sun::star::sdbc::XResultSet object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getVersionColumns().
+ */
+ const long PSEUDO = 2;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/ColumnValue.idl b/offapi/com/sun/star/sdbc/ColumnValue.idl
new file mode 100644
index 000000000..92d280a10
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/ColumnValue.idl
@@ -0,0 +1,50 @@
+/* -*- 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_sdbc_ColumnValue_idl__
+#define __com_sun_star_sdbc_ColumnValue_idl__
+
+ module com { module sun { module star { module sdbc {
+
+
+/** determines whether a column allows SQL NULL values or not.
+ */
+published constants ColumnValue
+{
+
+ /** indicates that a column does not allow NULL values.
+ */
+ const long NO_NULLS = 0;
+
+ /** indicates that a column does allow NULL values.
+ */
+ const long NULLABLE = 1;
+
+ /** indicates that the nullability of the column is unknown.
+ */
+ const long NULLABLE_UNKNOWN = 2;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/Connection.idl b/offapi/com/sun/star/sdbc/Connection.idl
new file mode 100644
index 000000000..2c98d81e0
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/Connection.idl
@@ -0,0 +1,83 @@
+/* -*- 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_sdbc_Connection_idl__
+#define __com_sun_star_sdbc_Connection_idl__
+
+#include DataTruncation
+ is 01004
.
+ -1
+ if the size is unknown.
+ */
+ long DataSize;
+
+
+ /** contains the number of bytes of data actually transferred.
+ The value may be
+ -1
+ if the size is unknown.
+ */
+ long TransferSize;
+};
+
+
+}; }; }; };
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/DataType.idl b/offapi/com/sun/star/sdbc/DataType.idl
new file mode 100644
index 000000000..622f5986e
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/DataType.idl
@@ -0,0 +1,136 @@
+/* -*- 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_sdbc_DataType_idl__
+#define __com_sun_star_sdbc_DataType_idl__
+
+ module com { module sun { module star { module sdbc {
+
+
+/** These constants are used to specify database data types which are used
+ to identify the generic SQL types. The definition is based on JDBC 3.0.
+
+ BOOLEAN
.
+ *
+ * @since OOo 2.0
+ */
+ const long BOOLEAN = 16;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/Deferrability.idl b/offapi/com/sun/star/sdbc/Deferrability.idl
new file mode 100644
index 000000000..3f42ca8bb
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/Deferrability.idl
@@ -0,0 +1,68 @@
+/* -*- 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_sdbc_Deferrability_idl__
+#define __com_sun_star_sdbc_Deferrability_idl__
+
+ module com { module sun { module star { module sdbc {
+
+
+/** indicates the Deferrability of key constraints.
+ */
+published constants Deferrability
+{
+
+ /** A possible value for the column DEFERRABILITY
+ in the
+ XResultSet
objects returned by the methods
+ getImportedKeys
, getExportedKeys
,
+ and getCrossReference
.
+ DEFERRABILITY
+ in the
+ XResultSet
objects returned by the methods
+ getImportedKeys
, getExportedKeys
,
+ and getCrossReference
.
+ DEFERRABILITY
+ in the
+ XResultSet
objects returned by the methods
+ getImportedKeys
, getExportedKeys
,
+ and getCrossReference
.
+ Driver.connect
+ and
+ `FALSE`
+ otherwise.
+ */
+ boolean IsRequired;
+
+
+ /** specifies the current value of the property,
+ based on the driver-supplied default values. This field
+ may be empty if no value is known.
+ */
+ string Value;
+
+
+ /** contains a sequence of possible values if the value for the field
+ DriverPropertyInfo.value
+ may be selected
+ from a particular set of values; otherwise empty.
+ */
+ sequenceTYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getIndexInfo().
+ TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getIndexInfo().
+ TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getIndexInfo().
+ TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getIndexInfo().
+ U+0020
) are ignored (and, in particular, separate adjacent
+ URI references). Any “vnd.sun.star.expand” URL references
+ in the list are expanded using the
+ com::sun::star::util::theMacroExpander
+ singleton.java.lang.System.setProperty
before
+ loading the system's JDBC driver.
+ */
+ [optional, property] sequence< ::com::sun::star::beans::NamedValue > SystemProperties;
+
+ /** specifies if retrieving of auto generated values should be enabled or not.
+ If `TRUE` than the statement will support the XGeneratedResultSet (future concept) interface, otherwise not.
+ */
+ [optional, property] boolean IsAutoRetrievingEnabled;
+
+ /** specifies the statement which should be executed
+ when asking an "INSERT" statement for the XGeneratedResultSet (future concept) interface.
+ */
+ [optional, property] string AutoRetrievingStatement;
+
+ /** specifies how the type info returned by com::sun::star::sdbc::XDatabaseMetaData::getTypeInfo() will be modified.
+
+ The syntax is:
+
+
+
UPDATE_RULE
+ and
+ DELETE_RULE
+ in the
+ com::sun::star::sdbc::XResultSet
+ objects returned by the methods
+ com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
+ com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
+ and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
+
+ For the column
+ UPDATE_RULE
+ ,
+ it indicates that
+ when the primary key is updated, the foreign key (imported key)
+ is changed to agree with it.
+
+ For the column
+ DELETE_RULE
+ ,
+ it indicates that
+ when the primary key is deleted, rows that imported that key
+ are deleted.
+
UPDATE_RULE
+ and
+ DELETE_RULE
+ in the
+ com::sun::star::sdbc::XResultSet
+ objects returned by the methods
+ com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
+ com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
+ and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
+
+ For the column
+ UPDATE_RULE
+ , it indicates that
+ a primary key may not be updated if it has been imported by
+ another table as a foreign key.
+
+ For the column
+ DELETE_RULE
+ , it indicates that
+ a primary key may not be deleted if it has been imported by
+ another table as a foreign key.
+
UPDATE_RULE
+ and
+ DELETE_RULE
+ in the
+ com::sun::star::sdbc::XResultSet
+ objects returned by the methods
+ com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
+ com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
+ and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
+
+ For the columns
+ UPDATE_RULE
+ and
+ DELETE_RULE
+ ,
+ it indicates that
+ when the primary key is updated or deleted, the foreign key (imported key)
+ is changed to NULL
.
+
UPDATE_RULE
+ and
+ DELETE_RULE
+ in the
+ com::sun::star::sdbc::XResultSet
+ objects returned by the methods
+ com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
+ com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
+ and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
+
+ For the columns
+ UPDATE_RULE
+ and
+ DELETE_RULE
+ ,
+ it indicates that if the primary key has been imported, it cannot be updated or deleted.
+
UPDATE_RULE
+ and
+ DELETE_RULE
+ in the
+ com::sun::star::sdbc::XResultSet
+ objects returned by the methods
+ com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
+ com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
+ and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
+
+ For the columns
+ UPDATE_RULE
+ and
+ DELETE_RULE
+ ,
+ it indicates that
+ if the primary key is updated or deleted, the foreign key (imported key)
+ is set to the default value.
+
+ The properties for a connection contain additional information about how to connect to a database and + how to control the behavior of the resulting connection should be. + +
+ @see com::sun::star::sdbc::XDriver + @see com::sun::star::sdbc::XDriverManager + @see com::sun::star::sdbc::ConnectionProperties + */ +service ODBCConnectionProperties +{ + service com::sun::star::sdbc::ConnectionProperties; + /** should the parameter "?" in prepared statement be substituted with an distinct name + */ + [optional, property] boolean ParameterNameSubstitution; + + /** the Timeout after which time a timeout should happen + */ + [optional, property] long Timeout; + + /** Silent - should the connection be silent. No user interaction while creating the connection. + */ + [optional, property] boolean Silent; + + /** should the driver should support a catalog. + */ + [optional, property] boolean UseCatalog; + + /** specifies the encoding to use to translate the backend data + +See the IANA character set list + for a list of valid values.
+ */ + [optional, property] string CharSet; + + /** specifies if retrieving of auto generated values should be enabled or not. + If `TRUE` than the statement will support the XGeneratedResultSet (future concept) interface, otherwise not. + */ + [optional, property] boolean IsAutoRetrievingEnabled; + + /** specifies the statement which should be executed + when asking an "INSERT" statement for the XGeneratedResultSet (future concept) interface. + */ + [optional, property] string AutoRetrievingStatement; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdbc/PreparedStatement.idl b/offapi/com/sun/star/sdbc/PreparedStatement.idl new file mode 100644 index 000000000..007f5def8 --- /dev/null +++ b/offapi/com/sun/star/sdbc/PreparedStatement.idl @@ -0,0 +1,258 @@ +/* -*- 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_sdbc_PreparedStatement_idl__ +#define __com_sun_star_sdbc_PreparedStatement_idl__ + +#include+ A SQL statement is pre-compiled and stored in a PreparedStatement object. + This object can then be used to efficiently execute this statement multiple + times. +
+
+
+ Note:
+
+ The
+ setXXX
+ methods for setting IN parameter values
+ must specify types that are compatible with the defined SQL type of
+ the input parameter. For instance, if the IN parameter has SQL type
+ Integer, then the method
+ com::sun::star::sdbc::XParameters::setInt()
+ should be used.
+
+ If arbitrary parameter type conversions are required, the method + com::sun::star::sdbc::XParameters::setObject() + should be used with a target SQL type. +
+
+ Example of setting a parameter; con
is an active connection.
+ @code{.bas}
+ pstmt = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?")
+ pstmt.setDouble(1, 153833.00)
+ pstmt.setLong(2, 110592)
+ @endcode
+
+ Only one
+ com::sun::star::sdbc::ResultSet
+ per
+ com::sun::star::sdbc::Statement
+ can be open at any point in
+ time. Therefore, if the reading of one ResultSet is interleaved
+ with the reading of another, each must have been generated by
+ different Statements. All statement
+ execute
+ methods implicitly close a statement's current ResultSet if an open one exists.
+
+ A driver implementing batch execution must return + `TRUE` + for + com::sun::star::sdbc::XDatabaseMetaData::supportsBatchUpdates() +
+ */ + [optional] interface XPreparedBatchExecution; + + + /** controls the chaining of warnings, which may occur on every call + to the connected database. Chained warnings from previous calls will be + cleared before processing a new call. + */ + interface XWarningsSupplier; + + + /** covers the handling of multiple results after executing an SQL command. + */ + interface XMultipleResults; + + + /** retrieves the number of seconds the driver will wait for a Statement + to execute. If the limit is exceeded, a SQLException is thrown. + There is no limitation, if set to zero. + */ + [property] long QueryTimeOut; + + + /** returns the maximum number of bytes allowed for any column value. ++ This limit is the maximum number of bytes that can be returned + for any column value. The limit applies only to + com::sun::star::sdbc::DataType::BINARY + , + com::sun::star::sdbc::DataType::VARBINARY + , + com::sun::star::sdbc::DataType::LONGVARBINARY + , + com::sun::star::sdbc::DataType::CHAR + , + com::sun::star::sdbc::DataType::VARCHAR + , + and + com::sun::star::sdbc::DataType::LONGVARCHAR + columns. + If the limit is exceeded, the excess data is silently discarded. +
++ There is no limitation, if set to zero. +
+ */ + [property] long MaxFieldSize; + + + /** retrieves the maximum number of rows that a ResultSet can contain. + If the limit is exceeded, the excess rows are silently dropped. +execute
+ methods.
+ + This name can then be used in SQL positioned update/delete statements to + identify the current row in the ResultSet generated by this statement. If + the database does not support positioned update/delete, this property is + a noop. To ensure that a cursor has the proper isolation level to support + updates, the cursor's SELECT statement should be of the form + "select for update ...". If the "for update" phrase is omitted, + positioned updates may fail. +
++ + Note: + + By definition, positioned update/delete + execution must be done by a different Statement than the one + which generated the ResultSet being used for positioning. Also, + cursor names must be unique within a connection. +
+ */ + [property] string CursorName; + + + /** retrieves the result set concurrency. + @see com::sun::star::sdbc::ResultSetConcurrency + */ + [property] long ResultSetConcurrency; + + + /** Determine the result set type. + @see com::sun::star::sdbc::ResultSetType + */ + [property] long ResultSetType; + + + /** retrieves the direction for fetching rows from database tables + that is the default for result sets generated from this +Statement
+ object.
+
+ If this
+ Statement
+ object has not set a fetch direction,
+ the return value is implementation-specific.
+
Statement
+ object.
+
+ If this
+ Statement
+ object has not set a fetch size,
+ the return value is implementation-specific.
+
COLUMN_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedureColumns().
+ */
+ const long UNKNOWN = 0;
+
+ /** indicates that the column stores IN parameters.
+ A possible value for the column
+ COLUMN_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedureColumns().
+ */
+ const long IN = 1;
+
+ /** indicates that the column stores INOUT parameters.
+ A possible value for the column
+ COLUMN_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedureColumns().
+ */
+ const long INOUT = 2;
+
+ /** indicates that the column stores results.
+ A possible value for the column
+ COLUMN_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedureColumns().
+ */
+ const long RESULT = 3;
+
+ /** indicates that the column stores OUT parameters.
+ A possible value for the column
+ COLUMN_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedureColumns().
+ */
+ const long OUT = 4;
+
+ /** Indicates that the column stores return values.
+ A possible value for the column
+ COLUMN_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedureColumns().
+ */
+ const long RETURN = 5;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/ProcedureResult.idl b/offapi/com/sun/star/sdbc/ProcedureResult.idl
new file mode 100644
index 000000000..bdd0ed2ee
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/ProcedureResult.idl
@@ -0,0 +1,77 @@
+/* -*- 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_sdbc_ProcedureResult_idl__
+#define __com_sun_star_sdbc_ProcedureResult_idl__
+
+ module com { module sun { module star { module sdbc {
+
+
+/** determines whether a procedure returns a result or not.
+ */
+published constants ProcedureResult
+{
+
+ /** A possible value for column
+ PROCEDURE_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedures().
+ + Indicates that it is not known whether the procedure returns + a result. +
+ */ + const long UNKNOWN = 0; + + /** A possible value for column +PROCEDURE_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedures().
+ + Indicates that the procedure does not return + a result. +
+ */ + const long NONE = 1; + + /** A possible value for column +PROCEDURE_TYPE
+ in the
+ com::sun::star::sdbc::XResultSet
+ object returned by the method
+ com::sun::star::sdbc::XDatabaseMetaData::getProcedures().
+ + Indicates that the procedure returns + a result. +
+ */ + const long RETURN = 2; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdbc/ResultSet.idl b/offapi/com/sun/star/sdbc/ResultSet.idl new file mode 100644 index 000000000..69f1cd617 --- /dev/null +++ b/offapi/com/sun/star/sdbc/ResultSet.idl @@ -0,0 +1,236 @@ +/* -*- 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_sdbc_ResultSet_idl__ +#define __com_sun_star_sdbc_ResultSet_idl__ + +#include+ A ResultSet maintains a cursor pointing to its current row of + data. Initially the cursor is positioned before the first row. + The "next" method moves the cursor to the next row. +
++ The getXXX methods retrieve column values for the current + row. You can retrieve values using either the index number of the + column. Columns are numbered from 1. +
++ For maximum portability, ResultSet columns within each row should be + read in left-to-right order and each column should be read only once. +
++ For the getXXX methods, the SDBC driver attempts to convert the + underlying data to the specified type and returns a suitable + value. +
++ Column names used as input to the findColumn method are case + insensitive. When several columns have the same name, then the value + of the first matching column will be returned. The column name option is + designed to be used when column names are used in the SQL + query. For columns that are NOT explicitly named in the query, it + is best to use column numbers. If column names are used, there is + no way for the programmer to guarantee that they actually refer to + the intended columns. +
++ A ResultSet is automatically closed (disposed) by the Statement that + generated it when that Statement is closed, re-executed, or used + to retrieve the next result from a sequence of multiple results. +
++ The number, types, and properties of a ResultSet's columns are + provided by the ResultSetMetaData object returned by the getMetaData + method. +
+ */ +published service ResultSet +{ + + /** optional for implementation; controls the releasing of resources + and the notification of registered listeners. + */ + [optional] interface com::sun::star::lang::XComponent; + + + /** freeing all resources of a result set. + ++ The creating statement will still be open after disposing. +
+ ++ This interface is mandatory only for JDBC conformance, + otherwise it is optional. +
+ */ + [optional] interface XCloseable; + + // gives access to the properties. + interface com::sun::star::beans::XPropertySet; + + + /** controls the chaining of warnings, which may occur on every call + to the connected database. + ++ Chained warnings from previous calls will be cleared before processing a new call. +
+ ++ This interface is mandatory only for JDBC conformance, otherwise it is optional. +
+ */ + [optional] interface XWarningsSupplier; + + + /** provides the access to the result set description. + */ + interface XResultSetMetaDataSupplier; + + + /** is the interface for navigating on the rows on a result set. + */ + interface XResultSet; + + + /** is the interface for updating row data to the database. + ++ The implementation is optional. +
+ */ + [optional] interface XResultSetUpdate; + + + /** is the interface for accessing the data of the current row. + */ + interface XRow; + + + /** is used for locating a column by its name. + */ + interface XColumnLocate; + + + /** is the interface for updating the data of the current row. + ++ The implementation is optional. +
+ */ + [optional] interface XRowUpdate; + + + /** defines the SQL cursor name that will be used by subsequent Statement +execute
+ methods.
+
+
+ + This name can then be used in SQL positioned update/delete statements to + identify the current row in the ResultSet generated by this statement. If + the database doesn't support positioned update/delete, this property is + a noop. To ensure that a cursor has the proper isolation level to support + updates, the cursor's SELECT statement should be of the form + "select for update ...". If the "for update" phrase is omitted, + positioned updates may fail. +
++ + Note: + + By definition, positioned update/delete + execution must be done by a different Statement than the one + which generated the ResultSet being used for positioning. Also, + cursor names must be unique within a connection. +
+ */ + [optional, readonly, property] string CursorName; + + + /** retrieves the result set concurrency. + + @see com::sun::star::sdbc::ResultSetConcurrency + */ + [readonly, property] long ResultSetConcurrency; + + + /** determines the result set type. + + @see com::sun::star::sdbc::ResultSetType + */ + [readonly, property] long ResultSetType; + + + /** retrieves the direction for fetching rows from database tables + that is the default for result sets generated from this + com::sun::star::sdbcx::Statement + object. +Statement
object has not set a fetch direction,
+ the return value is implementation-specific.
+ */
+ [property] long FetchDirection;
+
+
+ /** retrieves the number of result set rows that is the default fetch size
+ for result sets generated from this
+ com::sun::star::sdbcx::Statement
+ object.
+
+ It acts like a typical bean. Before you use the RowSet, you have to specify a
+ set of properties like a DataSource and a Command and other properties known of
+ Statement.
+
+ Afterwards, you can populate the RowSet by its execute method to fill the set
+ with data.
+
+ On the one hand, a RowSet can be used as a short cut to retrieve the data of a DataSource. + You don't have to establish a connection, create a Statement, and then create + a ResultSet. On the other hand, a row set can be used to implement capabilities for + a result set, which are not supported by a driver result set, like caching + strategies or update capabilities. +
+ */ +published service RowSet +{ + service com::sun::star::sdbc::ResultSet; + + /** used to execute and to add/remove listeners. + +To refresh the content of a RowSet, use this interface's XRowSet::execute() + method.
+ */ + interface XRowSet; + + // used to set parameters. + interface XParameters; + + /** allows locating columns whose name is known only. + */ + interface XColumnLocate; + + /** is the name of a named datasource to use.@see com::sun::star::sdbc:XDataSource + */ + [property] string DataSourceName; + + + /** is the connection URL. Could be used instead of the DataSourceName. + */ + [property] string URL; + + + /** is the command which should be executed. + */ + [property] string Command; + + + /** indicates the transaction isolation level, which should be used for the + connection.@see com::sun::star::sdbc::TransactionIsolation + */ + [property] long TransactionIsolation; + + + /** is the type map that will be used for the custom mapping of SQL structured types + and distinct types. + */ + [property] com::sun::star::container::XNameAccess TypeMap; + + + /** returns if escape processing is on or off. + If escape scanning is on (the default), the driver will do + escape substitution before sending the SQL to the database. + This is only evaluated, if the CommandType is COMMAND. + */ + [property] boolean EscapeProcessing; + + + /** retrieves the number of seconds the driver will wait for a Statement + to execute. If the limit is exceeded, a + com::sun::star::sdbc::SQLException + is thrown. + There is no limitation, if set to zero. + */ + [property] long QueryTimeOut; + + + /** returns the maximum number of bytes allowed for any column value. + +
+ This limit is the maximum number of bytes that can be returned
+ for any column value. The limit applies only to
+ com::sun::star::sdbc::DataType::BINARY
+ ,
+ com::sun::star::sdbc::DataType::VARBINARY
+ ,
+ com::sun::star::sdbc::DataType::LONGVARBINARY
+ ,
+ com::sun::star::sdbc::DataType::CHAR
+ ,
+ com::sun::star::sdbc::DataType::VARCHAR
+ ,
+ and
+ com::sun::star::sdbc::DataType::LONGVARCHAR
+ columns.
+ If the limit is exceeded, the excess data is silently discarded.
+
+ There is no limitation, if set to zero.
+
+ Each + com::sun::star::sdbc::SQLException + provides several kinds of information: +
++
+ Only one ResultSet per Statement can be open at any point in
+ time. Therefore, if the reading of one ResultSet is interleaved
+ with the reading of another, each must have been generated by
+ different Statements. All statement execute
methods implicitly
+ close a statement's current ResultSet if an open one exists.
+
+ A driver implementing batch execution must return + `TRUE` + for + com::sun::star::sdbc:: XDatabaseMetaData::supportsBatchUpdates() +
+ */ + [optional] interface XBatchExecution; + + + /** controls the chaining of warnings, which may occur on every call + to the connected database. Chained warnings from previous calls will be + cleared before processing a new call. + */ + interface XWarningsSupplier; + + + /** covers the handling of multiple results after executing an SQL command. + The implementation is optional. + */ + [optional] interface XMultipleResults; + + + /** retrieves the number of seconds the driver will wait for a Statement + to execute. If the limit is exceeded, a SQLException is thrown. + There is no limitation, if set to zero. + */ + [property] long QueryTimeOut; + + + /** returns the maximum number of bytes allowed for any column value. + +
+ This limit is the maximum number of bytes that can be returned
+ for any column value. The limit applies only to
+ com::sun::star::sdbc::DataType::BINARY
+ ,
+ com::sun::star::sdbc::DataType::VARBINARY
+ ,
+ com::sun::star::sdbc::DataType::LONGVARBINARY
+ ,
+ com::sun::star::sdbc::DataType::CHAR
+ ,
+ com::sun::star::sdbc::DataType::VARCHAR
+ ,
+ and
+ com::sun::star::sdbc::DataType::LONGVARCHAR
+ columns.
+ If the limit is exceeded, the excess data is silently discarded.
+
+ There is no limitation, if set to zero.
+
execute
+ methods.
+
+ + This name can then be used in SQL positioned update/delete statements to + identify the current row in the ResultSet generated by this statement. If + the database does not support positioned update/delete, this property is + a noop. To ensure that a cursor has the proper isolation level to support + updates, the cursor's SELECT statement should be of the form + "select for update ...". If the "for update" phrase is omitted, + positioned updates may fail. +
++ + Note: + + By definition, positioned update/delete + execution must be done by a different Statement than the one + which generated the ResultSet being used for positioning. Also, + cursor names must be unique within a connection. +
+ */ + [property] string CursorName; + + + /** retrieves the result set concurrency. + + @see com::sun::star::sdbc::ResultSetConcurrency + */ + [property] long ResultSetConcurrency; + + + /** determine the result set type. + + @see com::sun::star::sdbc::ResultSetType + */ + [property] long ResultSetType; + + + /** retrieves the direction for fetching rows from database tables + that is the default for result sets generated from this +Statement
+ object.
+ Statement
+ object has not set a fetch direction,
+ the return value is implementation-specific.
+ */
+ [property] long FetchDirection;
+
+
+ /** retrieves the number of result set rows that is the default fetch size
+ for result sets generated from this
+ Statement
+ object.
+ Statement
+ object has not set a fetch size,
+ the return value is implementation-specific.
+ */
+ [property] long FetchSize;
+
+
+ /** returns if escape processing is on or off.
+ If escape scanning is on (the default), the driver will do
+ escape substitution before sending the SQL to the database.
+ */
+ [property] boolean EscapeProcessing;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/TransactionIsolation.idl b/offapi/com/sun/star/sdbc/TransactionIsolation.idl
new file mode 100644
index 000000000..9f9c4c4ac
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/TransactionIsolation.idl
@@ -0,0 +1,78 @@
+/* -*- 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_sdbc_TransactionIsolation_idl__
+#define __com_sun_star_sdbc_TransactionIsolation_idl__
+
+ module com { module sun { module star { module sdbc {
+
+
+/** distinguishes different possible transaction isolation levels.
+ */
+published constants TransactionIsolation
+{
+
+ /** indicates that transactions are not supported.
+ */
+ const long NONE = 0;
+
+ /** Dirty reads, non-repeatable reads and phantom reads can occur.
+ This level allows a row changed by one transaction to be read
+ by another transaction before any changes in that row have been
+ committed (a "dirty read"). If any of the changes are rolled back,
+ the second transaction will have retrieved an invalid row.
+ */
+ const long READ_UNCOMMITTED = 1;
+
+ /** Dirty reads are prevented; non-repeatable reads and phantom
+ reads can occur. This level only prohibits a transaction
+ from reading a row with uncommitted changes in it.
+ */
+ const long READ_COMMITTED = 2;
+
+ /** Dirty reads and non-repeatable reads are prevented; phantom
+ reads can occur. This level prohibits a transaction from
+ reading a row with uncommitted changes in it, and it also
+ prohibits the situation where one transaction reads a row,
+ a second transaction alters the row, and the first transaction
+ rereads the row, getting different values the second time
+ (a "non-repeatable read").
+ */
+ const long REPEATABLE_READ = 4;
+
+ /** Dirty reads, non-repeatable reads and phantom reads are prevented.
+ This level includes the prohibitions in
+ REPEATABLE_READ
+ and further prohibits the
+ situation where one transaction reads all rows that satisfy
+ a WHERE condition, a second transaction inserts a row that
+ satisfies that WHERE condition, and the first transaction
+ rereads for the same condition, retrieving the additional
+ "phantom" row in the second read.
+ */
+ const long SERIALIZABLE = 8;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XArray.idl b/offapi/com/sun/star/sdbc/XArray.idl
new file mode 100644
index 000000000..ddd0e461a
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/XArray.idl
@@ -0,0 +1,231 @@
+/* -*- 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_sdbc_XArray_idl__
+#define __com_sun_star_sdbc_XArray_idl__
+
+#include Array
is a transaction duration
+ reference to an SQL array. By default, an Array
+ is implemented using a SQL LOCATOR(array) internally.
+ */
+published interface XArray: com::sun::star::uno::XInterface
+{
+
+ /** returns the SQL type name of the elements in
+ the array designated by this
+ Array
+ object.
+ + If the elements are a built-in type, it returns + the database-specific type name of the elements. + If the elements are a user-defined type (UDT), + this method returns the fully-qualified SQL type name. +
+ @returns + a String that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDT + + @throws SQLException + if a database access error occurs. + */ + string getBaseTypeName() raises (SQLException); + + + /** returns the SDBC type of the elements in the array designated + by this +Array
+ object.
+ @returns
+ a constant from the SDBC types that is the type code for the elements in the array designated by this Array object.
+ @throws SQLException
+ if a database access error occurs.
+ */
+ long getBaseType() raises (SQLException);
+
+
+ /** retrieves the contents of the SQL array designated by this
+ Array
+ object, using the specified
+ typeMap
+ for type map customizations.
+
+ If the base type of the array does not match a user-defined type
+ in
+
+ The result set contains one row for each array element, with
+ two columns in each row. The second column stores the element
+ value; the first column stores the index into the array for
+ that element (with the first array element being at index 1).
+ The rows are in ascending order corresponding to
+ the order of the indices.
+
+ The result set contains one row for each array element, with
+ two columns in each row. The second column stores the element
+ value; the first column stores the index into the array for
+ that element (with the first array element being at index 1).
+ The rows are in ascending order corresponding to
+ the order of the indices.
+
+ A SQL
+
+ BLOB
+
+ is a built-in type that stores a
+ Binary Large Object as a column value in a row of a database table.
+ The driver implements
+
+ BLOB
+
+ using a
+ SQL
+
+ Methods in the interfaces
+ com::sun::star::sdbc::XResultSet
+ ,
+ and
+ com::sun::star::sdbc::XPreparedStatement
+ , such as
+
+ A SQL
+
+ The
+
+ Methods in the interfaces
+ com::sun::star::sdbc::XResultSet
+ ,
+ and
+ com::sun::star::sdbc::XPreparedStatement
+ , such as
+
+ The substring begins at position
+ When several columns have the same name, then the value
+ of the first matching column will be returned. The column name option is
+ designed to be used when column names are used in the SQL
+ query. For columns that are NOT explicitly named in the query, it
+ is best to use column numbers. If column names are used, there is
+ no way for the programmer to guarantee that they actually refer to
+ the intended columns.
+
+ The specification before LibreOffice 4.2 left unspecified what should
+ happen for an invalid column name. As a result some drivers written
+ against the older specification may return a special invalid value, such
+ as a negative number, zero, or a number greater than the number of
+ columns.
+
+ A Connection's database is able to provide information
+ describing its tables, its supported SQL grammar, its stored
+ procedures, and the capabilities of this connection. This
+ information is obtained with the
+ com::sun::star::sdbc::XDatabaseMetaData::getMetaData()
+ method.
+
+
+ SQL statements without parameters are normally
+ executed using Statement objects. If the same SQL statement
+ is executed many times, it is more efficient to use a
+ com::sun::star::sdbc::PreparedStatement.
+
+ Result sets created using the returned Statement will have
+ forward-only type, and read-only concurrency, by default.
+
+ Escape processing for the SQL-Statement is enabled, by default.
+
+ A SQL statement with or without IN parameters can be
+ pre-compiled and stored in a PreparedStatement object. This
+ object can then be used to efficiently execute this statement
+ multiple times.
+
+
+
+ Note:
+
+ This method is optimized for handling
+ parametric SQL statements that benefit from precompilation. If
+ the driver supports precompilation,
+ the method
+
+ Result sets created using the returned PreparedStatement will have
+ forward-only type and read-only concurrency, by default.
+
+ Escape processing for the SQL-Statement is enabled, by default.
+
+ The CallableStatement provides methods for setting up its IN and OUT
+ parameters, and methods for executing the call to a stored procedure.
+
+
+ Note:
+
+ This method is optimized for handling stored
+ procedure call statements. Some drivers may send the call
+ statement to the database when the method
+
+ If a connection is in auto-commit mode, then all its SQL
+ statements will be executed and committed as individual
+ transactions. Otherwise, its SQL statements are grouped into
+ transactions that are terminated by a call to either
+ the method
+ com::sun::star::sdbc::XConnection::commit()
+ or the method
+ com::sun::star::sdbc::XConnection::rollback().
+ By default, new connections are in auto-commit mode.
+
+ The commit occurs when the statement completes or the next
+ execute occurs, whichever comes first. In the case of
+ statements returning a ResultSet, the statement completes when
+ the last row of the ResultSet has been retrieved or the
+ ResultSet has been closed. In advanced cases, a single
+ statement may return multiple results as well as output
+ parameter values. In these cases the commit occurs when all results and
+ output parameter values have been retrieved.
+
+
+ Note:
+
+ A Connection is automatically closed if no one references it
+ anymore. Certain fatal errors also result in a closed Connection.
+
+ A Connection's database is able to provide information
+ describing its tables, its supported SQL grammar, its stored
+ procedures, the capabilities of this connection, and so on. This
+ information is made available through a DatabaseMetaData
+ object.
+
+
+ Note:
+
+ This method cannot be called while in the
+ middle of a transaction. Calling setReadOnly with
+ `TRUE`
+ does not
+ necessarily cause writes to be prohibited.
+
+ The constants defined in
+ com::sun::star::sdbc::TransactionIsolation
+ are the possible transaction isolation levels.
+
+
+ Note:
+
+ This method cannot be called while
+ in the middle of a transaction.
+
+ Unless the application has added an entry to the type map, the map
+ returned will be empty.
+
+ Only if the driver supports custom type mapping is the setting of a map allowed.
+
+ A value of zero specifies that the timeout is the default system
+ timeout if there is one; otherwise, it specifies that there is no timeout.
+ When a DataSource object is created the login timeout is initially zero.
+
+ A value of zero means that the timeout is the default system timeout
+ if there is one; otherwise, it means that there is no timeout. When a
+ DataSource object is created the login timeout is initially zero.
+ Many of the methods here return lists of information in
+ the form of
+ com::sun::star::sdbc::XResultSet
+ objects.
+ You can use the normal com::sun::star::sdbc::XRow
+ (or com::sun::star::sdb::XColumn)
+ methods such as
+ com::sun::star::sdbc::XRow::getString()
+ and
+ com::sun::star::sdbc::XRow::getInt()
+ to retrieve the data from these XResultSets. If a given form of
+ metadata is not available, these methods should throw a
+ com::sun::star::sdbc::SQLException.
+ After calling one of the getXXX() methods,
+ one can check whether that value is `NULL`
+ with the method com::sun::star::sdbc::XRow::wasNull().
+ In the text only "(may be `NULL`)" is mentioned for this case.
+ Some of these methods take arguments that are String patterns. These
+ arguments all have names such as fooPattern. Within a pattern String, "%"
+ means match any substring of 0 or more characters, and "_" means match
+ any one character. Only metadata entries matching the search pattern
+ are returned. If a search pattern argument is set to `VOID`,
+ that argument's criteria will be dropped from the search.
+
+ A
+ com::sun::star::sdbc::SQLException
+ will be thrown if a driver does not support
+ a metadata method. In the case of methods that return an XResultSet,
+ either an XResultSet (which may be empty) is returned or a
+ SQLException is thrown.
+ The "_" character represents any single character.
+
+ The "%" character represents any sequence of zero or
+ more characters.
+
+ The SQL AS clause can be used to provide names for
+ computed columns or to provide alias names for columns as required.
+
+ Only procedure descriptions matching the schema and
+ procedure name criteria are returned. They are ordered by
+ PROCEDURE_SCHEM, and PROCEDURE_NAME.
+
+ Each procedure description has the following columns:
+
+ Only descriptions matching the schema, procedure and
+ parameter name criteria are returned. They are ordered by
+ PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value,
+ if any, is first. Next are the parameter descriptions in call
+ order. The column descriptions follow in column number order.
+ Each row in the XResultSet is a parameter description or
+ column description with the following fields:
+
+ Note: Some databases may not return the column
+ descriptions for a procedure. Additional columns beyond
+ REMARKS can be defined by the database.
+ Only table descriptions matching the catalog, schema, table
+ name, and type criteria are returned. They are ordered by
+ TABLE_TYPE, TABLE_SCHEM, and TABLE_NAME.
+ Each table description has the following columns:
+
+ Note: Some databases may not return information for
+ all tables.
+ The schema column is:
+ The catalog column is:
+ The table type is:
+ Only column descriptions matching the catalog, schema, table
+ and column name criteria are returned. They are ordered by
+ TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.
+ Each column description has the following columns:
+
+ Only privileges matching the column name criteria are
+ returned. They are ordered by COLUMN_NAME and PRIVILEGE.
+ Each privilege description has the following columns:
+ Only privileges matching the schema and table name
+ criteria are returned. They are ordered by TABLE_SCHEM,
+ TABLE_NAME, and PRIVILEGE.
+ Each privilege description has the following columns:
+ Each column description has the following columns:
+ Each column description has the following columns:
+ Each primary key column description has the following columns:
+ Each primary key column description has the following columns:
+ Each foreign key column description has the following columns:
+ Each foreign key column description has the following columns:
+ Each type description has the following columns:
+ Each index column description has the following columns:
+ Only types matching the catalog, schema, type name, and type
+ criteria are returned. They are ordered by DATA_TYPE, TYPE_SCHEM,
+ and TYPE_NAME. The type name parameter may be a fully-qualified
+ name. In this case, the catalog and schemaPattern parameters are
+ ignored.
+ Each type description has the following columns:
+
+ Note: If the driver does not support UDTs, an empty
+ result set is returned.
+
+ Each driver should supply a service that implements
+ the Driver interface.
+
+ The DriverManager will try to load as many drivers as it can
+ find, and then for any given connection request, it will ask each
+ driver in turn to try to connect to the target URL.
+
+
+ It is strongly recommended that each Driver object should be
+ small and standalone so that the Driver object can be loaded and
+ queried without bringing in vast quantities of supporting code.
+
+
+ The driver should raise a
+ com::sun::star::sdbc::SQLException
+ if it is the right
+ driver to connect to the given URL, but has trouble connecting to
+ the database.
+
+
+ The info argument can be used to pass arbitrary
+ string tag/value pairs as connection arguments.
+ Normally at least "user" and "password" properties should be
+ included in the Properties. For a JDBC driver also the Java class must
+ be supplied in the property named JavaDriverClass, and a class path (a
+ space-separated list of URLs) needed to locate that class can optionally
+ be supplied in a property named JavaDriverClassPath.
+ Possible property value names are when supported by the driver:
+ @see com::sun::star::sdbc::ConnectionProperties
+ The getPropertyInfo method is intended to allow a generic GUI tool to
+ discover what properties it should prompt a human for in order to get
+ enough information to connect to a database. Note that depending on
+ the values the human has supplied so far, additional values may become
+ necessary, so it may be necessary to iterate though several calls
+ to getPropertyInfo.
+ @param url
+ is the URL of the database to which to connect.
+ @param info
+ is a proposed list of tag/value pairs that will be sent on
+ connect open.
+ @returns
+ an array of DriverPropertyInfo objects describing possible
+ properties. This array may be an empty array if no properties
+ are required.
+ @throws SQLException
+ if a database access error occurs.
+ */
+ sequence
+ When the method
+ com::sun::star::sdbc::XDriverManager::getConnection()
+ is called,
+ the DriverManager will attempt to
+ locate a suitable driver.
+
+
+ As part of its initialization, the DriverManager service will
+ attempt to load the registered drivers.
+
+
+ When the method The relative order of columns in the result set returned by getGeneratedValues() must be the same
+ as the relative order of the same columns as returned when executing a "SELECT * FROM table". This ensures that
+ clients of this interface can reliably fetch the column values.
+ The XIsolatedConnection allows to create connections which are not shared among others
+ as it is the case when creating connections in normal way.
+ If information is missing, such as
+ a user's password, they are completed by user interaction.
+ Under some (uncommon) situations a single SQL statement may return
+ multiple result sets and/or update counts. Normally you can ignore
+ this unless you are (1) executing a stored procedure that you know may
+ return multiple results or (2) you are dynamically executing an
+ unknown SQL string. The methods
+ com::sun::star::sdbc::XMultipleResults::getMoreResults()
+ ,
+ com::sun::star::sdbc::XMultipleResults::getResultSet()
+ and
+ com::sun::star::sdbc::XMultipleResults::getUpdateCount()
+ let you navigate through multiple results.
+
+
+ If the result is a ResultSet or there are no more results, -1
+ is returned. This method should be called only once per result.
+
+ There are no more results when
+ SDBC provides a stored procedure SQL escape that allows stored procedures
+ to be called in a standard way for all RDBMSs. This escape syntax has one
+ form that includes a result parameter and one that does not. If used, the
+ result parameter must be registered as an OUT parameter. The other parameters
+ can be used for input, output, or both. Parameters are referred to sequentially,
+ by number. The first parameter is 1.
+
+ Before executing a stored procedure call, you must explicitly
+ call
+ com::sun::star::sdbc::XOutParameters::registerOutParameter()
+ to register the type from
+ com::sun::star::sdbc::DataType
+ for each OUT parameter.
+ Although it is intended for user-named and REF parameters,
+ this method may be used to register a parameter of any SDBC type.
+ If the parameter does not have a user-named or REF type, the
+ typeName parameter is ignored.
+
+ Note: When reading the value of an out parameter, you
+ must use the
+
+ The SDBC type specified by
+
+ Note: The setXXX methods for setting IN parameter values
+ must specify types that are compatible with the defined SQL type of
+ the input parameter. For instance, if the IN parameter has SQL type
+ Integer, then the method
+ com::sun::star::sdbc::XParameters::setInt()
+ should be used.
+
+
+ If arbitrary parameter type conversions are required, the method
+ com::sun::star::sdbc::XParameters::setObject()
+ should be used with a target SQL type.
+
+ Note: To be portable, applications must give the
+ SQL type code and the fully-qualified SQL type name when specifying
+ a NULL user-defined or REF parameter. In the case of a user-named type
+ the name is the type name of the parameter itself. For a REF
+ parameter the name is the type name of the referenced type. If
+ a SDBC driver does not need the type code or type name information,
+ it may ignore it.
+ The given object will be converted to the targetSqlType
+ before being sent to the database.
+ If the object has a custom mapping (is of a class implementing SQLData),
+ the SDBC driver should call its method Note that this method may be used to pass database-specific
+ abstract data types.
+ The given object will be converted to the targetSqlType
+ before being sent to the database.
+ If the object has a custom mapping (is of a class implementing SQLData),
+ the SDBC driver should call its method Note that this method may be used to pass database-specific
+ abstract data types.
+ In general, parameter values remain in force for repeated use of a
+ Statement. Setting a parameter value automatically clears its
+ previous value. However, in some cases it is useful to immediately
+ release the resources used by the current parameter values; this can
+ be done by calling clearParameters.
+
+ PoolConnections are handled by the connection pool.
+
+ When the method
+ com::sun::star::sdbc::XPooledConnection::getConnection()
+ is called, the PooledConnection returns the connection which is pooled.
+
+ A
+ com::sun::star::sdbc::PreparedStatement
+ uses one precompiled SQL Statement. In batch execution
+ it is possible to set collection of parameter settings, which are executed in
+ one batch job.
+
+ A SQL statement is pre-compiled and stored in a PreparedStatement object.
+ This object can then be used to efficiently execute this statement multiple
+ times.
+
+ Some prepared statements return multiple results; the execute
+ method handles these complex statements as well as the simpler
+ form of statements handled by executeQuery and executeUpdate.
+
+ A ResultSet maintains a cursor pointing to its current row of
+ data. Initially the cursor is positioned before the first row.
+ The "next" method moves the cursor to the next row.
+
+ A ResultSet cursor is initially positioned before the first row; the
+ first call to next makes the first row the current row; the
+ second call makes the second row the current row, and so on.
+ If an input stream is open for the current row, a call
+ to the method
+
+
+ Note:
+
+ Calling the method
+
+ If the row number is positive, the cursor moves to
+ the given row number with respect to the
+ beginning of the result set. The first row is row 1, the second
+ is row 2, and so on.
+
+ If the given row number is negative, the cursor moves to
+ an absolute row position with respect to
+ the end of the result set. For example, calling
+
+ An attempt to position the cursor beyond the first/last row in
+ the result set leaves the cursor before/after the first/last
+ row, respectively.
+
+ Note: Calling
+
+ Attempting to move beyond the first/last row in the result set
+ positions the cursor before/after
+ the first/last row. Calling
+
+ Note: Calling
+
+ Note:
+
+ The number, types, and properties of a ResultSet's columns are
+ provided by the
+ com::sun::star::sdbc::XResultSetMetaData
+ interface returned by the
+ com::sun::star::sdbc::XResultSetMetaDataSupplier::getMetaData()
+ method.
+
+ This method may be called after calling an
+
+ The insert row is a special row associated with an updatable
+ result set. It is essentially a buffer where a new row may
+ be constructed by calling the
+
+ Only the
+
+ Note: All the data in the returned stream must be
+ read prior to getting the value of any other column. The next
+ call to a get method implicitly closes the stream. Also, a
+ stream may return 0 when the method
+ com::sun::star::io::XInputStream::available()
+ is called whether there is data
+ available or not.
+
+ Note: All the data in the returned stream must be
+ read prior to getting the value of any other column. The next
+ call to a get method implicitly closes the stream. Also, a
+ stream may return 0 when the method
+ com::sun::star::io::XInputStream::available()
+ is called whether there is data
+ available or not.
+
+ The XRowSet interface is unique in that it is intended to be
+ a software layer on top of an SDBC driver. Implementations of the
+ RowSet interface can be provided by anyone.
+
+ This interface must be implemented by a service that is
+ registered in a type mapping. It is expected that this interface
+ will normally be implemented by a tool. The methods in this interface
+ are called by the driver and are never called by a programmer
+ directly.
+
+ This method is called by the SDBC driver to get the name of the
+ UDT instance that is being mapped to this instance of SQLData.
+
+ The implementation of the method must follow this protocol:
+
+ The SDBC driver initializes the input stream with a type map
+ before calling this method, which is used by the appropriate
+
+ The implementation of the method must follow this protocol:
+
+ This interface, used only for custom mapping, is used by the driver
+ behind the scenes, and a programmer never directly invokes
+
+ When the method
+
+ The actual type of the any returned is determined by the default
+ type mapping, and any customizations present in this stream's type map.
+
+
+ When an object of a class implementing interface
+ com::sun::star::sdbc::XSQLData
+ is passed as an argument to a SQL statement, the JDBC driver calls
+ com::sun::star::sdbc::SQLData::getSQLType()
+ to determine the kind of SQL datum being passed to the database.
+ When the
+
+ Only one ResultSet per Statement can be open at any point in
+ time; therefore, if the reading of one ResultSet is interleaved
+ with the reading of another, each must have been generated by
+ different Statements. All statement
+
+ Under some (uncommon) situations a single SQL statement may return
+ multiple result sets and/or update counts. Normally you can ignore
+ this unless you are (1) executing a stored procedure that you know may
+ return multiple results or (2) you are dynamically executing an
+ unknown SQL string. The navigation through multiple results is covered by
+ com::sun::star::sdbc::XMultipleResults.
+
+ The
+
+ A
+
+ This method uses the given type map for customizations of the type
+ mappings. If there is no entry in the given type map that matches or
+ the given type map is
+ `NULL`
+ , the structured type that this
+
+ Note: Subsequent warnings will be chained to this
+ com::sun::star::sdbc::SQLWarning.
+ typeMap
+ , the standard mapping is used instead.
+
+ @param typeMap
+ is a map object that contains mappings of SQL type names to
+ services. If the
+ typeMap
+ is
+ `NULL`
+ , the type-map
+ associated with the connection for customizations of the type-mappings
+ is used.
+
+ @returns
+ a sequence that contains the ordered elements
+ of the SQL array designated by this object.
+
+ @throws SQLException
+ if an error occurs while attempting to access the array.
+ */
+ sequenceindex
+ and containing up to
+ count
+ successive elements of the SQL array.
+
+ @param index
+ is the array index of the first element to retrieve;
+ the first element is at index 1.
+ @param count
+ is the number of successive SQL array elements to retrieve.
+ @param typeMap
+ is a map object that contains mappings of SQL type names to
+ services. If the
+ typeMap
+ is
+ `NULL`
+ , the type-map
+ associated with the connection for customizations of the type-mappings
+ is used.
+ @returns
+ an array containing up to
+ count
+ consecutive elements of the SQL array, beginning with element
+ index
.
+ @throws SQLException
+ if an error occurs while attempting to access the array.
+ */
+ sequenceArray
+ object and uses the given
+ typeMap
+ to map the array elements. If the base
+ type of the array does not match a user-defined type in
+ typeMap
+ or the
+ typeMap
+ is
+ `NULL`
+ ,
+ the connection type mapping is used instead.
+
+
+ index
+ and contains up to
+ count
+ successive elements. This method uses the given
+ typeMap
+ to map the array elements. If the base
+ type of the array does not match a user-defined type in
+ typeMap
+ or the
+ typeMap
+ is
+ `NULL`
+ ,
+ the connection type mapping is used instead.
+
+
+ locator(BLOB)
+ , which means that a
+ Blob
+ object contains a logical pointer to the SQL
+
+ BLOB
+
+ data rather than the data itself.
+
+ A
+ Blob
+ object is valid for the duration of the transaction in which is was created.
+
+ getBlob
+ and
+ setBlob
+ allow a programmer to access the SQL
+ BLOB.
+
+ The
+ Blob
+ interface provides methods for getting the length of a SQL
+
+ BLOB
+
+ (Binary Large Object) value, for materializing a
+
+ BLOB
+
+ value on the client and for determining the position of a pattern of bytes within a
+
+ BLOB
+
+ value.
+ Blob
+ object.
+ @returns
+ the length
+ @throws SQLException
+ if a database access error occurs.
+ */
+ hyper length() raises (SQLException);
+
+
+ /** returns as an array of bytes part or all of the
+
+ BLOB
+
+ value that this
+ Blob
+ object designates. The byte
+ array contains up to
+ length
+ consecutive bytes
+ starting at position
+ pos
.
+ @param pos
+ is the ordinal position of the first byte in the
+
+ BLOB
+
+ value to be extracted; the first byte is at
+ position 1.
+ @param length
+ is the number of consecutive bytes to be copied.
+ @returns
+ a byte array containing up to
+ length
+ consecutive bytes from the
+
+ BLOB
+
+ value designated
+ by this
+ Blob
+ object, starting with the byte at position
+ pos
.
+ @throws SQLException
+ if there is an error accessing the BLOB.
+ */
+ sequenceBlob
+ instance as a stream.
+ @returns
+ the stream
+ @throws SQLException
+ if a database access error occurs.
+ */
+ com::sun::star::io::XInputStream getBinaryStream()
+ raises (SQLException);
+
+ /** determines the byte position at which the specified byte
+ pattern
+ begins within the
+
+ BLOB
+
+ value that this
+ Blob
+ object represents. The
+ search for
+ pattern
+ begins at position start
.
+
+ @param pattern
+ the pattern to search
+ @param start
+ the start position for the search
+ @returns
+ the position
+ @throws SQLException
+ if a database access error occurs.
+ */
+ hyper position([in]sequenceBlob
+ object at which
+ pattern
+ begins. The search begins at position start
.
+ @param pattern
+ the pattern to search
+ @param start
+ position to start
+ @returns
+ the position
+ @throws SQLException
+ if a database access error occurs.
+ */
+ hyper positionOfBlob([in]XBlob pattern,[in] hyper start)
+ raises (SQLException);
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XClob.idl b/offapi/com/sun/star/sdbc/XClob.idl
new file mode 100644
index 000000000..bc0d2bc81
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/XClob.idl
@@ -0,0 +1,189 @@
+/* -*- 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_sdbc_XClob_idl__
+#define __com_sun_star_sdbc_XClob_idl__
+
+#include CLOB
+ type.
+
+
+ CLOB
+ is a built-in type
+ that stores a Character Large Object as a column value in a row of
+ a database table.
+ The driver implements a
+ Clob
+ object using a SQL
+ locator(CLOB)
+ , which means that a
+ Clob
+ object
+ contains a logical pointer to the SQL
+ CLOB
+ data rather than
+ the data itself. A
+ Clob
+ object is valid for the duration
+ of the transaction in which it was created.
+ Clob
+ interface provides methods for getting the
+ length of a SQL
+ CLOB
+ (Character Large Object) value,
+ for materializing a
+ CLOB
+ value on the client, and for
+ searching for a substring or
+ CLOB
+ object within a
+ CLOB
+ value.
+ getClob
+ and
+ setClob
+ allow a programmer to access the SQL CLOB
.
+ CLOB
+ value
+ designated by this
+ Clob
+ object.
+ @returns
+ the length of the CLOB object
+ @throws SQLException
+ if a database access error occurs.
+ */
+ hyper length() raises (SQLException);
+
+
+ /** returns a copy of the specified substring in the
+ Clob
+ value
+ designated by this
+ Clob
+ object.
+
+
+ pos
and has up
+ to
+ length
+ consecutive characters.
+ Clob
+ contents as a stream.
+ @returns
+ the stream
+ @throws SQLException
+ if a database access error occurs.
+ */
+ com::sun::star::io::XInputStream getCharacterStream() raises (SQLException);
+
+
+ /** determines the character position at which the specified substring
+ searchstr
+ appears in the
+ Clob
.
+ The search begins at position start
.
+
+ @param searchstr
+ the string to search
+ @param start
+ the starting position
+ @returns
+ the length of the CLOB object
+ @throws SQLException
+ if a database access error occurs.
+ */
+ hyper position([in]string searchstr, [in]long start)
+ raises (SQLException);
+
+
+ /** determines the position at which the specified
+ Clob
+ object
+ pattern
+ appears in this
+ Clob
+ object.
+ The search begins at position start
.
+ @param pattern
+ the CLOB to search
+ @param start
+ the starting position
+ @returns
+ the position of the CLOB inside
+ @throws SQLException
+ if a database access error occurs.
+ */
+ hyper positionOfClob([in]XClob pattern, [in]hyper start)
+ raises (SQLException);
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XCloseable.idl b/offapi/com/sun/star/sdbc/XCloseable.idl
new file mode 100644
index 000000000..144f01563
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/XCloseable.idl
@@ -0,0 +1,48 @@
+/* -*- 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_sdbc_XCloseable_idl__
+#define __com_sun_star_sdbc_XCloseable_idl__
+
+#include columnName
does not exist,
+ or a database access error occurs.
+ */
+ long findColumn([in]string columnName) raises (SQLException);
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XConnection.idl b/offapi/com/sun/star/sdbc/XConnection.idl
new file mode 100644
index 000000000..3548ac187
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/XConnection.idl
@@ -0,0 +1,406 @@
+/* -*- 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_sdbc_XConnection_idl__
+#define __com_sun_star_sdbc_XConnection_idl__
+
+#include prepareStatement
+ will send
+ the statement to the database for precompilation. Some drivers
+ may not support precompilation. In this case, the statement may
+ not be sent to the database until the
+ com::sun::star::sdbc::PreparedStatement
+ is executed. This has no direct effect on users; however, it does
+ affect which method throws certain SQLExceptions.
+ prepareCall
+ is done;
+
+ others may wait until the CallableStatement is executed. This has no
+ direct effect on users; however, it does affect which method
+ throws certain SQLExceptions.
+ Result sets created using the returned CallableStatement will have
+ forward-only type and read-only concurrency, by default.
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schemaPattern
+ a schema name pattern; "" retrieves those without a schema
+ @param procedureNamePattern
+ a procedure name pattern
+ @returns
+ each row is a procedure description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getProcedures([in]any catalog, [in]string schemaPattern,
+ [in]string procedureNamePattern) raises (SQLException);
+
+ /** gets a description of a catalog's stored procedure parameters
+ and result columns.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @returns
+ each row has a single String column that is a schema name
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getSchemas() raises (SQLException);
+
+ /** gets the catalog names available in this database. The results
+ are ordered by catalog name.
+
+
+
+
+ @returns
+ each row has a single String column that is a catalog name
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getCatalogs() raises (SQLException);
+
+ /** gets the table types available in this database. The results
+ are ordered by table type.
+
+
+
+
+ @returns
+ each row has a single String column that is a table type
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getTableTypes() raises (SQLException);
+
+ /** gets a description of table columns available in
+ the specified catalog.
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schemaPattern
+ a schema name pattern; "" retrieves those without a schema
+ @param tableNamePattern
+ a table name pattern
+ @param columnNamePattern
+ a column name pattern
+ @returns
+ each row is a column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getColumns([in]any catalog, [in]string schemaPattern,
+ [in]string tableNamePattern, [in]string columnNamePattern)
+ raises (SQLException);
+
+ /** gets a description of the access rights for a table's columns.
+
+
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schema
+ a schema name ; "" retrieves those without a schema
+ @param table
+ a table name
+ @param columnNamePattern
+ a column name pattern
+ @returns
+ each row is a column privilege description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getColumnPrivileges([in]any catalog, [in]string schema,
+ [in]string table, [in]string columnNamePattern) raises (SQLException);
+
+ /** gets a description of the access rights for each table available
+ in a catalog. Note that a table privilege applies to one or
+ more columns in the table. It would be wrong to assume that
+ this privilege applies to all columns (this may be `TRUE` for
+ some systems but is not `TRUE` for all.)
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schemaPattern
+ a schema name pattern; "" retrieves those without a schema
+ @param tableNamePattern
+ a table name pattern
+ @returns
+ each row is a table privilege description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getTablePrivileges([in]any catalog, [in]string schemaPattern,
+ [in]string tableNamePattern) raises (SQLException);
+
+ /** gets a description of a table's optimal set of columns that
+ uniquely identifies a row. They are ordered by SCOPE.
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schema
+ a schema name; "" retrieves those without a schema
+ @param table
+ a table name
+ @param scope
+ the scope of interest; use same values as SCOPE
+ @param nullable
+ include columns that are nullable?
+ @returns
+ each row is a column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getBestRowIdentifier([in]any catalog, [in]string schema,
+ [in]string table, [in]long scope, [in] boolean nullable)
+ raises (SQLException);
+
+ /** gets a description of a table's columns that are automatically
+ updated when any value in a row is updated. They are
+ unordered.
+
+
+
+
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schema
+ a schema name; "" retrieves those without a schema
+ @param table
+ a table name
+ @returns
+ each row is a column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getVersionColumns([in]any catalog, [in]string schema,
+ [in]string table) raises (SQLException);
+
+ /** gets a description of a table's primary key columns. They
+ are ordered by COLUMN_NAME.
+
+
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schema
+ a schema name; "" retrieves those without a schema
+ @param table
+ a table name
+ @returns
+ each row is a primary key column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getPrimaryKeys([in]any catalog, [in]string schema,
+ [in]string table) raises (SQLException);
+
+ /** gets a description of the primary key columns that are
+ referenced by a table's foreign key columns (the primary keys
+ imported by a table). They are ordered by PKTABLE_CAT,
+ PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schema
+ a schema name; "" retrieves those without a schema
+ @param table
+ a table name
+ @returns
+ each row is a primary key column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getImportedKeys([in]any catalog, [in]string schema,
+ [in]string table) raises (SQLException);
+
+ /** gets a description of the foreign key columns that reference a
+ table's primary key columns (the foreign keys exported by a
+ table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
+ FKTABLE_NAME, and KEY_SEQ.
+
+
+
+
+
+
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schema
+ a schema name; "" retrieves those without a schema
+ @param table
+ a table name
+ @returns
+ each row is a foreign key column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getExportedKeys([in]any catalog, [in]string schema,
+ [in]string table) raises (SQLException);
+
+ /** gets a description of the foreign key columns in the foreign key
+ table that reference the primary key columns of the primary key
+ table (describe how one table imports another's key.) This
+ should normally return a single foreign key/primary key pair
+ (most tables only import a foreign key from a table once.). They
+ are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
+ KEY_SEQ.
+
+
+
+
+
+
+
+
+
+
+ @param primaryCatalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param primarySchema
+ a schema name; "" retrieves those without a schema
+ @param primaryTable
+ the table name that exports the key
+ @param foreignCatalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param foreignSchema
+ a schema name; "" retrieves those without a schema
+ @param foreignTable
+ the table name that imports the key
+ @returns
+ each row is a foreign key column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getCrossReference(
+ [in]any primaryCatalog, [in]string primarySchema,
+ [in]string primaryTable,
+ [in]any foreignCatalog, [in]string foreignSchema,
+ [in]string foreignTable) raises (SQLException);
+
+ /** gets a description of all the standard SQL types supported by
+ this database. They are ordered by DATA_TYPE and then by how
+ closely the data type maps to the corresponding SDBC SQL type.
+
+
+
+
+
+
+
+
+
+
+
+ @returns
+ each row is a SQL type description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getTypeInfo() raises (SQLException);
+
+ /** gets a description of a table's indices and statistics. They are
+ ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
+
+
+
+
+
+
+
+
+ @param catalog
+ a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria
+ @param schema
+ a schema name; "" retrieves those without a schema
+ @param table
+ the table name that exports the key
+ @param unique
+ when `TRUE`, return only indices for unique values; when `FALSE`, return indices regardless of whether unique or not
+ @param approximate
+ when `TRUE`, result is allowed to reflect approximate or out of data values; when `FALSE`, results are requested to be accurate
+ @returns
+ each row is an index column description
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet getIndexInfo([in]any catalog, [in]string schema, [in]string table,
+ [in]boolean unique, [in]boolean approximate)
+ raises (SQLException);
+
+ /** Does the database support the given result set type?
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean supportsResultSetType([in]long setType) raises (SQLException);
+
+ /** Does the database support the concurrency type in combination
+ with the given result set type?
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @param concurrency
+ defined in
+ com::sun::star::sdbc::ResultSetConcurrency
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean supportsResultSetConcurrency([in]long setType,
+ [in]long concurrency)
+ raises (SQLException);
+
+ /** indicates whether a result set's own updates are visible.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean ownUpdatesAreVisible([in]long setType) raises (SQLException);
+
+ /** indicates whether a result set's own deletes are visible.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean ownDeletesAreVisible([in]long setType) raises (SQLException);
+
+ /** indicates whether a result set's own inserts are visible.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean ownInsertsAreVisible([in]long setType) raises (SQLException);
+
+ /** indicates whether updates made by others are visible.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean othersUpdatesAreVisible([in]long setType) raises (SQLException);
+
+ /** indicates whether deletes made by others are visible.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean othersDeletesAreVisible([in]long setType) raises (SQLException);
+
+ /** indicates whether inserts made by others are visible.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean othersInsertsAreVisible([in]long setType) raises (SQLException);
+
+ /** indicates whether or not a visible row update can be detected by
+ calling the method
+
+
+ XResultSet.rowUpdated
.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean updatesAreDetected([in]long setType) raises (SQLException);
+
+ /** indicates whether or not a visible row delete can be detected by
+ calling com::sun::star::sdbc::XResultSet::rowDeleted().
+ If deletesAreDetected()
+ returns `FALSE`, then deleted rows are removed from the result set.
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean deletesAreDetected([in]long setType) raises (SQLException);
+
+ /** indicates whether or not a visible row insert can be detected
+ by calling
+ com::sun::star::sdbc::XResultSet::rowInserted().()
+ @param setType
+ defined in
+ com::sun::star::sdbc::ResultSetType
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean insertsAreDetected([in]long setType) raises (SQLException);
+
+ /** indicates whether the driver supports batch updates.
+ @returns
+ `TRUE` if so
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean supportsBatchUpdates() raises (SQLException);
+
+ /** Gets a description of the user-defined types defined in a particular
+ schema. Schema-specific UDTs may have type OBJECT, STRUCT,
+ or DISTINCT.
+
+
+
+
+ getConnection
is called,
+ the DriverManager will attempt to
+ locate a suitable driver.
+
+ (!getMoreResults() &&
+ getUpdateCount() == -1)
.
+
+
+ For a user-named parameter the fully-qualified SQL type name of the
+ parameter should also be given, while a REF parameter requires that the
+ fully-qualified type name of the referenced type be given.
+ An SDBC driver that does not need the type code and type name information
+ may ignore it. To be portable, however, applications should always provide
+ these values for user-named and REF parameters.
+ getXXX
+ method whose type XXX corresponds to the
+ parameter's registered SQL type.
+ parameterIndex
+ to the SDBC type sqlType
. All
+ OUT parameters must be registered before a stored procedure is executed.
+
+
+ sqlType
+ for an OUT parameter determines the type that must be used in the
+ get
+ method to read the value of that parameter.
+ This version of
+ com::sun::star::sdbc::XOutParameters::registerOutParameter()
+ should be
+ used when the parameter is of SDBC type
+ com::sun::star::sdbc::DataType::NUMERIC
+ or com::sun::star::sdbc::DataType::DECIMAL.
+ @param parameterIndex
+ the first parameter is 1, the second is 2, ...
+ @param sqlType
+ the type of the column to register
+ @param scale
+ the scale of the type
+ @throws SQLException
+ if a database access error occurs.
+
+
+ Example of setting a parameter;
+ con
+ is an active connection.
+
+ Although it is intended for user-named and Ref parameters,
+ this method may be used to set a null parameter of any JDBC type.
+ If the parameter does not have a user-named or REF type, the given
+ typeName is ignored.
+ writeSQL
to write it
+ to the SQL data stream.
+ If, on the other hand, the object is of a service implementing Ref, Blob,
+ Clob, Struct, or Array, the driver should pass it to the database as a
+ value of the corresponding SQL type.
+ writeSQL
to write it
+ to the SQL data stream.
+ If, on the other hand, the object is of a service implementing Ref, Blob,
+ Clob, Struct, or Array, the driver should pass it to the database as a
+ value of the corresponding SQL type.
+ PreparedStatement
+ object and returns the result set generated by the query.
+ @returns
+ the ResultSet object
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XResultSet executeQuery() raises (SQLException);
+
+ /** executes the SQL INSERT, UPDATE or DELETE statement in this
+ com::sun::star::sdbc::PreparedStatement
+ object.
+
+ In addition, SQL statements that return nothing, such as
+ SQL DDL statements, can be executed.
+ @returns
+ either the row count for INSERT, UPDATE or DELETE statements; or 0 for SQL statements that return nothing
+ @throws SQLException
+ if a database access error occurs.
+ */
+ long executeUpdate() raises (SQLException);
+
+ /** executes any kind of SQL statement.
+
+
+ next
+ will implicitly close it.
+ The ResultSet's warning chain is cleared when a new row is read.
+ isAtLast
+ may be expensive because the SDBC driver might need to fetch ahead one row in order
+ to determine whether the current row is the last row in the result set.
+ absolute(-1)
+ positions the
+ cursor on the last row,
+ absolute(-2)
+ indicates the next-to-last row, and so on.
+ absolute(1)
+ is the same as calling com::sun::star::sdbc::XResultSet::first().
+ Calling moveToPosition(-1)
is the same as calling
+ moveToLast()
.
+ relative(0)
+ is valid, but does not change the cursor position.
+ relative(1)
+ is different from calling
+ com::sun::star::sdbc::XResultSet::next()
+ because is makes sense to call
+ next()
+ when there is no current row, for example, when the cursor is positioned before
+ the first row or after the last row of the result set.
+ previous()
+ is not the same as
+ relative(-1)
+ because it makes sense to call
+ previous()
+ when there is no current row.
+ refreshRow
+ method provides a way for an application to
+ explicitly tell the SDBC driver to refetch a row(s) from the
+ database. An application may want to call
+ refreshRow
+ when caching or prefetching is being done by the SDBC driver to
+ fetch the latest value of a row from the database. The SDBC driver
+ may actually refresh multiple rows at once if the fetch size is
+ greater than one.
+ All values are refetched subject to the transaction isolation
+ level and cursor sensitivity. If
+ refreshRow
+ is called after calling
+ updateXXX
+ , but before calling
+ com::sun::star::sdbc::XResultSet::updateRow()
+ , then the updates made to the row are lost.
+ Calling the method
+ refreshRow
+ frequently will likely slow performance.
+ @throws SQLException
+ if a database access error occurs.
+ */
+ void refreshRow() raises (SQLException);
+
+ /** indicates whether the current row has been updated. The value returned
+ depends on whether or not the result set can detect updates.
+ @returns
+ `TRUE` if successful
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean rowUpdated() raises (SQLException);
+
+ /** indicates whether the current row has had an insertion. The value returned
+ depends on whether or not the result set can detect visible inserts.
+ @returns
+ `TRUE` if successful
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean rowInserted() raises (SQLException);
+
+ /** indicates whether a row has been deleted. A deleted row may leave
+ a visible "hole" in a result set. This method can be used to
+ detect holes in a result set. The value returned depends on whether
+ or not the result set can detect deletions.
+ @returns
+ `TRUE` if successful
+ @throws SQLException
+ if a database access error occurs.
+ */
+ boolean rowDeleted() raises (SQLException);
+
+ /** returns the Statement that produced this
+ com::sun::star::sdbc::ResultSet
+ object. If the result set was generated some other way, such as by an
+ com::sun::star::sdbc::XDatabaseMetaData
+ method, this method returns `NULL`.
+ @returns
+ the statement object
+ @throws SQLException
+ if a database access error occurs.
+ */
+ com::sun::star::uno::XInterface getStatement() raises (SQLException);
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XResultSetMetaData.idl b/offapi/com/sun/star/sdbc/XResultSetMetaData.idl
new file mode 100644
index 000000000..77bf257d7
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/XResultSetMetaData.idl
@@ -0,0 +1,255 @@
+/* -*- 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_sdbc_XResultSetMetaData_idl__
+#define __com_sun_star_sdbc_XResultSetMetaData_idl__
+
+#include updateXXX
+ method(s) and before calling
+ com::sun::star::sdbc::XResultSetUpdate::updateRow()
+ to rollback the updates made to a row. If no updates have been made or
+ updateRow
+ has already been called, then this method has no
+ effect.
+ updateXXX
+ methods prior to
+ inserting the row into the result set.
+ updateXXX
+ ,
+ getXXX
+ ,
+ and
+ com::sun::star::sdbc::XResultSetUpdate::insertRow()
+ methods may be
+ called when the cursor is on the insert row. All of the columns in
+ a result set must be given a value each time this method is
+ called before calling
+ insertRow
+ . The method
+ updateXXX
+ must be called before a
+ getXXX
+ method can be called on a column value.
+ Map
+ object for the custom mapping of the SQL structure or distinct type
+ that is being retrieved.
+ @param columnIndex
+ the first column is 1, the second is 2,
+ @param typeMap
+ the map of types which should be used to get the column value
+ @returns
+ the column value; if the value is SQL NULL, the result is null
+ @throws SQLException
+ if a database access error occurs.
+ */
+ any getObject([in]long columnIndex,
+ [in]com::sun::star::container::XNameAccess typeMap)
+ raises (SQLException);
+
+ /** gets a REF(<structured-type>) column value from the current row.
+ @param columnIndex
+ the first column is 1, the second is 2,
+ @returns
+ the column value; if the value is SQL NULL, the result is null
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XRef getRef([in]long columnIndex) raises (SQLException);
+
+ /** gets a BLOB value in the current row.
+ @param columnIndex
+ the first column is 1, the second is 2,
+ @returns
+ the column value; if the value is SQL NULL, the result is null
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XBlob getBlob([in]long columnIndex) raises (SQLException);
+
+ /** gets a CLOB value in the current row of this
+ ResultSet
+ object.
+ @param columnIndex
+ the first column is 1, the second is 2,
+ @returns
+ the column value; if the value is SQL NULL, the result is null
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XClob getClob([in]long columnIndex) raises (SQLException);
+
+ /** gets a SQL ARRAY value from the current row of this
+ ResultSet
+ object.
+ @param columnIndex
+ the first column is 1, the second is 2,
+ @returns
+ the column value; if the value is SQL NULL, the result is null
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XArray getArray([in]long columnIndex) raises (SQLException);
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XRowSet.idl b/offapi/com/sun/star/sdbc/XRowSet.idl
new file mode 100644
index 000000000..cb647e337
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/XRowSet.idl
@@ -0,0 +1,74 @@
+/* -*- 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_sdbc_XRowSet_idl__
+#define __com_sun_star_sdbc_XRowSet_idl__
+
+#include
+ It must read each of the attributes or elements of the SQL
+ type from the given input stream. This is done
+ by calling a method of the input stream to read each
+ item, in the order that they appear in the SQL definition
+ of the type. The method
+ readSQL
+ then assigns the data to appropriate fields or elements (of this
+ or other objects).
+
+ Specifically, it must call the appropriate
+ XSQLInput.readXXX
+ method(s) to do the following:
+ for a Distinct Type, read its single data element;
+ for a Structured Type, read a value for each attribute of the SQL type.
+ SQLInput.readXXX
+ method on the stream.
+
+ It must write each of the attributes of the SQL type to the given output
+ stream. This is done by calling a method of the output stream to write
+ each item, in the order that they appear in the SQL definition of the type.
+ Specifically, it must call the appropriate
+ XSQLOutput.writeXXX
+ method(s) to do the following:
+ for a Distinct Type, write its single data element;
+ for a Structured Type, write a value for each attribute of the SQL type.
+ SQLInput
+ methods.
+ getObject
+ is called with an object of a service implementing the interface
+ SQLData
+ , the SDBC driver calls the method
+ com::sun::star::sdbc::XSQLData::getSQLType()
+ to determine the SQL type of the user-defined type (UDT) being custom mapped.
+ The driver creates an instance of
+ com::sun::star::sdbc::XSQLInput
+ ,
+ populating it with the attributes of the UDT. The driver then passes the input
+ stream to the method
+ com::sun::star::sdbc::XSQLData::readSQL()
+ , which in turn calls the
+ XSQLInput.readXXX
+ methods in its implementation for reading the attributes from the input stream.
+
+ A type map is registered with the stream by the SDBC driver before the
+ stream is passed to the application.
+
+
+ When the datum at the head of the stream is a SQL NULL,
+ the method returns `VOID`. If the datum is a SQL structured or distinct
+ type, it determines the SQL type of the datum at the head of the stream,
+ constructs an object of the appropriate service, and calls the method
+ com::sun::star::sdbc::XSQLData::readSQL()
+ on that object, which reads additional data
+ from the stream using the protocol described for that method.
+
+
+ The driver then creates an instance of
+ XSQLOutput
+ and passes it to the method
+ com::sun::star::sdbc::XSQLData::writeSQL()
+ . The method
+ writeSQL
+ in turn calls the appropriate
+ XSQLOutput.writeXXX
+ methods to write data from the
+ com::sun::star::sdbc::XSQLData
+ object to the
+ XSQLOutput
+ output stream as the representation of a SQL user-defined type.XSQLData
object.
+
+
+ XSQLData
+ object is
+ `NULL`
+ , this method writes an SQL NULL to the stream.
+ Otherwise, it calls the
+ com::sun::star::sdbc::XSQLData::writeSQL()
+ method of the given object, which
+ writes the object's attributes to the stream.
+ The implementation of the method
+ XSQLData::writeSQL()
+ calls the appropriate
+ XSQLOutput.writeXXX
+ method(s) for writing each of the object's attributes in order.
+
+ The attributes must be read from an
+ com::sun::star::sdbc::XSQLInput
+ input stream and written to an
+ XSQLOutput
+ output stream in the same order in which they were
+ listed in the SQL definition of the user-defined type.
+ execute
+ methods implicitly
+ close a statement's current ResultSet if an open one exists.
+ execute
+ method executes a SQL statement and indicates
+ the form of the first result. You can then use
+ com::sun::star::sdbc::XMultipleResults::getResultSet()
+ or
+ com::sun::star::sdbc::XMultipleResults::getUpdateCount()
+ to retrieve the result, and
+ com::sun::star::sdbc::XMultipleResults::getMoreResults()
+ to move to any subsequent result(s).
+ Statement
+ object.
+ @returns
+ the connection that produced this statement
+
+ @throws SQLException
+ if a database access error occurs.
+ */
+ XConnection getConnection() raises (SQLException);
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XStruct.idl b/offapi/com/sun/star/sdbc/XStruct.idl
new file mode 100644
index 000000000..7b512d5ea
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/XStruct.idl
@@ -0,0 +1,99 @@
+/* -*- 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_sdbc_XStruct_idl__
+#define __com_sun_star_sdbc_XStruct_idl__
+
+#include Struct
+ object contains a value for each attribute
+ of the SQL structured type that it represents.
+ By default, an instance of
+ Struct
+ is valid as long as the
+ application has a reference to it.
+ Struct
+ object represents.
+ @returns
+ the name of the SQL type.
+ @throws SQLException
+ if a database access error occurs.
+ */
+ string getSQLTypeName() raises (SQLException);
+
+
+ /** produces the ordered values of the attributes of the SQL
+ structured type that this
+ Struct
+ object represents.
+ Struct
+ object represents, the driver uses
+ the connection type mapping.
+ @param typeMap
+ is a map object that contains mappings of SQL type names to
+ services. If the
+ typeMap
is
+ `NULL`
+ , the type-map
+ associated with the connection for customizations of the type-mappings
+ is used.
+ @returns
+ an array containing the ordered attribute values.
+ @throws SQLException
+ if a database access error occurs.
+ */
+ sequence