Determine if the given table exists.

@param  string  $table
@return bool
960129
public function hasTable($table)
    {
        $table = $this->connection->getTablePrefix().$table;

        return count($this->connection->selectFromWriteConnection(
            $this->grammar->compileTableExists(), [$table]
        )) > 0;
    }
369699
public function hasTable($tableName)
    {
        if ($tableName instanceof Model) {
            $tableName = $tableName->tableName();
        }

        return $this->connection->getSchemaManager()->tablesExist([$tableName]);
    }
1247362
public function hasColumn($table, $column)
    {
        $column = strtolower($column);

        return in_array($column, array_map('strtolower', $this->getColumnListing($table)));
    }
1370587
public function tableExists($tableName) {
        $tables = $this->query("SHOW TABLES");
        foreach ($tables as $k => $table) {
            $key = 'Tables_in_' . $this->config['table'];
            if (strtolower($table[$key]) == strtolower($this->getPrefix() . $tableName)) {
                return TRUE;
            }
        }
        return FALSE;
    }
723609
protected function tableExists($tableName)
    {
        $found    = false;
        $iterator = $this->dynamoDb->getClient()->getIterator('ListTables');
        foreach ($iterator as $table) {
            if ($table === $tableName) {
                $found = true;
            }
        }

        return $found;
    }
693400
public function assertTableExists(string $table): void
    {
        if ($this->conn->getSchemaManager()->tablesExist([$table]) === false) {
            throw new NeuralyzerException("Table $table does not exist");
        }
    }
925176
public function table_exists($table) {
        if (!is_string($table) and !($table instanceof xmldb_table)) {
            throw new ddl_exception('ddlunknownerror', NULL, 'incorrect table parameter!');
        }
        return $this->generator->table_exists($table);
    }
816059
protected function getTableDatabase($table)
    {
        if (!array_key_exists($table, $this->tables)) {
            return false;
        }

        $database = $this->tables[$table];

        # If this table's database depends on the mode
        if (is_array($database)) {
            if (array_key_exists($this->mode, $database)) {
                $database = $database[$this->mode];
            } else {
                $database = $database["default"];
            }
        }

        return $database;
    }
574039
public function hasTable($tableName)
    {
        $dbMetadata = Source\Factory::createSourceFromAdapter($this->db);
        $tableNames = $dbMetadata->getTableNames();

        return in_array($tableName, $tableNames);
    }
951123
public function tableExists()
    {
        $dbh    = $this->db();
        $table  = $this->table();
        $driver = $dbh->getAttribute(PDO::ATTR_DRIVER_NAME);
        if ($driver === self::SQLITE_DRIVER_NAME) {
            $query = sprintf('SELECT name FROM sqlite_master WHERE type = "table" AND name = "%s";', $table);
        } else {
            $query = sprintf('SHOW TABLES LIKE "%s"', $table);
        }

        $this->logger->debug($query);
        $sth    = $dbh->query($query);
        $exists = $sth->fetchColumn(0);

        return !!$exists;
    }
1179351
public function tableExists($table)
    {
        try {
            $result = $this->query("SELECT 1 FROM `{$table}` LIMIT 1");
        } catch (\Exception $e) {
            return false;
        }

        return $result !== false;
    }
613590
protected function checkTable(string $table)
    {
        if (! property_exists($this, $table) || ! $this->$table instanceof Table) {
            throw new \InvalidArgumentException("Invalid table name: `{$table}`.");
        }
    }
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;
	}
484318
protected function findColumns($table)
	{
		// it may be good to use CUBRID PHP API to retrieve column info.
		$sql='SHOW COLUMNS FROM '.$table->rawName;
		try
		{
			$columns=$this->getDbConnection()->createCommand($sql)->queryAll();
		}
		catch(Exception $e)
		{
			return false;
		}
		foreach($columns as $column)
		{
			$c=$this->createColumn($column);
			$table->columns[$c->name]=$c;
		}
		return true;
	}
270493
public function TableExists($TableName = NULL) {
      if($this->_TableExists === NULL || $TableName !== NULL) {
         if ($TableName === NULL)
            $TableName = $this->TableName();

         if(strlen($TableName) > 0) {
            $Tables = $this->Database->SQL()->FetchTables(':_'.$TableName);
            $Result = count($Tables) > 0;
         } else {
            $Result = FALSE;
         }
         if ($TableName == $this->TableName())
            $this->_TableExists = $Result;
         return $Result;
      }
      return $this->_TableExists;
   }
945220
public function tableExists($tableName)
    {
        $sm = $this->getSchemaManager();
        $schemaTables = $sm->listTableNames();

        return in_array(strtolower($tableName), array_map('strtolower', $schemaTables));
    }
661085
private function _tableExists() {

        // Try a select statement against the table
        // Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.
        try {
            $result = mysqli_query($this->link,"SELECT 1 FROM $this->table_name LIMIT 1");
        } catch (\Exception $e) {
            // We got an exception == table not found
            return FALSE;
        }

        // Result is either boolean FALSE (no table found) or PDOStatement Object (table found)
        return $result !== FALSE;
    }