Code Monkey home page Code Monkey logo

hypersqlooo's Introduction

HyperSQLOOo logo Documentation

Ce document en français.

The use of this software subjects you to our Terms Of Use.

version 1.1.1

Introduction:

HyperSQLOOo 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 overcome bug 139538 for users of LibreOffice on Linux.
  • To use HyperSQL database in embedded mode, making the database portable (a single odb file).
  • To take advantage of the improvements offered by the jdbcDriverOOo extension:
    • The management of users and roles (groups).
    • The management of nanoseconds and time zones.
    • The management of java.sql.Array, java.sql.Blob, java.sql.Clob...
  • To replace the integrated HsqlDB 1.8 driver provided by LibreOffice / OpenOffice, a version that will soon be more than 20 years old, with a recent HsqlDB version of your choice.
  • To support the ACID properties of the underlying HsqlDB database.

Being free software I encourage you:

  • To duplicate its source code.
  • To make changes, corrections, improvements.
  • To open issue if needed.

In short, to participate in the development of this extension.
Because it is together that we can make Free Software smarter.


Requirement:

The HyperSQLOOo extension uses the jdbcDriverOOo extension to work.
It must therefore meet the requirement of the jdbcDriverOOo extension.

This extension cannot be installed together with the SQLiteOOo extension.
It's one or the other, but at the moment they can't work together (see issue #156471).

On Linux and macOS the Python packages used by the extension, if already installed, may come from the system and therefore may not be up to date.
To ensure that your Python packages are up to date it is recommended to use the System Info option in the extension Options accessible by:
Tools -> Options -> Base drivers -> Embedded HsqlDB Driver -> View log -> System Info
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.


Installation:

It seems important that the file was not renamed when it was downloaded.
If necessary, rename it before installing it.

Restart LibreOffice after installation.
Be careful, restarting LibreOffice may not be enough.

  • On Windows to ensure that LibreOffice restarts correctly, use Windows Task Manager to verify that no LibreOffice services are visible after LibreOffice shuts down (and kill it if so).
  • Under Linux or macOS you can also ensure that LibreOffice restarts correctly, by launching it from a terminal with the command soffice and using the key combination Ctrl + C if after stopping LibreOffice, the terminal is not active (no command prompt).

Use:

How to create a new database:

In LibreOffice / OpenOffice go to File -> New -> Database...:

HyperSQLOOo screenshot 1

In step: Select database:

  • select: Create a new database
  • in: Emdedded database: choose: Embedded HsqlDB Driver
  • click on button: Next

HyperSQLOOo screenshot 2

In step: Save and proceed:

  • adjust the parameters according to your needs...
  • click on button: Finish

HyperSQLOOo screenshot 3

Have fun...

How to migrate an embedded database:

If you want to migrate an integrated database (HsqlDB version 1.8.0) to a newer version (for example 2.7.2), follow these steps:

  1. Make a copy (backup) of your database (odb file).
  2. If not already installed, install this extension and the jdbcDriverOOo extension.
  3. Update driver archive of the HsqlDB driver in: Tools -> Options -> Base drivers -> JDBC driver -> JDBC drivers settings -> Driver archive -> Update, with a version 1.8.0.10.
  4. Restart LibreOffice / OpenOffice after changing the driver (hsqldb.jar).
  5. Open the odb file in Base (double click on the odb file).
  6. In Base go to: Tools -> SQL and type the SQL command: SHUTDOWN COMPACT or SHUTDOWN SCRIPT.
  • Repeat this procedure at step 3 using version 2.4.0 or 2.4.1 or 2.5.0.
  • Repeat this procedure at step 3 using version 2.7.2.

How does it work:

HyperSQLOOo is an com.sun.star.sdbc.Driver UNO service written in Python.
It is an overlay to the jdbcDriverOOo extension allowing to store the HyperSQL database in an odb file (which is, in fact, a compressed file).

Its operation is quite basic, namely:


Has been tested with:

  • OpenOffice 4.1.8 - Ubuntu 20.04 - LxQt 0.14.1

  • OpenOffice 4.1.8 - Windows 7 SP1

  • LibreOffice 7.0.4.2 - Ubuntu 20.04 - LxQt 0.14.1

  • LibreOffice 6.4.4.2 - Windows 7 SP1

  • LibreOffice 7.6.0.1 - Windows 10

  • LibreOffice 7.6.0.1 - Ubuntu 22.04

I encourage you in case of problem 😕
to create an issue
I will try to solve it 😄


Historical:

What has been done for version 0.0.1:

  • The writing of this driver was facilitated by a discussion with Villeroy, on the OpenOffice forum, which I would like to thank, because knowledge is only worth if it is shared...

  • Using the old version of HsqlDB 1.8.0 (can be easily updated).

  • Added a dialog box allowing to update the driver (hsqldb.jar) in: Tools -> Options -> Base drivers -> Embedded HsqlDB driver

  • Many other fix...

What has been done for version 0.0.2:

  • Now the driver automatically splits an odb when opened... This allow conversion of odb files produced by the built-in LibreOffice / OpenOffice HsqlDB driver 😉

  • Many other fix...

What has been done for version 0.0.3:

  • I especially want to thank fredt at hsqldb.org for:

    • His welcome for this project and his permission to use the HsqlDB logo in the extension.

    • The quality of its HsqlDB database.

  • Now works with OpenOffice on Windows.

  • When unzipping, a file name clash now displays a precise error.

  • Now correctly handles spaces in filenames and paths.

  • Many other fix...

What has been done for version 0.0.4:

  • Modification of Driver.py in order to make possible the use of the Uno service: com.sun.star.sdb.RowSet.

  • Many other fix...

What has been done for version 0.0.5:

  • Writing a DocumentHandler to allow:

    • The extraction of the database files contained in the odb file on connection.
    • Saving database files to odb file when closing it.
  • Rewrote Driver.py to allow:

    • Its operation with the new JDBC driver provided by the extension jdbcDriverOOo version 0.0.4.
    • The support for the new DocumentHandler to make odb files portable as they were in LibreOffice / OpenOffice with version 1.8 of HsqlDB.
  • Many other fix...

What has been done for version 1.0.0:

  • Renamed the extension from HsqlDBembeddedOOo to HsqlDriverOOo.

  • Integration of HyperSQL version 2.7.2.

What has been done for version 1.0.1:

  • Renamed the extension from HsqlDriverOOo to HyperSQLOOo.

  • Fixed bug 156511 occurring when using the com.sun.star.embed.XStorage interface. The workaround is to use the copyElementTo() method instead of moveElementTo(). Versions of LibreOffice 7.6.x and higher become usable.

What has been done for version 1.0.2:

  • The absence or obsolescence of jdbcDriverOOo extension necessary for the proper functioning of HyperSQLOOo now displays an error message.

  • Many other things...

What has been done for version 1.1.0:

  • All Python packages necessary for the extension are now recorded in a requirements.txt file following PEP 508.
  • Now if you are not on Windows then the Python packages necessary for the extension can be easily installed with the command:
    pip install requirements.txt
  • Modification of the Requirement section.

What has been done for version 1.1.1:

What remains to be done for version 1.1.1:

  • Add new language for internationalization...

  • Anything welcome...

hypersqlooo's People

Contributors

prrvchr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bryanchance

hypersqlooo's Issues

Error "user lacks privilege or object not found" after table creation

Hi @prrvchr !

I hope you're not tired of me, but I have another problem. This time with HyperSQLOOo extension.

I have installed both jdbcDriverOOo and HyperSQLOOo to LibreOffice as described here for using modern HsqlDB 2.7.

I created new database with embedded HsqlDB with one simple table.

Снимок экрана в 2023-11-26 21-29-33

Снимок экрана в 2023-11-26 21-30-07

Снимок экрана в 2023-11-26 21-30-22

Next when I open this table for data insertion this error shows:

Снимок экрана в 2023-11-26 21-30-52

Error details:

SQL Status: 42501
Error code: -5501

I run this SQL query manually to show all tables:

SELECT *
FROM   INFORMATION_SCHEMA.TABLES

But my table not listed in the output.

Issue described here reproduced both in Linux and Windows, also with latest LibreOffice 7.6.3 release.

Sample database file: mydb.odb.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.