use of net.sourceforge.sqlexplorer.dbstructure.DatabaseModel in project tdq-studio-se by Talend.
the class MetaDataSession method initialise.
/**
* Initialises the metadata, but only if the meta data has not already been collected
*/
private void initialise() throws SQLException {
if (getConnection() != null)
return;
_assistanceEnabled = SQLExplorerPlugin.getDefault().getPluginPreferences().getBoolean(IConstants.SQL_ASSIST);
if (_assistanceEnabled) {
// schedule job to load dictionary for this session
dictionary = new Dictionary();
DictionaryLoader dictionaryLoader = new DictionaryLoader(this);
dictionaryLoader.schedule(500);
}
SQLConnection connection = null;
try {
connection = grabConnection();
metaData = connection.getSQLMetaData();
// MOD gdbu 2011-4-12 bug : 20578
databaseProductName = metaData.getDatabaseProductName();
dbModel = new DatabaseModel(this);
if (metaData.supportsCatalogs())
catalogs = metaData.getCatalogs();
} catch (SQLException sqlerror) {
SQLExplorerPlugin.error(sqlerror);
// ~20578
} finally {
if (connection != null)
releaseConnection(connection);
}
}
Aggregations