org.aksw.commons.util.jdbc
Class JdbcUtils
java.lang.Object
org.aksw.commons.util.jdbc.JdbcUtils
public class JdbcUtils
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcUtils
public JdbcUtils()
fetchForeignKeys
public static com.google.common.collect.Multimap<String,ForeignKey> fetchForeignKeys(Connection conn)
throws SQLException
- Throws:
SQLException
fetchPrimaryKeys
public static Map<String,PrimaryKey> fetchPrimaryKeys(Connection conn)
throws SQLException
- Throws:
SQLException
fetchRelationNames
public static Set<String> fetchRelationNames(Connection conn)
throws SQLException
- For each table retrieve all columns and their foreign key relations
Retrieving foreign keys:
http://www.java2s.com/Code/Java/Database-SQL-JDBC/GetForeignKeys.htm
- Parameters:
conn -
- Throws:
SQLException
fetchColumns
public static Map<String,Relation> fetchColumns(Connection conn)
throws SQLException
- Throws:
SQLException
Copyright © 2012. All Rights Reserved.