---------- Forwarded message --------- From: Devansh Varshney <varshney.devansh...@gmail.com> Date: Sun, 14 Apr 2024 at 15:21 Subject: Re: ERROR: Published UNO API must not be changed incompatibly! tdf#51779 To: <libreoffice@lists.freedesktop.org>
Thanks for the reply (Pierre Vacher <prrv...@gmail.com> ) I did tried to do it and with my current knowledge I think the usage of getObejct() is complete w.r.t. SqlInterval https://gerrit.libreoffice.org/c/core/+/165012 - In the dbconversion.hxx and dbconversion.cxx files, I added the toSqlInterval and toDouble functions to convert between double and SqlInterval types. - In the FValue.cxx file, I updated the impl_fill function to handle the DataType::SQLINTERVAL case and retrieve the SQL INTERVAL value using the getObject method of the IValueSource interface and also updated the operator= assignment operator to handle the SqlInterval type. I need some feedback for the PR whether I am going in the right direction or not. Regarding the setObejct() are these file related - - connectivity/source/commontools/parameters.cxx - dbaccess/source/core/api/preparedstatement.cxx - connectivity/source/drivers/jdbc/PreparedStatement.cxx - connectivity/source/drivers/odbc/OPreparedStatement.cxx Regards, devansh On Sat, 13 Apr 2024 at 23:17, Devansh Varshney < varshney.devansh...@gmail.com> wrote: > 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 >