List of usage examples for java.sql Connection getMetaData
DatabaseMetaData getMetaData() throws SQLException;
DatabaseMetaData
object that contains metadata about the database to which this Connection
object represents a connection. From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsAlterTableWithDropColumn - " + md.supportsConvert(java.sql.Types.ARRAY, java.sql.Types.INTEGER)); conn.close();/*from ww 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(); System.out//from w ww .j a v a 2s . c o m .println("supportsCatalogsInPrivilegeDefinitions - " + md.supportsCatalogsInPrivilegeDefinitions()); conn.close(); }
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.getStringFunctions()); conn.close();//from ww w . j a v a 2s . co 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.getNumericFunctions()); conn.close();//from www.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(); // Get the list of system functions System.out.println(md.getTimeDateFunctions()); conn.close();/* www . 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("supportsDataDefinitionAndDataManipulationTransactions - " + md.supportsDataDefinitionAndDataManipulationTransactions()); conn.close();// w w w. j a va 2s . co m }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getConnection(); DatabaseMetaData dbMd = conn.getMetaData(); if (dbMd.supportsTransactionIsolationLevel(Connection.TRANSACTION_READ_COMMITTED)) { System.out.println("Transaction Isolation level " + "TRANSACTION_READ_COMMITTED is supported."); conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); }/* ww w .j a va 2 s. com*/ 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(//from ww w . ja v a 2 s . c o m "supportsResultSetHoldability - " + md.supportsResultSetHoldability(ResultSet.FETCH_FORWARD)); 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(//from w ww . j a v a 2 s . c om "supportsDataManipulationTransactionsOnly - " + md.supportsDataManipulationTransactionsOnly()); 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("supportsResultSetType - " + md.supportsResultSetConcurrency(ResultSet.TYPE_FORWARD_ONLY, ResultSet.FETCH_UNKNOWN)); conn.close();/*from ww w .j a va 2s .c om*/ }