Skip to main content

jaydebeapi-hsqldb

This project is based on JayDeBeApi and contains modifications to support sqlalchemy-hsqldb, an SQLAlchemy dialect for HyperSQL 2.0.

Installation

A package for installing jaydebeapi-hsqldb from pypi.org will soon be available To install jaydebeapi-hsqldb from pypi.org, open a command prompt and type:

pip install jaydebeapi-hsqldb

Alternatively the module can be downloaded from its repository on GitHub:

jaydebeapi-hsqldb repository

Use the ‘pip install <path>’ syntax to install, where <path> points to where your local copy is installed, e.g.

pip install ./jaydebeapi-hsqldb

Post-install Configuration

Your system needs to know where the Java Runtime Environment is. If not detected automatically you may need to add ‘JAVA_HOME’ or ‘JRE_HOME’ to your environment variables.

set "JAVA_HOME=C:\Program Files\Java\jre-1.8\bin"

Getting Started

The code example found in this section is provided as a quick hint on how to connect to a HyperSQL server. You will need to update the parameters passed to the connect method to reflect your system’s configuration.

The ‘jclassname’ parameter, a.k.a. classpath, should be set to HyperSQL’s JDBCDriver class, i.e. ‘org.hsqldb.jdbc.JDBCDriver’

The ‘url’ parameter will depend on your HyperSQL server’s configuration. This can be fairly complex, and rather explain it here I’ll direct you to the JDBCConnection documentation on hsqldb.org

The ‘driver_args’ parameter can be a sequence or dictionary, as described in the documentation for the jaydebeapi.connect method.

The ‘jars’ parameter needs to include the location of your HSQLDB jar file,

import jaydebeapi_hsqldb as jaydebeapi

jclassname = 'org.hsqldb.jdbc.JDBCDriver'               # driver path
url = 'jdbc:hsqldb:hsql://localhost/db1'                # connection string
driver_args = ['SA', '']                                                # username and password
jars = ('/PROGS/HSQLDB/hsqldb-osgi-jdk8.jar',)  # location of HSQLDB jar

try:
        conn = jaydebeapi.connect(
                jclassname,
                url,
                driver_args,
                jars
        )
        curs = conn.cursor()
        curs.execute('VALUES(DATABASE_VERSION())')
        version = curs.fetchone()[0]
        print(f'\nSuccessfully connected!\nHSQLDB version: {version}\n')
        curs.close()
        conn.close()
except Exception as e:
        # Connection failed...
        print(f'\n{repr(e)}\n{str(e)}\n')

Troubleshooting

This project was coded and tested on a 64-bit Windows system. It should work on other platforms too, but you may find the code examples and docs need adapting.

If you’re struggling to get jaydebeapi-hsqldb working, here are a few things you can try:

  • Avoid mixing 32-bit and 64-bit software components

  • If the Java Runtime Environment (JRE) is not automatically detected you may need to add ‘JAVA_HOME’ or ‘JRE_HOME’ to your environment variables.

  • If you suspect a permissions issue, try installing and running with an administrator account.

  • If you suspect a firewall issue, temporarily disable the firewall to see if this is the case.

  • If you suspect some other configuration issue, ensure all paths specified are correct. Use back slashes or forward slashes as appropriate for your OS. Do they need escaping?

  • Submit a question via StackOverflow!

    It’s quite possible others have already encountered the same issue and SO can often provide a quick response. Tag your question with an appropriate tag, such as ‘jaydebeapi-hsqldb’, which I can then monitor.

If you think you’ve found a bug please feel welcome to submit a report via GitHub:

Known Issues

  • This release contains debug code and may halt unexpectedly when new datatypes are encountered.

Changelog

0.0.3 Added support for more data types. 0.0.1 Initial release.

Metadata

Release files for jaydebeapi-hsqldb 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jaydebeapi-hsqldb 0.0.3
File Size Uploaded
jaydebeapi_hsqldb-0.0.3.tar.gz 35.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jaydebeapi-hsqldb 0.0.3
File Interpreter ABI Platform
jaydebeapi_hsqldb-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 64.7 kB

Release files / jaydebeapi_hsqldb-0.0.3.tar.gz

Download URL jaydebeapi_hsqldb-0.0.3.tar.gz
Size 35.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ea84d2c2a31e1b7aecfd6c8cf2f954b615da0da685cf863b80e2085ead13b0ac
BLAKE2b-256 checksum
How to use checksums
0016ee2c3373180b98739661444c2eca3203b362d71c9cf1be04a2ed713e018d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.9

Release files / jaydebeapi_hsqldb-0.0.3-py3-none-any.whl

Download URL jaydebeapi_hsqldb-0.0.3-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8da43e1fc2c2a7b877a4d1b696271f3816735667062fe6e31f96b898127f532
BLAKE2b-256 checksum
How to use checksums
1334dbaadaf17e09efbe218a619d031cb9cd0279a0b8bbb9576f7624100e1707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page