H2MetaData.java.txt 902 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
package com.caucho.jdbc;

import com.caucho.util.Log;

import javax.sql.DataSource;
import java.util.logging.Logger;

/**
 * Metadata for the H2 database.
 * For details, see
 * http://wondering.ru/java/H2ejb3onResinSupport1.0.zip
 */
public class H2MetaData extends JdbcMetaData {
    private static final Logger log = Log.open(H2MetaData.class);

    protected H2MetaData(DataSource ds) {
        super(ds);
    }

    /**
    * Returns the blob type.
    */
    public String getBlobType(){
        return "BLOB";
    }

    /**
    * Returns the long type.
    */
    public String getLongType() {
        return "BIGINT";
    }

    /**
    * Returns true if identity is supported.
    */
    public boolean supportsIdentity() {
        return true;
    }

    /**
    * Returns the identity property
    */
    public String createIdentitySQL(String sqlType) {
        return "IDENTITY";
    }
}