The embedded SQLite driver for LibreOffice
Ce document en français.
The use of this software subjects you to our Terms Of Use.
SQLiteOOo is part of a Suite of LibreOffice and/or OpenOffice extensions allowing to offer you innovative services in these office suites.
This extension allows you to use SQLite JDBC database in embedded mode, making the database portable (a single odb file).
It allows you to take advantage of the ACID properties of the underlying SQLite database.
Being free software I encourage you:
In short, to participate in the development of this extension.
Because it is together that we can make Free Software smarter.
Due to issue #156471 and following PR#154989, the SQLiteOOo extension requires LibreOffice version 24.2.x minimum to work.
The SQLiteOOo extension uses the jdbcDriverOOo extension to work.
It must therefore meet the requirement of the jdbcDriverOOo extension.
If you are using LibreOffice on Linux and LibreOffice was installed with the package manager, Your Python packages may be system-provided and outdated. The extension’s logging will allow you to check if this is the case. It is accessible via the menu: Tools -> Options -> LibreOffice Base -> Embedded SQLite driver -> View log -> System Info and requires restarting LibreOffice after activation.
If outdated packages appear, you can update them with the command:
pip install --upgrade <package-name>
For more information see: What has been done for version 1.1.0.
It seems important that the file was not renamed when it was downloaded.
If necessary, rename it before installing it.
Install jdbcDriverOOo.oxt extension
This extension is necessary to use SQLite version 3.42.0.0 with all its features.
Install SQLiteOOo.oxt extension
Restart LibreOffice after installation.
Be careful, restarting LibreOffice may not be enough.
soffice
and using the key combination Ctrl + C
if after stopping LibreOffice, the terminal is not active (no command prompt).After restarting LibreOffice, you can ensure that the extension and its driver are correctly installed by checking that the io.github.prrvchr.SQLiteOOo.Driver
driver is listed in the Connection Pool, accessible via the menu: Tools -> Options -> LibreOffice Base -> Connections. It is not necessary to enable the connection pool.
If the driver is not listed, the reason for the driver failure can be found in the extension’s logging. This log is accessible via the menu: Tools -> Options -> LibreOffice Base -> Embedded SQLite Driver -> Logging Options.
The SQLiteLogger
logging must first be enabled and then LibreOffice restarted to get the error message in the log.
Remember to first update the version of the Java JRE or JDK installed on your computer, this extension need the new version of jdbcDriverOOo that requires Java version 17 or later instead of Java 11 previously.
In LibreOffice / OpenOffice go to File -> New -> Database…:
In step: Select database:
In step: Save and proceed:
Have fun…
SQLiteOOo is an com.sun.star.sdbc.Driver UNO service written in Python.
It is an overlay to the jdbcDriverOOo extension allowing to store the SQLite database in an odb file (which is, in fact, a compressed file).
Its operation is quite basic, namely:
.
+ odb_file_name
+ .lck
is created in the location of the odb file where all SQLite files are extracted from the database directory of the odb file (unzip)./sqlite
.The main purpose of this mode of operation is to take advantage of the ACID characteristics of the underlying database in the event of an abnormal closure of LibreOffice.
On the other hand, the function: file -> Save has no effect on the underlying database. Only closing the odb file or saving it under a different name (File -> Save As) will save the database in the odb file.
Normally, the extension is created with Eclipse for Java and LOEclipse. To work around Eclipse, I modified LOEclipse to allow the extension to be created with Apache Ant.
To create the HyperSQLOOo extension with the help of Apache Ant, you need to:
source/SQLiteOOo/
build.properties
so that the office.install.dir
and sdk.dir
properties point to the folders where LibreOffice and its SDK were installed, respectively.ant
dist/
LibreOffice 24.2.1.2 - Lubuntu 22.04
LibreOffice 24.8.0.3 (x86_64) - Windows 10(x64) - Python version 3.9.19 (under Lubuntu 22.04 / VirtualBox 6.1.38)
I encourage you in case of problem 😕
to create an issue
I will try to solve it 😄
The absence or obsolescence of jdbcDriverOOo extension necessary for the proper functioning of SQLiteOOo now displays an error message.
Many other things…
pip install requirements.txt
java.sql.Statement.getGeneratedKeys()
interface and allows the use of the com.sun.star.sdbc.XGeneratedResultSet interface.sdbc:embedded:sqlite
.Add new language for internationalization…
Anything welcome…