hsqldb

SQL - Add up all row-values of one column in a singletable

Hello Everybody, I've got a question regarding a SQL-select-query: The table contains several columns, one of which is an Integer-column called "size" - the task I'm trying to perform is query the table for the sum of all rows (their values), or to be more exact get a artifical column in my ResultSet called "overallSize" which contains ...

Problem with HSQLDB & SequenceGenerator

Hi, I have an entity which has an ID field: @Id @Column(name = "`U##ID_VOIE`") @GeneratedValue(generator = "VOIE_SEQ") private String id; The class has the sequence generator defined as well: @SequenceGenerator(name = "VOIE_SEQ", sequenceName = "VOIE_SEQ") and the Oracle schema has the requisite sequence present. Everything works ...

TDD with HSQLDB -- removing foreign keys

I'm using HSQLDB for data layer integration testing, which is great. However, I'm finding that my foreign key constraints are getting in the way of my tests. For example, to test a simple select on one table, I have to insert dummy data into five additional tables. This makes me want to throw things. I have JPA annotations throughout...

Creating an ER diagram for hsqldb that exports SQL

Hi fellows! I'm currently designing a DB scheme. I have to use hsqldb. - Normally I like creating an ER diagram, and I export the SQL source. Therefore I'm looking for a tool that automatically transforms my ER diagram into hsqldb sql code. Using MySQL Workbench or some sort of web interface (http://ondras.zarovi.cz/sql/demo/) seems to...

Inspect in memory hsqldb while debugging

We're using hdsqldb in memory to run junit tests which operate against a database. The db is setup before running each test via a spring configuration. All works fine. Now when a tests fails it can be convinient to be able to inspect the values in the in memory database. Is this possible? If so how? Our url is: jdbc.url=jdbc:hsqldb:m...

How to enumerate HSQLDB catalogs for clean, scripted shutdown

I'd like to script the clean shutdown of an HSQLDB 2.0.0-rc9 "Listener" (server). Is there a way to interrogate an HSQLDB server to determine the catalogs (databases) it is currently serving, either via sqltool or HSQL client programming? Background: If I understand correctly, safely shutting down an HSQLDB "Listener" process (an org....

Which is better H2 or HSQLDB?

HSQLDB 2.0 is soon to be released. I wonder if it will outperform H2 since, as far as I know, most users prefer H2 than HSQLDB. I am interested in the MVCC support of HSQLDB 2.0. I have learned that MVCC on H2 is still experimental. With regards to support/documentation, concurrency, performance, which is better between the two? ...

SQL query: Last but one rank for user

My table structure looks like this: create table rankings ( id IDENTITY NOT NULL, user_id INT NOT NULL, game_poule_id INT NOT NULL, rank INT NOT NULL, insertDate DATETIME NOT NULL, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, FOREIGN KEY (game_poule_id) REFERENCES game_poules(id) ON DELETE CA...

Problem connecting to Hsqldb via Hibernate when running a Eclipse GWT project.

Hi, I'm trying to run a simple GWT project where I'm trying to do a simple persitence via hibernate to a HSQLDB database. The database I'm using I have been using for at least 2 years with several osgi applications without any problems. So all I done is reused the same configuration and added a simple object mapping file. The problem I ...

Spring/Hibernate/Junit example of testing DAO against HSQLDB

Hi guys, I'm working on trying to implement a JUnit test to check the functionality of a DAO. (The DAO will create/read a basic object/table relationship). The trouble I'm having is the persistence of the DAO (for the non-test code) is being completed through an in-house solution using Spring/Hibernate, which eliminates the usual *.hb...

How do you delete the default database/schema in hsqldb

I've created an in memory hsqldb and am using the default database/schema. Now I want to drop and recreate the database programatically. How do I do that? Thanks Daniel ...

Hsqldb - how to remove the padding on char fields

I'm finding that Char fields are being padded. Is there any way to stop this happening. I've tried using the property SET PROPERTY "sql.enforce_strict_size" FALSE but doesn't seem to help. ...

HSQLdb permissions regarding OpenJPA

Hi! I'm (still) having loads of issues with HSQLdb & OpenJPA. Exception in thread "main" <openjpa-1.2.0-r422266:683325 fatal store error> org.apache.openjpa.persistence.RollbackException: user lacks privilege or object not found: OPENJPA_SEQUENCE_TABLE {SELECT SEQUENCE_VALUE FROM PUBLIC.OPENJPA_SEQUENCE_TABLE WHERE ID = ?} [code=-5501,...

Link a sequence with to an identity in hsqldb

In PostgreSql, one can define a sequence and use it as the primary key of a table. In HsqlDB, one can still accomplish creating an auto-increment identity column which doesn't link to any user defined sequence. Is it possible to use a user defined sequence as the generator of an auto-increment identity column in HsqlDB? Sample sql in ...

HSQLDB and in-memory files

Is it possible to setup HSQLDB in a way, so that the files with the db information are written into memory instead of using actual files? I want to use hsqldb to export some data structures together with hibernate mappings. Is is, however, not possible to write temporary files, so that I need to generate the files in-memory and return a ...

starting and stopping hsqldb from unit tests

I'm trying to create integration tests using hsqldb in an in memory mode. At the moment, I have to start the hsqldb server from the command line before running the unit tests. I would like to be able to be able to control the hsqldb server from my integration tests. I can't seem to get this to all work out though from code. Thanks, Case...

Using HSQLDB in production environments

I want to use HSQLDB in a production environment for stroring some data in memory and for data export using files. Does anybody have experience with using hsqldb in production environments? Is hsqldb treating server resources gracefully and does it cleanup unused resources properly? I've seen a critical post on those issues from red hat...

maven repository location for hsqldb 2.0

http://hsqldb.org/ - where is the maven repository for the latest version 2.0.0 bits ...

populating in memory hsqldb database from script

Is there a way that I can specify a script in the connection string pointing to my in memory hsqldb instance? I was looking at this article and it looks like it is possible, but I'm not sure how to formulate the string correctly or where to put the script file. Looking at the hsqldb documentation here it doesn't appear to be the case. ...

Can I execute SQL statements directly in a JDO environment?

I am using Datanucleus JDO on top of HSqlDb. I would like to execute the following SQL statement to tell HsqlDb to set the write delay to 0: "SET WRITE_DELAY 0" Is there a way I can do this from a JDO PersistenceManager or a PersistenceManagerFactory? On a sidenote: I have tried to modify write_delay by using the following connection ...