Return true if a table is the source table for a materialized view.
167706
public static boolean isTableMaterializeViewSource(org.voltdb.catalog.Database database,
                                                       org.voltdb.catalog.Table table)
    {
        CatalogMap<Table> tables = database.getTables();
        for (Table t : tables) {
            Table matsrc = t.getMaterializer();
            if ((matsrc != null) && (matsrc.getRelativeIndex() == table.getRelativeIndex())) {
                return true;
            }
        }
        return false;
    }
920756
def has_table(self, table):
        
        sql = self._grammar.compile_table_exists()

        table = self._connection.get_table_prefix() + table

        return len(self._connection.select(sql, [table])) > 0
253647
def in_same_table(self):
        """"""
        if self._tc.tbl is self._other_tc.tbl:
            return True
        return False
441067
public boolean hasTableStyleRelationship(String featureTable) {
		return hasStyleRelationship(
				getMappingTableName(TABLE_MAPPING_TABLE_STYLE, featureTable),
				ContentsId.TABLE_NAME, StyleTable.TABLE_NAME);
	}
1273306
private void verifyTableExists(BaseDaoImpl<?, ?> dao) {
		try {
			if (!dao.isTableExists()) {
				throw new GeoPackageException(
						"Table or view does not exist for: "
								+ dao.getDataClass().getSimpleName());
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to detect if table or view exists for dao: "
							+ dao.getDataClass().getSimpleName(), e);
		}
	}
731751
public boolean isDatasource(String datasourceName) throws Exception {
        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_DATASOURCES);
        String haystack = DATA_SOURCE;
        return null != findNodeInList(addr, haystack, datasourceName);
    }
1026834
public static MaterializedViewInfo getMaterializedViewInfo(Table tbl) {
        MaterializedViewInfo mvInfo = null;
        Table source = tbl.getMaterializer();
        if (source != null) {
            mvInfo = source.getViews().get(tbl.getTypeName());
        }
        return mvInfo;
    }
1367732
private boolean isNamespace(String database) {
    Collection<String> tables = getMetaStoreUtil().getAllTables(database);
    for (String name : tables) {
      if (isReadable(database, name)) {
        return true;
      }
    }
    return false;
  }
1036869
public static boolean isCreateTableAppropriate(final Datastore datastore, final Schema schema) {
        if (datastore == null || schema == null) {
            return false;
        }
        if (!(datastore instanceof UpdateableDatastore)) {
            return false;
        }
        if (datastore instanceof CsvDatastore) {
            // see issue https://issues.apache.org/jira/browse/METAMODEL-31 - as
            // long as this is an issue we do not want to expose "create table"
            // functionality to CSV datastores.
            return false;
        }
        if (MetaModelHelper.isInformationSchema(schema)) {
            return false;
        }
        return true;
    }
933226
public function isSupported()
    {
        $sql = 'SHOW TABLES LIKE :table';

        $stat = $this->pdo->prepare($sql);
        $stat->bindValue(':table', $this->table);
        $stat->execute();

        return (bool) $stat->fetch(\PDO::FETCH_ASSOC);
    }
532015
public boolean isSameRM(XAResource xares) throws XAException {

        if (!(xares instanceof JDBCXAResource)) {
            return false;
        }

        return xaDataSource == ((JDBCXAResource) xares).getXADataSource();
    }
1019055
protected function hasTablesOrViews()
    {
        $tables = $this->db->query('SHOW TABLES', DbAdapter::QUERY_MODE_EXECUTE);

        return (bool) count($tables);
    }
797844
private static Map<MaterializedViewInfo, Table> getMviAndViews(List<Table> tbls) {
        return tbls.stream().flatMap(tbl ->
                StreamSupport.stream(((Iterable<MaterializedViewInfo>) () -> tbl.getViews().iterator()).spliterator(), false)
                        .map(mv -> Pair.of(mv, mv.getDest())))
                .collect(Collectors.toMap(Pair::getFirst, Pair::getSecond));
    }
1298355
private boolean tableListIncludesExportOnly(List<Table> tableList) {
        // list of all export tables (assume uppercase)
        NavigableSet<String> exportTables = CatalogUtil.getExportTableNames(m_catalogDb);

        // this loop is O(number-of-joins * number-of-export-tables)
        // which seems acceptable if not great. Probably faster than
        // re-hashing the export only tables for faster lookup.
        for (Table table : tableList) {
            if (exportTables.contains(table.getTypeName()) && TableType.isStream(table.getTabletype())) {
                return true;
            }
        }

        return false;
    }
401520
@SuppressWarnings("unused")
	public boolean isInRestoreState(View view) {
		//noinspection SimplifiableIfStatement
		if (mViewState != null) {
			return mViewState.isInRestoreState(view);
		}
		return false;
	}
781638
private void checkDataSourceRef() {

        Object configuredDSR = _props.get("dataSourceRef");
        if (configuredDSR == null) {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "dataSourceRef is not specified, log to filesys");
            _isSQLRecoveryLog = false;
        } else {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "dataSourceRef is specified, log to RDBMS");
            // We'll set the logDir to maintain tWAS code compatibility. First we need to
            // check get the table suffix string if it is set in server.xml
            String suffixStr = (String) _props.get("transactionLogDBTableSuffix");

            if (tc.isDebugEnabled())
                Tr.debug(tc, "suffixStr is " + suffixStr + ", of length " + suffixStr.length());

            if (suffixStr != null && !suffixStr.trim().isEmpty()) {
                suffixStr = suffixStr.trim();
                logDir = "custom://com.ibm.rls.jdbc.SQLRecoveryLogFactory?datasource=Liberty" +
                         ",tablesuffix=" + suffixStr;
            } else
                logDir = "custom://com.ibm.rls.jdbc.SQLRecoveryLogFactory?datasource=Liberty";

            if (tc.isDebugEnabled())
                Tr.debug(tc, "logDir now set to ", logDir);
            _isSQLRecoveryLog = true;
        }
    }
313287
def _table_exists(self):
        """"""
        self.cursor.execute("SHOW TABLES")
        for table in self.cursor.fetchall():
            if table[0].lower() == self.name.lower():
                return True
        return False