• Philippe Marschall's avatar
    Implement createArrayOf and setArray (#418) · 790cf87b
    Philippe Marschall 提交于
    Currently java.sql.Array is only supported when returned from the
    database. Passing arrays to the database is not supported.
    Connection#createArrayOf, PreparedStatement#setArray and
    PreparedStatement#setObject with a java.sql.Array are not supported.
    
    This pull requests implements passing java.sql.Array objects to the
    database and includes the following changes:
    
     - implement Connection#createArrayOf
     - implement PreparedStatement#setArray
     - implement array support in ResultSet#getObject
     - implement conversion from java.sql.Array to Value
     - update DataType#convertTo to support arrays as well
     - add tests for #createArrayOf, #setArray and #setObject
     - add tests for #getObject with an array argument
     - remove the test for Connection#createArrayOf being unsupported
     - remove the test for PreparedStatement#setArray being unsupported
    
    The typeName passed to #createArrayOf is ignored, this is in accordance
    with JdbcArray#getBaseTypeName returning "NULL" and
    JdbcArray#getBaseType returning Types.NULL even if the backing array is
    homogeneous.
    790cf87b

Welcome to H2, the Java SQL database. Build Status

The main features of H2 are:

  1. Very fast, open source, JDBC API
  2. Embedded and server modes; in-memory databases
  3. Browser based Console application
  4. Small footprint: around 1.5 MB jar file size

More information: http://h2database.com

Features

H2 Derby HSQLDB MySQL PostgreSQL
Pure Java Yes Yes Yes No No
Memory Mode Yes Yes Yes No No
Encrypted Database Yes Yes Yes No No
ODBC Driver Yes No No Yes Yes
Fulltext Search Yes No No Yes Yes
Multi Version Concurrency Yes No Yes Yes Yes
Footprint (jar/dll size) bug MB duplicate MB bug MB good first issue MB invalid MB