Example usage for java.sql Connection getMetaData

List of usage examples for java.sql Connection getMetaData

Introduction

In this page you can find the example usage for java.sql Connection getMetaData.

Prototype

DatabaseMetaData getMetaData() throws SQLException;

Source Link

Document

Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection.

Usage

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println("supportsMinimumSQLGrammar - " + md.supportsMinimumSQLGrammar());

    conn.close();/*from w w w .ja v a2  s . co  m*/
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println(md.getDriverMinorVersion());

    conn.close();//from  w w w  . j  a  v a 2s  .  c  om
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println("supportsExpressionsInOrderBy - " + md.supportsExpressionsInOrderBy());

    conn.close();/*from ww  w.  java2s .  c om*/
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println("supportsIntegrityEnhancementFacility - " + md.supportsIntegrityEnhancementFacility());

    conn.close();//from ww  w . j av a 2  s  .  c om
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println("supportsMixedCaseQuotedIdentifiers - " + md.supportsMixedCaseQuotedIdentifiers());

    conn.close();//w w w  . j ava 2 s. c o m
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println(md.getCatalogTerm());

    conn.close();/*  w w  w . j  a v  a2 s. c om*/
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println("supportsGroupBy - " + md.supportsGroupBy());

    conn.close();/*  w  w  w . j  ava 2s.  c  om*/
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out//from   w ww  .  j  a  v  a  2  s .c  o  m
            .println("supportsStoredFunctionsUsingCallSyntax - " + md.supportsStoredFunctionsUsingCallSyntax());

    conn.close();
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    System.out.println("supportsTransactionIsolationLevel - "
            + md.supportsTransactionIsolationLevel(Connection.TRANSACTION_READ_UNCOMMITTED));

    conn.close();/*from   w  w  w. j a  v a 2s. c  o m*/
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Connection conn = getHSQLConnection();

    DatabaseMetaData md = conn.getMetaData();
    // Get the list of system functions
    System.out.println(md.getSystemFunctions());

    conn.close();//ww  w. ja  v a2 s  . c  o m
}