public static int getObjectInfoType(IDatabaseObjectInfo oi) { if (oi instanceof ITableInfo) { String tableType = ((ITableInfo) oi).getType(); if (tableType.equals("TABLE")) return MSSQL_TABLE; else if (tableType.equals("VIEW")) return MSSQL_VIEW; else return MSSQL_UNKNOWN; } else if (oi instanceof IProcedureInfo) { /* i do believe the getSimpleName() will end in ;1 if it's a procedure * and ;0 if it's a UDF. */ String simpleName = oi.getSimpleName(); if (simpleName.endsWith(";0")) return MSSQL_UDF; else if (simpleName.endsWith(";1")) return MSSQL_STOREDPROCEDURE; else return MSSQL_UNKNOWN; } else if (oi instanceof IUDTInfo) { return MSSQL_UDT; } else return MSSQL_UNKNOWN; }
if(false == SchemaInfoCache.containsType(types, iTableInfo.getType()))
for (int j = 0; j < types.length; j++) if(types[j].equals(ti.getType()))
for (int j = 0; j < types.length; j++) if(types[j].equals(ti.getType()))
if(false == SchemaInfoCache.containsType(types, iTableInfo.getType()))
private boolean isMQT() { final IDatabaseObjectInfo doi = getDatabaseObjectInfo(); boolean isMQT = false; if (doi.getDatabaseObjectType() == DatabaseObjectType.TABLE) { ITableInfo info = (ITableInfo) doi; if (info.getType().startsWith("MATERIALIZED")) { isMQT = true; if (s_log.isDebugEnabled()) { s_log.debug("Table " + doi.getSimpleName() + " appears to be an MQT"); } } else { if (s_log.isDebugEnabled()) { s_log.debug("Table " + doi.getSimpleName() + " appears to be a regular table"); } } } return isMQT; }
tables[i].getType(), tables[i].getCatalogName(), tables[i].getSchemaName(),
/** * Create the <TT>IDataSet</TT> to be displayed in this tab. */ protected IDataSet createDataSet() throws DataSetException { final ISQLConnection conn = getSession().getSQLConnection(); final SQLDatabaseMetaData dmd = conn.getSQLMetaData(); ITableInfo ti = getTableInfo(); if (! "TABLE".equalsIgnoreCase(ti.getType())) { // Frontbase describes it's tables as "BASE TABLE". if (!DialectFactory.isFrontBase(dmd)) { return null; } } ResultSetDataSet rsds = dmd.getIndexInfo(getTableInfo(), indexIndices, true); rsds.next(null); String indexName = (String)rsds.get(1); if (indexName == null) { rsds.removeRow(0); } rsds.resetCursor(); return rsds; }
/** * Create the <TT>IDataSet</TT> to be displayed in this tab. */ protected IDataSet createDataSet() throws DataSetException { final ISQLConnection conn = getSession().getSQLConnection(); final SQLDatabaseMetaData dmd = conn.getSQLMetaData(); ITableInfo ti = getTableInfo(); if (! "TABLE".equalsIgnoreCase(ti.getType())) { // Frontbase describes it's tables as "BASE TABLE". if (!DialectFactory.isFrontBase(dmd)) { return null; } } ResultSetDataSet rsds = dmd.getIndexInfo(getTableInfo(), indexIndices, true); rsds.next(null); String indexName = (String)rsds.get(1); if (indexName == null) { rsds.removeRow(0); } rsds.resetCursor(); return rsds; }