hsqldb

HSQL Create Procedure Syntax doesn't seem to match the documentation

你离开我真会死。 提交于 2019-12-01 08:14:26
I am using HSQL as my in memory test db for running integration tests. In production, I have an oracle 10g database. The idea is to run the db create scripts that I used to create the db in oracle to create the same db in hsql for the integration tests. I'm running into roadblocks regarding differences in syntax, that despite indicating to HSQL that the syntax is oracle, I keep getting stuck on creating stored procedures. My test db bean is defined as such: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org

Problems with escaping table and field names in Derby and Hsqldb

◇◆丶佛笑我妖孽 提交于 2019-12-01 06:56:29
I'm having a problem with my ORMLite package . When I generate the schema for a table, I thought it would be a good practice to escape all entity names. This would protect some Java class or field name from being a SQL reserved word: CREATE TABLE "footable" ("stuff" VARCHAR(255)) I'm now adding "raw" query support so that ORMLite can help users perform their own queries. However, I find that with Derby and Hsqldb, the entity names cannot be used without escaping. For example, the following query: SELECT * FROM footable generates the following errors: Derby: ERROR 42X05: Table/View 'FOOTABLE'

Concept of In Memory Database and how to see if my data is being populated in HSQL DB?

白昼怎懂夜的黑 提交于 2019-12-01 06:30:35
问题 I am using HSQL in memory database for test purpose of my application and using SQL Server as main database, now when am doing test then HSQL Database is being populated with same data that I have in my SQL Server, now I am trying to test particular service which is retrieving data from Database(it would query MS Server if directly service is run or it will query HSQL Database if called from test) I am able to see data from MS Server when I run the query but HSQL Db does not return any data

HSQL Create Procedure Syntax doesn't seem to match the documentation

人盡茶涼 提交于 2019-12-01 06:09:27
问题 I am using HSQL as my in memory test db for running integration tests. In production, I have an oracle 10g database. The idea is to run the db create scripts that I used to create the db in oracle to create the same db in hsql for the integration tests. I'm running into roadblocks regarding differences in syntax, that despite indicating to HSQL that the syntax is oracle, I keep getting stuck on creating stored procedures. My test db bean is defined as such: <bean id="dataSource" class="org

Problems with escaping table and field names in Derby and Hsqldb

点点圈 提交于 2019-12-01 05:08:37
问题 I'm having a problem with my ORMLite package. When I generate the schema for a table, I thought it would be a good practice to escape all entity names. This would protect some Java class or field name from being a SQL reserved word: CREATE TABLE "footable" ("stuff" VARCHAR(255)) I'm now adding "raw" query support so that ORMLite can help users perform their own queries. However, I find that with Derby and Hsqldb, the entity names cannot be used without escaping. For example, the following

SQL standard UPSERT call

核能气质少年 提交于 2019-12-01 03:54:57
I'm looking for a standard SQL " UPSERT " statement. A one call for insert and update if exists. I'm looking for a working, efficient and cross platform call. I've seen MERGE , UPSERT , REPLACE , INSERT .. ON DUPLICATE UPDATE but no statement meets the needs. BTW I use MYSQL and HSQLDB for unitests. I understand that HSQLDB is limited and may not cover what I need, but I couldn't find a standard way even without it. A statement that only MYSQL and HSQLDB will also be enough for now. I've been looking around for a while and couldn't get an answer. My table: CREATE TABLE MY_TABLE ( MY_KEY

Unit tests of Hibernate based code on top of hsqldb 1.8.1.3 no longer work on hsqldb 2.2.9

主宰稳场 提交于 2019-12-01 02:09:37
问题 I frequently write unit tests of my database dependent code using an in-memory HSQL database as the testing database. Recently I decided to upgrade from 1.8.1.3 to 2.2.9 to take advantage of ROW_NUMBER() support that was added in the 2.x release branch. It seems that in some way, the new version is more strict than the old version. Using Hibernate (3.6.10) as the ORM, I might for example create a Configuration object to create a first SessionFactory , use that to populate the test data, then

HsqlException: data exception

南楼画角 提交于 2019-12-01 02:09:19
I am using hsqldb version 2.2.5 in my application sometimes I am getting org.hsqldb.HsqlException: data exception: string data, right truncation. So I want to know what are the possible reasons for that. I am not inserting any data like longvarchar in a varchar column. http://sourceforge.net/tracker/index.php?func=detail&aid=2993445&group_id=23316&atid=378131 I searched above link but could not get proper feedback. Given below the exception stack This exception is not happening frequently. So what could be the reason for that and how to set the data type length in script file to increase at

How to retrieve previously auto-generated PK ID value using JDBC and HSQLDB

[亡魂溺海] 提交于 2019-12-01 01:43:25
问题 I'm working with JDBC and HSQLDB 2.2.9. What's the most efficient and accurate way to insert a new row into a DB and, subsequently, retain its id (PK set to autoincrement) value? The reason I need to do this is probably pretty obvious, but I'll illustrate with an example for discussion: Say there's a Customer table that has a PersonId field with a FK constraint referring to a row from a Person table. I want to create a new Customer , but to do this I need to first create a new Person and use

HSQLDB issue: Starting the HSQL database from Java Code

寵の児 提交于 2019-12-01 01:34:28
when I have to run HSQLDB for my application i have to do it from command prompt, so I always double-click the Server.bat (batch file) to start the server which contain: java -classpath ..\war\WEB-INF\lib\hsqldb.jar org.hsqldb.Server -database test or type the start server command from command prompt. But, my question is that can I start the HSQL database server by coding in my java code directly, no need to start it separately from the java application? what will be the code? Note that I am using spring 2.5, spring seecurity 2.0.4 (annotation disable). Thank you. What about something like