[hibernate-dev] New version of HSQLDialect.java

Steve Ebersole steve at hibernate.org
Mon Jun 28 16:40:34 EDT 2010


Not really because such boolean support is not uniformly defined in
JDBC.  And generally speaking Hibernate is usually not using literal
values, but parameters and binding the values.

On Mon, 2010-06-28 at 21:16 +0100, fredt wrote:
> Hi,
> 
> We support two types of the temp table. One type is created with CREATE 
> GLOBAL TEMPORARY TABLE (since 1.8.0) with the definition stored in the 
> schema while each session has its private copy of the data. The other type 
> is fully private and is created with DECLARE LOCAL TEMPORARY TABLE (since 
> 2.0.0). (the crucial difference is between CREATE and DECLARE) and can be 
> DECLAREd in the middle of a transaction. The contents of both types are 
> cleared on commit, but you can add ON COMMIT PRESERVE ROWS to the end of the 
> definition if you want to keep it.
> 
> I understand Hibernate uses temporary tables to hold intermediate results in 
> a transaction. Therefore the DECLARE LOCAL ... definition is used in the new 
> dialect with v. 2.0.x
> 
> I am going to check another possible enhancement to the dialect, so I'd 
> better ask. Both v. 1.8 and 2.0 support the BOOLEAN type (you say "SELECT 
> ... WHERE booleancol" , "INSERT INTO T (booleancol) VALUES (TRUE)" ), in 
> addition v. 2.0 supports verbose boolean expressions "WHERE booleancol IS 
> TRUE" etc. Now, is it possible to get Hibernate to use the BOOLEAN type in 
> this way, and which methods of Dialect should be defined?
> 
> As suggested by Strong, I'll start a Jira issue once I get a resolution to 
> the BOOLEAN issue.
> 
> Fred
> ----- Original Message ----- 
> From: "Steve Ebersole" <steve at hibernate.org>
> To: "Fred Toussi" <fredt at users.sourceforge.net>
> Cc: <hibernate-dev at lists.jboss.org>
> Sent: 28 June 2010 20:25
> Subject: Re: [hibernate-dev] New version of HSQLDialect.java
> 
> 
> Hey Fred, thats awesome.
> 
> Curious whether y'all added temp table support?
> 
> On Sun, 2010-06-27 at 02:01 +0100, Fred Toussi wrote:
> > I have made changes and additions to HSQLDialect to work with HSQLDB v.
> > 2.0.x. The Hibernate unit tests now run well with HSQLDB 1.8.x and
> > 2.0.x.
> >
> > New snapshot jars of HSQLDB v. 2.0.1 (for jdk 1.5 or 1.6) are available
> > here: http://hsqldb.org/support/ and should be used in tests. These
> > reflect the HSQLDB SVN /base/trunk/ (see SourceForge project pages) The
> > GA 2.0.0 showed a few issues that have now been fixed.
> >
> > Version 2.0.x is transactional and has been written to the SQL Standard
> > (but relaxes some requirements by default). Therefore, the dialect
> > distinguishes between 1.8.x and 2.0.x versions and treats them
> > differently.
> >
> > I am hoping that any remaining issue with HSQLDialect are identified and
> > fixed now. So please check the dialect and let me know if you have any
> > recommendations.
> >
> > Some Details:
> >
> > The following connection URL's can be used:
> > "jdbc:hsqldb:mem:db;hsqldb.tx=mvcc;get_column_name=false" or with
> > "hsqldb.tx=locks" (mvcc or lock based transaction management). The
> > "get_column_name=false" causes the JDBC driver to return the column
> > labels when getColumnName() is used on ResultSetMetaData.
> >
> > There are 4 test failures with 2.0.x. The one below is caused by HSQLDB.
> > In JDBC PreparedStatement, it does not allow a locator on an existing
> > database lob to be used as the source of an assignment to the database.
> >   testBlobClob(org.hibernate.test.legacy.SQLFunctionsTest)
> >
> > I don't know the cause of the other failures.
> >
> > Tests were performed with the latest Hibernate SVN code.
> >
> > HSQLDB 2.0.x supports 3 URL properties to enforce strict type and name
> > checking according to ANSI SQL. The defaults for some of these are
> > relaxed. See http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html
> >
> > Fred Toussi
> > HSQLDB Project
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> 

-- 
Steve Ebersole <steve at hibernate.org>
http://hibernate.org




More information about the hibernate-dev mailing list