ERROR: Published UNO API must not be changed incompatibly! tdf#51779

Pierre Vacher prrvchr at gmail.com
Sat Apr 13 19:46:17 UTC 2024


I manage DateTimeWithTimezone
<https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1util_1_1DateTimeWithTimezone.html>
in jdbcDriverOOo <https://prrvchr.github.io/jdbcDriverOOo/>.
I haven't touched the idl but I use the getter and setter getObject()
<https://github.com/prrvchr/jdbcDriverOOo/blob/master/source/jdbcDriverOOo/source/io/github/prrvchr/jdbcdriver/helper/DBTools.java#L868>
and setObject()
<https://github.com/prrvchr/jdbcDriverOOo/blob/master/source/jdbcDriverOOo/source/io/github/prrvchr/jdbcdriver/helper/DBTools.java#L760>
with as object the Struct corresponding to the data type.
I think you can make same with a DateTimeRange
<https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1util_1_1DateTimeRange.html>

Le sam. 13 avr. 2024 à 19:47, Devansh Varshney <
varshney.devansh614 at gmail.com> a écrit :

> Hi,
> Currently I have made changes regarding the support of the SQL INTERVAL
> and now working to get it fit with the XRow and the XColumn in the
> https://github.com/LibreOffice/core/blob/4695d84b78d04af6682961732ae92655e03f49eb/connectivity/source/commontools/FValue.cxx#L2133
> (PatchSet 5 - https://gerrit.libreoffice.org/c/core/+/165012/5 is related
> to this)
>
> But, I am now at this page -
> https://wiki.documentfoundation.org/Development/Incompatible_UNO_API_Changes
>
> As after making the entry in the offapi/com/sun/star/sdb/XColumn.idl and
> the offapi/com/sun/star/sdbc/XRow.idl  I got this after running the make -
>
>  [~/libreoffice]
>  devansh   51779_support_for_sql_interval   make
> mkdir -p /home/devansh/libreoffice/instdir
> /home/devansh/libreoffice/solenv/bin/install-gdb-printers -a
> /home/devansh/libreoffice/instdir -c
> make -j 3  -rs -f /home/devansh/libreoffice/Makefile.gbuild build
> [UNO] offapi
> [DBc] offapi
> [ECH] CustomTarget/instsetoo_native/setup/setuprc
> [ECH] CustomTarget/instsetoo_native/setup/versionrc
> [LOC] top level modules: libreoffice
> interface type com.sun.star.sdb.XColumn number of direct methods changed
> from 20 to 21
> ERROR: Published UNO API must not be changed incompatibly!
> (If published UNO API shall be changed incompatibly after all, see
> <
> https://wiki.documentfoundation.org/Development/Incompatible_UNO_API_Changes
> >.)
> make[1]: *** [/home/devansh/libreoffice/solenv/gbuild/UnoApiTarget.mk:48:
> /home/devansh/libreoffice/workdir/UnoApiTarget/offapi.rdb] Error 1
> make[1]: *** Deleting file
> '/home/devansh/libreoffice/workdir/UnoApiTarget/offapi.rdb'
> make: *** [Makefile:290: build] Error 2
>
> BugZilla -    https://bugs.documentfoundation.org/show_bug.cgi?id=51779
> Gerrit     -    https://gerrit.libreoffice.org/c/core/+/165012
>
> So, my question is should I go and make changes after the consensus or
> should I not make these changes as this will disrupt the backward
> compatibility and prevent disruptions for existing users and extensions.
>
> This is what I have added in the offapi/com/sun/star/sdb/XRow.idl
>
> /** gets the value of a column in the current row as an SQLINTERVAL value.
> @param columnIndex
> the first column is 1, the second is 2,
> @returns
> the column value; if the value is SQL NULL, the result is a
> default-constructed SqlInterval
> @throws SQLException
> if a database access error occurs.
> */
> com::sun::star::util::SqlInterval getSqlInterval([in]long columnIndex)
> raises (SQLException);
>
>
>
> and the offapi/com/sun/star/sdbc/XColumn.idl
>
> /** gets the value of a column in the current row as an SQL INTERVAL value.
> @returns
> the column value; if the value is SQL NULL, the result is a
> default-constructed SqlInterval
> @throws SQLException
> if a database access error occurs.
> */
> com::sun::star::util::SqlInterval getSqlInterval()
> raises (com::sun::star::sdbc::SQLException);
>
>
>
> Thanks and Regards,
> Devansh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240413/42a51af7/attachment.htm>


More information about the LibreOffice mailing list