Checks if the table exists.

@param string $table Plugin name.
@return bool
963885
protected function _tableExists($table)
    {
        $db = ConnectionManager::get('default');
        $tables = $db->schemaCollection()->listTables();

        return in_array($table, $tables);
    }
1301925
protected static function _tableExists()
    {
        $db = ConnectionManager::get('default');
        $tables = $db->schemaCollection()->listTables();

        if (in_array('settings_configurations', $tables)) {
            return true;
        }
        return false;
    }
950252
public static function existe($name, $table = null)
    {
        $name = self::table($name);
        //
        // > I don't know why i put this
        $table = is_null($table) ? Config::get('database.database') : $table;
        //
        $i = Database::count(
                "select * FROM information_schema.tables WHERE table_schema ='".$table."' AND table_name = '".$name."' LIMIT 1;"
            );
        //
        return ($i > 0) ? true : false;
    }
444045
public function hasTable($table)
    {
        $sql = $this->grammar->compileTableExists();

        $table = $this->connection->getTablePrefix().$table;

        return count($this->connection->select($sql, array($table))) > 0;
    }
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;
   }
1032286
public function fieldExists($field, $table) {
        $fieldLists = $this->query("DESC " . $this->getPrefix() . $table);
        foreach ($fieldLists as $f) {
            if (strtolower($f['Field']) == strtolower($field)) {
                return TRUE;
            }
        }
        return FALSE;
    }
1364804
public function table($table = null)
    {
        if ($table !== null) {
            $this->table = $table;
        }

        return $this->table;
    }
451795
public function checkTableExists(string $tableName): bool
    {
        try {
            $result = $this->pdo->query("SELECT 1 FROM $tableName LIMIT 1");
        } catch (\Exception $e) {
            return false;
        }

        return $result !== false;
    }
442219
public function tableExists( $table )
    {
        $query = "SELECT name FROM sqlite_master WHERE type='table' AND name='$table'";

        $statement = $this->database->query( $query );

        return ( 0 !== count( $statement->fetchAll() ) );
    }
41007
public function getTableDetail($table)
    {
        $tables = $this->getTableDetails();

        $table = $this->db->replacePrefix($table);

        if (!isset($tables[$table])) {
            return false;
        }

        return $tables[$table];
    }
251972
protected function tableExists($tableName) {
		if(isset($this->nonExistingTables[$tableName]))
			return false;
		if(isset($this->existingTables[$tableName]))
			return true;
		$exists = $this->schemaManager->tablesExist(array(
			$tableName 
		));
		if(!$exists) {
			$this->nonExistingTables[$tableName] = 1;
		} else {
			$this->existingTables[$tableName] = 1;
		}
		return $exists;
	}
1023547
public function indexExists( $table, $columns = [ ] )
    {
        $indexes = $this->getTableIndexes( $table );

        $name = '';

        $this->prepareIndexName( $columns, $name );

        foreach ( $indexes as $index )
        {
            if ( $index === $name )
            {
                return TRUE;
            }
        }

        return FALSE;
    }
953201
protected function table( $table )
	{
		return $this->db->connection( $this->connection )->table( $table )->useWritePdo();
	}
1250670
public function existTable(string $tableName): bool
    {
        [$dbName, $tableName] = $this->parseTableName($tableName);

        $sql = 'SELECT table_name
            FROM information_schema.tables
            WHERE table_schema = %s
            AND table_name = %s;';

        $sql = sprintf($sql, $dbName, $tableName);
        $row = $this->db->query($sql)->fetch(PDO::FETCH_ASSOC);

        return isset($row['table_name']);
    }
574039
public function hasTable($tableName)
    {
        $dbMetadata = Source\Factory::createSourceFromAdapter($this->db);
        $tableNames = $dbMetadata->getTableNames();

        return in_array($tableName, $tableNames);
    }
297365
protected function tableExists($tableName)
    {
        $tables = $this->connection->getSchemaManager()->listTables();

        foreach ($tables as $table) {
            if ($table->getName() == $tableName) {
                return true;
            }
        }

        return false;
    }
910922
public function getCreateTableSql($table)
    {
        $table = $this->buildRealTableName($table);
        return $this->getSchema()->getCreateTableSql($table);
    }