hsqldb

How to form connection between HSQLDB and C# .net?

依然范特西╮ 提交于 2019-12-01 21:57:31
问题 How to form connection between HSQLDB and C# .net ? I have already looked at SharpHSQL and H2Sharp but not able to connect the HSQLDB. 回答1: try like this: Make sure you've already add hsqldb.dll, IKVM.OpenJDK.Core.dll, IKVM.OpenJDK.Jdbc.dll as reference. If you don't have the IKVM library, you can download here. At your C#: using java.sql; //add this. for create a connection: private Connection GetConnection() { DriverManager.registerDriver(new org.hsqldb.jdbcDriver()); Connection conn =

starting and stopping hsqldb from unit tests

孤人 提交于 2019-12-01 21:03:13
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 control the hsqldb server from my integration tests. I can't seem to get this to all work out though from code. Update: This appears to work along with having a hibernate.cfg.xml file in the classpath: org.hsqldb.Server.main(new String[]{}); and in my hibernate.cfg.xml file: <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> <property name="connection.url">jdbc:hsqldb:mem

How to form connection between HSQLDB and C# .net?

≡放荡痞女 提交于 2019-12-01 20:54:59
How to form connection between HSQLDB and C# .net ? I have already looked at SharpHSQL and H2Sharp but not able to connect the HSQLDB. try like this: Make sure you've already add hsqldb.dll, IKVM.OpenJDK.Core.dll, IKVM.OpenJDK.Jdbc.dll as reference. If you don't have the IKVM library, you can download here . At your C#: using java.sql; //add this. for create a connection: private Connection GetConnection() { DriverManager.registerDriver(new org.hsqldb.jdbcDriver()); Connection conn = DriverManager.getConnection("jdbc:hsqldb:hsql://[host]/[db name]", "[username]", "[password]"); return conn; }

Using Different Hibernate User Types in Different Situations

我是研究僧i 提交于 2019-12-01 18:11:58
I am using Hibernate + JPA as my ORM solution. I am using HSQL for unit testing and PostgreSQL as the real database. I want to be able to use Postgres's native UUID type with Hibernate, and use the UUID in its String representation with HSQL for unit testing (since HSQL does not have a UUID type). I am using a persistence XML with different configurations for Postgres and HSQL Unit Testing. Here is how I have Hibernate "see" my custom UserType: @Id @Column(name="UUID", length=36) @org.hibernate.annotations.Type(type="com.xxx.UUIDStringType") public UUID getUUID() { return uuid; } public void

Using Different Hibernate User Types in Different Situations

妖精的绣舞 提交于 2019-12-01 17:11:43
问题 I am using Hibernate + JPA as my ORM solution. I am using HSQL for unit testing and PostgreSQL as the real database. I want to be able to use Postgres's native UUID type with Hibernate, and use the UUID in its String representation with HSQL for unit testing (since HSQL does not have a UUID type). I am using a persistence XML with different configurations for Postgres and HSQL Unit Testing. Here is how I have Hibernate "see" my custom UserType: @Id @Column(name="UUID", length=36) @org

HSQLDB cryptic exception message: “feature not supported”

我与影子孤独终老i 提交于 2019-12-01 15:29:27
问题 I have JDBC code which inserts into a database table by executing a PreparedStatement. When I run the code on an in-memory HSQLDB database (as part of a JUnit test) I get a SQLFeatureNotSupportedException with the only information being the message "feature not supported" and the vendor code -1500. What I'm doing is a basic insertion into a table -- I can't imagine that this is unsupported in the latest HSQLDB. My code: public Observations saveOrUpdate(final Observations observations) { try {

Clojure jdbc create-table statement does not run unless using Leiningen REPL

故事扮演 提交于 2019-12-01 15:09:39
问题 I've got a small Clojure program that uses the Clojure JDBC tools to create a table in an HSQL database. However, it only seems to actually create the table if I run it from Leiningen's REPL. It does not create the table if I run the code using lein run or from my IDE (IntelliJ). There are no exceptions reported. In both cases, the output is just "(0)". Here's the code snippet: (ns tramway.core (:require [clojure.java.io :as io] [clojure.java.jdbc :as sql])) (def hsql-db {:subprotocol "hsqldb

How can I form a SQL Query for a HSQLDB that counts the # of rows per day using a BIGINT type for a date?

被刻印的时光 ゝ 提交于 2019-12-01 14:22:59
I have an HSQLDB, ver. 1.8.0, database with a sample schema with something like this: CREATE CACHED TABLE ENTRY (ENTRYID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY, REQID VARCHAR, REVOCATIONDATE BIGINT) I would like to retrieve a row count for every date, something like this: ENTRYID DATE_COUNT REVOCATIONDATE 1 10 2014-01-01 2 5 2014-01-02 3 15 2014-01-03 The problem is that the REVOCATIONDATE is a BIGINT instead of a normal date or timestamp. This is a vendor provided DB so, assume the schema is not allowed to be changed. How can I create a SQL query that will

How to configure Hikari CP for HSQL in a Spring(4) context?

爱⌒轻易说出口 提交于 2019-12-01 10:59:32
i want to use Hikari CP in my Spring 4.0.3 context but seems i am missing something. My bean configuration looks like: <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource"> <constructor-arg> <bean class="com.zaxxer.hikari.HikariConfig"> <constructor-arg> <props> <prop key="dataSource.driverClassName">${database.driver}</prop> <prop key="dataSource.jdbcUrl">${database.database.jdbc.url}</prop> <prop key="dataSource.port">${database.port}</prop> <prop key="dataSource.databaseName">${database.name}</prop> <prop key="dataSource.user">${database.user}</prop> <prop key="dataSource

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

橙三吉。 提交于 2019-12-01 09:01:39
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 if am running same query on it. My hunch here is that HSQL DB is not being populated with the data, is