+++ This bug was initially created as a clone of Bug #51523 +++ LibreOffice does not support the SQL INTERVAL datatype. That is the datatype to store time *durations*, rather than a point in time (like DATE, TIME, TIMESTAMP). Our embedded HSQLDB 1.8 also does not support it, but that is no reason not to support it cleanly when connecting to database backends that *do* support it. Places that need to be changed: 1) offapi/com/sun/star/sdbc/DataType.idl needs a value for INTERVAL 2) connectivity/inc/connectivity/FValue.hxx: class ORowSetValue needs to be adapted to handle values of that type. Also connectivity source/commontools/FValue.cxx and undoubtedly many other places, such as source/commontools/DateConversion.cxx, etc.
Changed status to "NEW"
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Adding self to CC if not already on
Migrating Whiteboard tags to Keywords: (easyHack, difficultyInteresting, skillCpp, skillSql) [NinjaEdit]
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Hi, I could not add INTERVAL selection to datatypes list. Because I could not find associated .ui file. How can i find? Can you help me? Thank you.
(In reply to kerem from comment #6) > I could not add INTERVAL selection to datatypes list. Because I could not > find associated .ui file. How can i find? Can you help me? Before starting to change UI, it needs to be supported in the backend. See comment 0, "places that need to be changed". Did you do that already?
(In reply to Lionel Elie Mamane from comment #7) > Before starting to change UI, it needs to be supported in the backend. See > comment 0, "places that need to be changed". Did you do that already? Yes, i changed in necessary places. But i am not sure. Because i still haven't find INTERVAL data type. Shall I commit my changes?
Hello, Latest versions of HSQLDB seems to support interval data types. Should it be upgraded first?
(In reply to Gökay ŞATIR from comment #9) > Hello, > > Latest versions of HSQLDB seems to support interval data types. Should it be > upgraded first? No, we want to remove embedded HSQLDB completely in favour of Firebird.
Is there an ongoing discussion about which db system to choose? Like this one: https://ask.libreoffice.org/en/question/88866/base-firebird-vs-hsqldb-embedded-database/ Or is the decision is made already? I think SQLite could again be the candidate. Its latest versions support multiple reads at the same time, it handles multiple connections well. SQLite just needs a wrapper for data types, which can be implemented on top of it. Also, it has amalgamation, i personally find that feature valuable.
(In reply to Gökay ŞATIR from comment #11) > Is there an ongoing discussion about which db system to choose? Like this > one: > https://ask.libreoffice.org/en/question/88866/base-firebird-vs-hsqldb- > embedded-database/ > > Or is the decision is made already? > > I think SQLite could again be the candidate. Its latest versions support > multiple reads at the same time, it handles multiple connections well. > > SQLite just needs a wrapper for data types, which can be implemented on top > of it. > > Also, it has amalgamation, i personally find that feature valuable. There is no ongoing discussion. The decision was made long ago. Since then, there have been multiple Google Summer of Code projects and also TDF contracts to bring embedded Firebird into a production-ready status. I highly recommend you to contribute to the meta reports: https://bugs.documentfoundation.org/showdependencytree.cgi?id=116970&hide_resolved=1 https://bugs.documentfoundation.org/showdependencytree.cgi?id=116968&hide_resolved=1 There are some fundamental data type differences between HSQLDB and Firebird, but the upcoming Firebird 4.0 will solve a couple of these and hopefully a future version will solve more. This would make it easier to migrate existing database files from HSQLDB to Firebird. https://firebirdsql.org/file/community/conference-2019/1_firebird_on_the_road_from4_to_5.pdf Hopefully we will see 4.0 during the second quarter of 2020.
Hello, Thank you for your comment. I started to read bug reports and will try to debug & contribute to the progress.
I would like to work on this easyhack!
(In reply to Libreoffice user SSO from comment #14) > I would like to work on this easyhack! Feel free to assign to yourself.
Welcome. Start with comment 0, and let me know of any specific question you have. Feel free to add me as reviewer to patches on gerrit. Note that this is "difficultyInteresting", meaning it is classified as one of the more difficult ones, and not an "easy first task" if you have never worked on LibreOffice Base.
Okay.
(In reply to Lionel Elie Mamane from comment #16) > Welcome. Start with comment 0, and let me know of any specific question you > have. Feel free to add me as reviewer to patches on gerrit. > > Note that this is "difficultyInteresting", meaning it is classified as one > of the more difficult ones, and not an "easy first task" if you have never > worked on LibreOffice Base. Hi! I am having trouble finding the files mentioned in the comment 0 listed under "Places that need to be changed: 2)" Can you help me in figuring out the places that needs changes with respect to the current code base ?
(In reply to Libreoffice user SSO from comment #18) > (In reply to Lionel Elie Mamane from comment #16) > > Welcome. Start with comment 0, and let me know of any specific question you > > have. Feel free to add me as reviewer to patches on gerrit. > > > > Note that this is "difficultyInteresting", meaning it is classified as one > > of the more difficult ones, and not an "easy first task" if you have never > > worked on LibreOffice Base. > > Hi! I am having trouble finding the files mentioned in the comment 0 listed > under "Places that need to be changed: 2)" Can you help me in figuring out > the places that needs changes with respect to the current code base ? You did not specify which files you were having trouble with, but I checked and some had incorrect (changed over time?) paths. Keep in mind that you can always use the find command, like find . -name 'FValue.hxx' Correct paths for the mentioned files: include/connectivity/FValue.hxx connectivity/source/commontools/FValue.cxx connectivity/source/commontools/DateConversion.cxx
Pragat, your email provider rejects my answer to your email as suspected spam... Here's your answer: offapi/com/sun/star/sdbc/DataType.idl just defines constants to refer to a type, that the rest of the code uses to refer to the datatype. These constants are then used in the C++ code to refer to that type, usually with a switch() structure. It is up to the each code snippet making use of these constants to actually make sense of it, there is no central place that does the mapping. Each place where it is used has to "understand" that DATE is a date and how to treat a date, that NUMERIC is a numeric and how to treat a numeric, etc. See for example connectivity/source$ emacs commontools/FValue.cxx Just pick an unused constant, that is unused both in Java's JDBC https://docs.oracle.com/javase/8/docs/api/java/sql/JDBCType.html and in LibreOffice's current DataType.idl
Thanks a lot. Now this is very clear. By which nickname you go in the IRC? It'll be easier to communicate there ?
Pragat: you could try this that should make Lionel's emails reach you: https://www.lifewire.com/how-to-whitelist-a-sender-or-domain-in-gmail-1172106
I have added a filter to never send any emails from Lionel's email ID to spam. Now, Lionel's emails should reach me without any issue.
*** Bug 152585 has been marked as a duplicate of this bug. ***
Hello, is there any progress on this issue ? I would have suggested to help you, but I am only good with higher level languages like JS, Java and so on :( Best Regards, Alex
Seems like Pragat is not active, so let's reset the assignee.
Is this bug still active? Could I assign this to myself?
(In reply to potatochick2020 from comment #27) > Is this bug still active? Could I assign this to myself? Yes
https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-interval/ An interval value requires 16 bytes storage Postgres support interval data type, is that possible to start by trying to follow comment 0, and test it out by connect to an existing postgres database? Will this be in a good starting point?
(In reply to potatochick2020 from comment #29) > https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-interval/ > An interval value requires 16 bytes storage > > Postgres support interval data type, is that possible to start by trying to > follow comment 0, and test it out by connect to an existing postgres > database? > > Will this be in a good starting point? Yes, good plan. I was inspired by trying to use interval datatypes from a PostgreSQL database in LibreOffice to file this bug, actually.