offapi/com/sun/star/sdbc/PseudoColumnUsage.idl  |   52 +++++++++++++++++++
 offapi/com/sun/star/sdbc/RowId.idl              |   63 ++++++++++++++++++++++++
 offapi/com/sun/star/sdbc/XDatabaseMetaData3.idl |   11 +---
 3 files changed, 119 insertions(+), 7 deletions(-)

New commits:
commit 4e1bf615897c234dff5817e709bb8f1bcc146fe3
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Wed Feb 12 09:28:18 2025 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Fri Feb 14 15:35:51 2025 +0100

    Refine sync of SDBC with JDBC 4.3
    
    1) Implement more missing parts of the API and correct doxygen commands to 
properly refer to them:
       - Constant group com.sun.star.sdbc.PseudoColumnUsage (see 
https://devdocs.io/openjdk~21/java.sql/java/sql/pseudocolumnusage)
       - Interface com.sun.star.sdbc.RowId (see 
https://devdocs.io/openjdk~21/java.sql/java/sql/rowid)
    
    2) Document return type of getRowIdLifetime(); in Java it is a proper enum, 
but in IDL it is a generic long,
       but is supposed to come from constant group 
com.sun.star.sdbc.RowIdLifetime
    
    Change-Id: Idef8eacb6692cb0b9cacc2b21d1eda807b5ad802
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181467
    Tested-by: Julien Nabet <serval2...@yahoo.fr>
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Tested-by: Jenkins

diff --git a/offapi/com/sun/star/sdbc/PseudoColumnUsage.idl 
b/offapi/com/sun/star/sdbc/PseudoColumnUsage.idl
new file mode 100644
index 000000000000..e3ffbe389162
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/PseudoColumnUsage.idl
@@ -0,0 +1,52 @@
+/* -*- 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 .
+ */
+
+ module com {  module sun {  module star {  module sdbc {
+
+
+/** determines pseudo/hidden column usage.
+    @since LibreOffice 25.8
+ */
+constants PseudoColumnUsage
+{
+
+    /** indicates there are no restrictions on the usage of the pseudo/hidden 
columns.
+     */
+    const long NO_USAGE_RESTRICTIONS =  0;
+
+    /** indicates the pseudo/hidden column may only be used in a SELECT list.
+     */
+    const long SELECT_LIST_ONLY =  1;
+
+    /** indicates the usage of the pseudo/hidden column cannot be determined.
+     */
+    const long USAGE_UNKNOWN =  2;
+
+    /** indicates the pseudo/hidden column may only be used in a WHERE clause.
+     */
+    const long WHERE_CLAUSE_ONLY = 3;
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/RowId.idl 
b/offapi/com/sun/star/sdbc/RowId.idl
new file mode 100644
index 000000000000..57bbd4419929
--- /dev/null
+++ b/offapi/com/sun/star/sdbc/RowId.idl
@@ -0,0 +1,63 @@
+/* -*- 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 .
+ */
+
+ module com {  module sun {  module star {  module sdbc {
+
+
+/** provides SQL ROWID value which is a built-in type, a value of which can be 
thought of as an address for its identified row in a database table.
+    Whether that address is logical or, in any respects, physical is 
determined by its originating data source
+    for the releasing of resources acquired by the implementing object.
+
+    @since LibreOffice 25.8
+ */
+interface RowId
+{
+
+    /** Compares this RowId to the specified object.
+        @throws SQLException
+            if a database access error occurs.
+     */
+    boolean equals(Object obj);
+
+    /** Returns an array of bytes representing the value of the SQL ROWID 
designated by this RowId object.
+        @throws SQLException
+            if a database access error occurs.
+     */
+    byte[] getBytes();
+
+    /** Returns a hash code value of this RowId object.
+        @throws SQLException
+            if a database access error occurs.
+     */
+    long hashCode();
+
+    /** Returns a String representing the value of the SQL ROWID designated by 
this RowId object.
+        @throws SQLException
+            if a database access error occurs.
+     */
+    string toString();
+};
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdbc/XDatabaseMetaData3.idl 
b/offapi/com/sun/star/sdbc/XDatabaseMetaData3.idl
index d1d741ceaab1..b82b20399bdb 100644
--- a/offapi/com/sun/star/sdbc/XDatabaseMetaData3.idl
+++ b/offapi/com/sun/star/sdbc/XDatabaseMetaData3.idl
@@ -203,7 +203,6 @@ interface XDatabaseMetaData3 : XDatabaseMetaData2
      */
     XResultSet getFunctions([in]string catalog, [in]string schemaPattern, 
[in]string functionNamePattern) raises (SQLException);
 
-    /**
     /**
      * Retrieves a description of the given catalog's system or user
      * function parameters and return type.
@@ -337,8 +336,8 @@ interface XDatabaseMetaData3 : XDatabaseMetaData2
      *  <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional 
digits. Null is returned for data types where
      * DECIMAL_DIGITS is not applicable.
      *  <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 
2)
-     *  <LI><B>COLUMN_USAGE</B> String {@code =>} The allowed usage for the 
column.  The
-     *  value returned will correspond to the enum name returned by {@link 
PseudoColumnUsage#name PseudoColumnUsage.name()}
+     *  <LI><B>COLUMN_USAGE</B> String {@code =>} The allowed usage for the 
column. The
+     *  value returned will correspond to the name of a value defined in 
PseudoColumnUsage @see PseudoColumnUsage.idl
      *  <LI><B>REMARKS</B> String {@code =>} comment describing column (may be 
{@code null})
      *  <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the
      *       maximum number of bytes in the column
@@ -387,11 +386,10 @@ interface XDatabaseMetaData3 : XDatabaseMetaData2
 
     /**
      * Indicates whether this data source supports the SQL {@code  ROWID} type,
-     * and the lifetime for which a {@link  RowId} object remains valid.
+     * and the lifetime for which a RowId (see RowId.idl) object remains valid.
      *
-     * @return the status indicating the lifetime of a {@code  RowId}
+     * @return one of the constants from RowIdLifetime (see RowIdLifetime.idl)
      * @throws SQLException if a database access error occurs
-     * @see RowIdLifetime.idl
      */
     long getRowIdLifetime() raises (SQLException);
 
@@ -581,7 +579,6 @@ interface XDatabaseMetaData3 : XDatabaseMetaData2
 
     /**
      * Retrieves whether this database supports sharding.
-     * @implSpec
      * The default implementation will return {@code false}
      *
      * @return {@code true} if this database supports sharding;
  • core.git: offapi/com Michael Weghorn (via logerrit)
    • core.git: offapi/com Julien Nabet (via logerrit)

Reply via email to