net.sourceforge.schemaspy.model
Class Database
java.lang.Object
net.sourceforge.schemaspy.model.Database
public class Database
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Database
public Database(Connection connection,
DatabaseMetaData meta,
String name,
String schema,
String description,
Properties properties,
Pattern include,
int maxThreads)
throws SQLException,
MissingResourceException
- Throws:
SQLException
MissingResourceException
getName
public String getName()
getSchema
public String getSchema()
getDescription
public String getDescription()
- Returns:
- null if a description wasn't specified.
getTables
public Collection getTables()
getViews
public Collection getViews()
getConnection
public Connection getConnection()
getMetaData
public DatabaseMetaData getMetaData()
getConnectTime
public String getConnectTime()
getDatabaseProduct
public String getDatabaseProduct()
getOptionalString
public String getOptionalString(ResultSet rs,
String columnName)
- Some databases don't play nice with their metadata.
E.g. Oracle doesn't have a REMARKS column at all.
This method ignores those types of failures, replacing them with null.
prepareStatement
public PreparedStatement prepareStatement(String sql,
String tableName)
throws SQLException
- Create a
PreparedStatement from the specified SQL.
The SQL can contain these named parameters (but not question marks).
- :schema - replaced with the name of the schema
- :owner - alias for :schema
- :table - replaced with the name of the table
- Parameters:
sql - String - SQL without question markstableName - String - null if the statement doesn't deal with Table-level details.
- Returns:
- PreparedStatement
- Throws:
SQLException
getSqlKeywords
public Set getSqlKeywords()
throws SQLException
- Return an uppercased
Set of all SQL keywords used by a database
- Returns:
-
- Throws:
SQLException
getQuotedIdentifier
public String getQuotedIdentifier(String id)
throws SQLException
- Throws:
SQLException
Copyright © 2007-2010. All Rights Reserved.