hsqldb

How to abort/cancel HSQLDB query

雨燕双飞 提交于 2019-12-13 18:31:37
问题 I have a Java SE application using JPA provided by Hibernate and a HSQL database. The application queries the database with EntityManagers for information in order to draw charts on the screen. While the query is executing, the area for the chart has the typical spinning icon to let the user know that it's working. Some queries take a long time, and I want to have the feature to abort/cancel the query. I know I can unwrap the EntityManager and get the Hibernate Session and call cancelQuery(),

Selecting from a HSQLDB table with a BIT column

孤街醉人 提交于 2019-12-13 18:10:40
问题 I have a table with a column of data type bit . > CREATE MEMORY TABLE Dummy (name varchar(10), flag bit) > INSERT INTO Dummy VALUES ('foo', 1) > INSERT INTO Dummy VALUES ('bar', 0) > INSERT INTO Dummy VALUES ('foo2', true) > INSERT INTO Dummy VALUES ('bar2', false) > select name from Dummy where flag=1 foo2 > select name from Dummy where flag=true foo2 Why don't I get foo ? How are the 0 and 1 bits converted to booleans? It seems that both are false and I can't differentiate between them. (By

how to use foreign-keys with hsql create table?

假装没事ソ 提交于 2019-12-13 18:06:07
问题 could someone explain me how to use foreign keys in hsql? I would like it in an create table, but working alter table is also ok. I am working without tools, just in eclipse whats wrong with the hsql code? CREATE TABLE user( t_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1, INCREMENT BY 1) PRIMARY KEY, name VARCHAR(30), lastname VARCHAR(30), email VARCHAR(30), --FOREIGN KEY (b_id) REFERENCES bookingnumber(b_id) ); CREATE TABLE bookingnumber ( b_id INTEGER PRIMARY KEY ); ALTER TABLE

Prevent database shutdown command from Spring Boot

折月煮酒 提交于 2019-12-13 17:24:52
问题 When I run my Spring Boot application (from within Intellij IDEA) and either trigger a stop, restart or automatic redeploy of the application; something is issuing a shutdown command to my HSQLDB. I run a HSQLDB (v.2.3.4) in Server mode from an external terminal window. HSQLDB Server log at the moment I restart or stop my Spring Boot application: [Server@4f023edb]: Initiating shutdown sequence... [Server@4f023edb]: Shutdown sequence completed in 101 ms. [Server@4f023edb]: 2017-05-05 21:47:01

what does null entities are not supported by org.hibernate.event.def.EventCache mean?

蓝咒 提交于 2019-12-13 14:41:03
问题 I am getting the error at the point I try to save an entity. I only get this error when I have booted up my server, not when I run my unit tests using dbunit. I am trying to save an association. My unit test should be the exact same condition as that which I am encountering when manually testing. I am adding a new entity on one end of the relationship where no relationships existed before. I am using HSQLDB with the unit tests and the web app is using SQL Server. The searches I have performed

How to get only repeated records in a table?

不打扰是莪最后的温柔 提交于 2019-12-13 14:37:54
问题 I couldn't figure out how better to ask this question, so my searches became desperate. I have a table with three columns(Column1, Column2, Column3). There are lots of records consisted of different and same values in it. I want to get only the exactly same records as column1, column2 and column3 values. How can I get them in the fastest query in general SQL? And especially HSQLDB? Besides, if my table has 4 columns (+ Column4) but still I need same records of column1,column2 and column3

Using java.util.logging with JDBC drivers for the HyperSQL Database Engine

﹥>﹥吖頭↗ 提交于 2019-12-13 13:17:41
问题 After searching for the answers to my questions Implementing logging in a Java application and Using the java.util.logging package in a Swing application about the java.util.logging package, I have tracked down the problem and want to share my solution here. I am posting this as a new question to (hopefully) give a concise statement of the actual problem (which is not entirely clear in my previous questions because I was asking the wrong question) as well as to give a (hopefully) clear answer

Change SessionFactory datasource jdbcurl late in runtime

孤街醉人 提交于 2019-12-13 12:11:46
问题 I'm writing a desktop java application for an environment without a network connection. I'm trying to store the application data as securely as I can in an encrypted in-process hsqldb, with an unencrypted user information hsqldb. Hsqldb requires that the crypto_key be set in the jdbcurl when the connection is created. My application uses hibernate to do persistence and Spring to do configuration and injection. My current scheme is to store username, password hash, salt and the encrypted

HSQLDB UNIQUE constraint and SQL Array Type

流过昼夜 提交于 2019-12-13 06:27:17
问题 I am developing with HSQLDB 2.2.9. HSQLDB is one of the RDBMS's out there that supports the SQL Array type and I want to use this capability to address some functionality in my database. I've been running some command line queries as I develop my database, but I am not sure how the UNIQUE constraint is handled by HSQLDB when declared for a column of type VARCHAR(24) ARRAY[]. The DDL I am using follows: CREATE CACHED TABLE Clients ( cli_id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,

HSQLDB 2.2 skipping certain entities and not creating tables for them

筅森魡賤 提交于 2019-12-13 04:28:08
问题 I am working with Hibernate 3.5.5 and HSQLDB 2.2.9 . I use JPA semantics to define Entities and have around 10 entities. For some unknown reason, the HSQLDB doesn't seem to be picking three entities as I don't find the corresponding tables in the HSQLDB explorer and any reference to those tables result in SQL exception user lacks privilege or object not found: <TableName> . All the three entities are in the same format as the other ones and as follows: @Entity @Table(name = "<TABLE_NAME>")