Check if the view could apply to the provided table unchanged.
197425
public boolean compatibleWithTable(VoltTable table) {
            String candidateName = getTableName(table);
            // table can't have the same name as the view
            if (candidateName.equals(viewName)) {
                return false;
            }
            // view is for a different table
            if (candidateName.equals(srcTableName) == false) {
                return false;
            }

            try {
                // ignore ret value here - just looking to not throw
                int groupColIndex = table.getColumnIndex(groupColName);
                VoltType groupColType = table.getColumnType(groupColIndex);
                if (groupColType == VoltType.DECIMAL) {
                    // no longer a good type to group
                    return false;
                }

                // check the sum col is still value
                int sumColIndex = table.getColumnIndex(sumColName);
                VoltType sumColType = table.getColumnType(sumColIndex);
                if ((sumColType == VoltType.TINYINT) ||
                        (sumColType == VoltType.SMALLINT) ||
                        (sumColType == VoltType.INTEGER)) {
                    return true;
                }
                else {
                    // no longer a good type to sum
                    return false;
                }
            }
            catch (IllegalArgumentException e) {
                // column index is bad
                return false;
            }
        }
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
112755
def exist(self, table: str, libref: str ="") -> bool:
      
      code  = "data _null_; e = exist('"
      if len(libref):
         code += libref+"."
      code += table+"');\n"
      code += "v = exist('"
      if len(libref):
         code += libref+"."
      code += table+"', 'VIEW');\n if e or v then e = 1;\n"
      code += "te='TABLE_EXISTS='; put te e;run;"

      ll = self.submit(code, "text")

      l2 = ll['LOG'].rpartition("TABLE_EXISTS= ")
      l2 = l2[2].partition("\n")
      exists = int(l2[0])

      return bool(exists)
818225
def exists(self):
        """"""
        try:
            self.cc.sql_client.send(
                'EXPLAIN SELECT * FROM "{table_name}"'.format(
                    table_name=self.table_name),
                do_post=False)
            return True
        except CartoException as err:
            # If table doesn't exist, we get an error from the SQL API
            self.cc._debug_print(err=err)
            return False
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;
    }
1331719
boolean canTrigger(Table table, boolean[] columnCheckList) {

        if (isFull || isFullTrigger) {
            return true;
        }

        return containsAllColumns(triggerColumnSet, table, columnCheckList);
    }
264412
def has_column(self, table, column):
        
        column = column.lower()

        return column in list(map(lambda x: x.lower(), self.get_column_listing(table)))
1235861
@Override
    protected void validate(List<TableInfo> tableInfos)
    {
        try
        {
            if (!checkForDBExistence())
            {
                throw new SchemaGenerationException("Database " + databaseName + " not exist");
            }

            for (TableInfo tableInfo : tableInfos)
            {
                Map<String, MapReduce> views = new HashMap<String, MapReduce>();
                String id = CouchDBConstants.DESIGN + tableInfo.getTableName();
                CouchDBDesignDocument designDocument = getDesignDocument(id);
                designDocument.setLanguage(CouchDBConstants.LANGUAGE);
                views = designDocument.getViews();
                if (views == null)
                {
                    logger.warn("No view exist for table " + tableInfo.getTableName()
                            + "so any query will not produce any result");
                    return;
                }
                for (IndexInfo indexInfo : tableInfo.getColumnsToBeIndexed())
                {
                    if (views.get(indexInfo.getColumnName()) == null)
                    {
                        logger.warn("No view exist for column " + indexInfo.getColumnName() + " of table "
                                + tableInfo.getTableName() + "so any query on column " + indexInfo.getColumnName()
                                + "will not produce any result");
                    }
                }

                // for id column.
                if (views.get(tableInfo.getIdColumnName()) == null)
                {
                    logger.warn("No view exist for id column " + tableInfo.getIdColumnName() + " of table "
                            + tableInfo.getTableName() + "so any query on id column " + tableInfo.getIdColumnName()
                            + "will not produce any result");
                }

                // for select all.
                if (views.get("all") == null)
                {
                    logger.warn("No view exist for select all for table " + tableInfo.getTableName()
                            + "so select all query will not produce any result");
                }
            }
        }
        catch (Exception e)
        {
            throw new SchemaGenerationException("Database " + databaseName + " not exist");
        }
    }
879933
function isDatatable($table){
    if($table.dataTableSettings){
      for(var i = 0; i < $table.dataTableSettings.length; i++){
        var table = $table.dataTableSettings[i].nTable;
        if($table[0] == table){
          return true;
        }
      }
    }
    return false;
  }
1349614
def _values_exist(table):
        
        try:
            for var, data in table["columns"].items():
                if "values" in data:
                    return True
        except KeyError as e:
            logger_lpd_noaa.warn("values_exist: KeyError: {}".format(e))
        except Exception as e:
            logger_lpd_noaa.warn("values_exist: Excpetion: {}".format(e))
        return False
550950
def tablesAndViews(self):
      """"""
      result = self.execute(
        u'SELECT name,type FROM sqlite_master WHERE type in ("table", "view")',
        commit=False)
      return ((row['name'],row['type']) for row in result)
441341
def isVisible(self, instance, mode='view', default=None, field=None):
        
        vis = super(RejectionWidget, self).isVisible(
            instance=instance, mode=mode, default=default, field=field)
        if instance.bika_setup.isRejectionWorkflowEnabled():
            return vis
        else:
            return 'invisible'
739708
def ensure_table(self, cls):
        """"""
        exists = True
        conn = get_conn()

        try:
            descrip = conn.describe_table(cls.get_table_name())
            assert descrip is not None
        except ResourceNotFoundException:
            # Expected - this is what we get if there is no table
            exists = False
        except JSONResponseError:
            # Also assuming no table
            exists = False

        if not exists:
            table = self.table_schema_call(Table.create, cls)
            assert table is not None
722388
def table_exists(self, tablename: str) -> bool:
        """"""
        # information_schema is ANSI standard
        sql = """
            SELECT COUNT(*)
            FROM information_schema.tables
            WHERE table_name=?
            AND table_schema={}
        """.format(self.get_current_schema_expr())
        row = self.fetchone(sql, tablename)
        return True if row[0] >= 1 else False
1206803
def __check_existing(self, row):
        
        if self.__update_keys is not None:
            key = tuple(row[key] for key in self.__update_keys)
            if key in self.__bloom:
                return True
            self.__bloom.add(key)
            return False
        return False
1308655
public function tableExists($table)
	{
		$query = 'SHOW TABLES LIKE ' . str_replace('#__', $this->tablePrefix, $this->quote($table, false));
		$this->setQuery($query)->execute();

		return ($this->getAffectedRows() > 0) ? true : false;
	}
810842
private void createViewIfNotExist(Map<String, MapReduce> views, String columnName)
    {
        if (views.get(columnName) == null)
        {
            createView(views, columnName);
        }
    }