Example usage for java.sql DatabaseMetaData sqlStateSQL99

List of usage examples for java.sql DatabaseMetaData sqlStateSQL99

Introduction

In this page you can find the example usage for java.sql DatabaseMetaData sqlStateSQL99.

Prototype

int sqlStateSQL99

To view the source code for java.sql DatabaseMetaData sqlStateSQL99.

Click Source Link

Document

A possible return value for the method DatabaseMetaData.getSQLStateType which is used to indicate whether the value returned by the method SQLException.getSQLState is an SQL99 SQLSTATE value.

Usage

From source file:it.emacro.extractor.db.ConnectionPool.java

public boolean isSQL99() {
    return (sqlStateType == DatabaseMetaData.sqlStateSQL99);
}

From source file:com.treasuredata.jdbc.TDDatabaseMetaData.java

public int getSQLStateType() throws SQLException {
    return DatabaseMetaData.sqlStateSQL99;
}

From source file:org.apache.hadoop.hive.jdbc.TestJdbcDriver.java

public void testDatabaseMetaData() throws SQLException {
    DatabaseMetaData meta = con.getMetaData();

    assertEquals("Hive", meta.getDatabaseProductName());
    assertEquals("1", meta.getDatabaseProductVersion());
    assertEquals(DatabaseMetaData.sqlStateSQL99, meta.getSQLStateType());
    assertNull(meta.getProcedures(null, null, null));
    assertFalse(meta.supportsCatalogsInTableDefinitions());
    assertFalse(meta.supportsSchemasInTableDefinitions());
    assertFalse(meta.supportsSchemasInDataManipulation());
    assertFalse(meta.supportsMultipleResultSets());
    assertFalse(meta.supportsStoredProcedures());
    assertTrue(meta.supportsAlterTableWithAddColumn());
}

From source file:org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.java

@Override
public int getSQLStateType() throws SQLException {
    return DatabaseMetaData.sqlStateSQL99;
}

From source file:com.alibaba.wasp.jdbc.result.JdbcDatabaseMetaData.java

/**
 * Gets the SQL State type.
 * 
 * @return DatabaseMetaData.sqlStateSQL99
 */
public int getSQLStateType() {
    return DatabaseMetaData.sqlStateSQL99;
}

From source file:org.apache.hive.jdbc.TestJdbcDriver2.java

@Test
public void testDatabaseMetaData() throws SQLException {
    DatabaseMetaData meta = con.getMetaData();

    assertEquals("Apache Hive", meta.getDatabaseProductName());
    assertEquals(HiveVersionInfo.getVersion(), meta.getDatabaseProductVersion());
    assertEquals(System.getProperty("hive.version"), meta.getDatabaseProductVersion());
    assertTrue("verifying hive version pattern. got " + meta.getDatabaseProductVersion(),
            Pattern.matches("\\d+\\.\\d+\\.\\d+.*", meta.getDatabaseProductVersion()));

    assertEquals(DatabaseMetaData.sqlStateSQL99, meta.getSQLStateType());
    assertFalse(meta.supportsCatalogsInTableDefinitions());
    assertTrue(meta.supportsSchemasInTableDefinitions());
    assertTrue(meta.supportsSchemasInDataManipulation());
    assertFalse(meta.supportsMultipleResultSets());
    assertFalse(meta.supportsStoredProcedures());
    assertTrue(meta.supportsAlterTableWithAddColumn());

    //-1 indicates malformed version.
    assertTrue(meta.getDatabaseMajorVersion() > -1);
    assertTrue(meta.getDatabaseMinorVersion() > -1);
}