Decodes all columns of the given data table

@param DataTable $table
355658
public function filter($table)
    {
        foreach ($table->getRows() as $row) {
            $value = $row->getColumn($this->columnToDecode);
            if ($value !== false) {
                $value = self::decodeLabelSafe($value);
                $row->setColumn($this->columnToDecode, $value);

                $this->filterSubTable($row);
            }
        }
    }
60908
private function validateTableAndCol ($table, $columns) {
        if (!$this->isValidTable($table)) {
            return false;
        }
        
        foreach ($columns as $column) {
            if (!$this->isValidColumn($table, $column)) {
                return false;
            }
        }

        return true;
    }
242630
protected function loadColumnListForTable($table)
    {
        if ($this->getDatabaseDriver() === 'sqlite') {
            $statement = "PRAGMA table_info(`{$table}`)";
        } else {
            $statement = "SHOW columns FROM `{$table}`";
        }

        $columnResults = DB::select($statement);
        $columns       = [];

        foreach ($columnResults as $columnObject) {

            $columns[] = array_get(array_values((array) $columnObject), '0');
        }

        return $columns;
    }
1250983
public function getColumns( $table ) {
		$table = $this->safeTable($table);
		$columnsRaw = $this->adapter->get("DESCRIBE $table");
		foreach($columnsRaw as $r) {
			$columns[$r['Field']]=$r['Type'];
		}
		return $columns;
	}
996321
public function from($table, $columns = null)
    {
        $this->table($table);
        if( !empty($columns) ) {
            $this->columns($columns);
        }
        return $this;
    }
609834
public function getColumns($table)
    {
        $table = str_replace("`", "", $table);

        $columns = Db::fetchAll("SHOW COLUMNS FROM `" . $table . "`");

        $columnNames = array();
        foreach ($columns as $column) {
            $columnNames[] = $column['Field'];
        }

        return $columnNames;
    }
608272
public function getFields ($table)
		{
			$sql = "SHOW COLUMNS FROM " . $this->quoteIdentifier($table);

			return $this->query($sql)->fetchColumn('Field');
		}
1073471
protected function findColumns($table)
	{
		$sql='SHOW FULL 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;
			if($c->isPrimaryKey)
			{
				if($table->primaryKey===null)
					$table->primaryKey=$c->name;
				elseif(is_string($table->primaryKey))
					$table->primaryKey=array($table->primaryKey,$c->name);
				else
					$table->primaryKey[]=$c->name;
				if($c->autoIncrement)
					$table->sequenceName='';
			}
		}
		return true;
	}
80117
public function getColumns($table)
    {
        $query = $this->getUtilityQuery()->showColumns($table);

        $results = $this->query($query, $this->getBinds());
        
        $columns = [];
        foreach ($results as $column) {
            $key = null;
            if ($column['pk'] == 1) {
                $key = 'PRI';
            }
            
            $columns[] = [
                'Field'     => $column['name'],
                'Type'      => $column['type'],
                'Default'   => $column['dflt_value'],
                'Null'      => $column['notnull'] != 1,
                'Key'       => $key
            ];
        }
        
        return $columns;
    }
378965
public function prepareTableExample($table)
    {
        $tableExample = '';
        $definitions = $this->calibrateDefinitions($table);

        foreach ($definitions as $key => $column) {
            $columnDefinition = explode(':', $column);
            $example = $this->createExampleByType($columnDefinition[1]);

            if ($key === 0) {
                $tableExample .= "'$columnDefinition[0]' => '$example',\n";
            } else {
                $tableExample .= "\t\t'$columnDefinition[0]' => '$example',\n";
            }
        }

        return $tableExample;
    }
312167
public function tableDefintion($table)
    {
        $columnStringArray = [];
        $columns = $this->getTableColumns($table, true);

        foreach ($columns as $key => $column) {
            if ($key === 'id') {
                $column['type'] = 'increments';
            }

            $columnStringArray[] = $key.':'.$this->columnNameCheck($column['type']);
        }

        $columnString = implode(',', $columnStringArray);

        return $columnString;
    }
1045794
private function getTextFields($table): array
    {
        $columnsData = $this->model->getReadConnection()->describeColumns($table);
        $textFields = [];

        foreach ($columnsData as $column) {
            switch ($column->getType()) {
                case \Phalcon\Db\Column::TYPE_VARCHAR:
                case \Phalcon\Db\Column::TYPE_TEXT:
                    $textFields[] = $column->getName();
                    break;
            }
        }

        return $textFields;
    }
314272
protected function addColumns(Table $table)
    {
        $stmt = $this->dbh->query(sprintf('SHOW COLUMNS FROM %s', $this->getPlatform()->doQuoting($table->getName())));

        while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
            $column = $this->getColumnFromRow($row, $table);
            $table->addColumn($column);
        }
    }
147083
public function getColumns($table)
    {
        $sql = 'SHOW COLUMNS FROM '. $this->formatKey($table);
        
        $result = $this->query($sql);
        if ($result === false) {
            return array();
        }
        
        $array = array();
        while ($tmp = $result->fetch(\PDO::FETCH_ASSOC)){
            // $tmp['Type'] 格式为 varchar(30), 可解析出 data_type, data_length
            preg_match('/([^\(]+)\(?(\d*)\)?/i', $tmp['Type'], $matches);
            $data_type = $matches[1];
            $data_length = $matches[2];
            $array[$tmp['Field']] = array(
                'name'      => $tmp['Field'],
                'type'      => $data_type,
                'length'    => $data_length,
                'null'      => $tmp['Null'],
                'primary'   => (strtolower($tmp['Key']) == 'pri'),
                'default'   => $tmp['Default'],
                'auto_increment' => (strtolower($tmp['Extra']) == 'auto_increment'),
            );
        }
        
        return $this->formatColumns($array);
    }
733834
public function filter($table)
    {
        foreach ($table->getRows() as $key => $row) {
            $params = array();
            foreach ($this->columnsToFilter as $column) {
                $params[] = $row->getColumn($column);
            }

            $params = array_merge($params, $this->functionParams);
            if (call_user_func_array($this->function, $params) === true) {
                $table->deleteRow($key);
            }

            $this->filterSubTable($row);
        }
    }
350994
public function get_columns($table) {
		$result = $this->get_table_definition($table);

		$columns = [];
		foreach ($result as $row) {
			$columns[] = &$row['Field'];
		}

		return $columns;
	}
1024292
public function HtmlEntityDecode($Table, $Column, $Limit = 100) {
      // Construct a model to save the results.
      $Model = $this->CreateModel($Table);
      
      // Get the data to decode.
      $Data = $this->SQL
         ->Select($Model->PrimaryKey)
         ->Select($Column)
         ->From($Table)
         ->Like($Column, '&%;', 'both')
         ->Limit($Limit)
         ->Get()->ResultArray();
      
      $Result = array();
      $Result['Count'] = count($Data);
      $Result['Complete'] = FALSE;
      $Result['Decoded'] = array();
      $Result['NotDecoded'] = array();
      
      // Loop through each row in the working set and decode the values.
      foreach ($Data as $Row) {
         $Value = $Row[$Column];
         $DecodedValue = HtmlEntityDecode($Value);
         
         $Item = array('From' => $Value, 'To' => $DecodedValue);
         
         if ($Value != $DecodedValue) {
            $Model->SetField($Row[$Model->PrimaryKey], $Column, $DecodedValue);
            $Result['Decoded'] = $Item;
         } else {
            $Result['NotDecoded'] = $Item;
         }
      }
      $Result['Complete'] = $Result['Count'] < $Limit;
      
      return $Result;
   }