Get column identity from input or database.

@param int $i
@return string
19628
public function columnName($i)
    {
        $column = $this->request->input("columns.$i");

        return isset($column['name']) && $column['name'] != '' ? $column['name'] : $column['data'];
    }
888552
public function getDescription($i = 0)
    {
        $files = $this->files;
        $files = $this->owner->$files;
        if(!isset($files[$i]))
           return "";
        $file = $files[$i];
        return isset($file->vars->description) ? $file->vars->description : "";
    }
50643
Integer getColDataTypeSub(int i) {

        int type = table.getColumn(i).getDataType().getJDBCTypeCode();
        int sub = type == Types.VARCHAR_IGNORECASE ? Types.TYPE_SUB_IGNORECASE
                                                   : Types.TYPE_SUB_DEFAULT;

        return ValuePool.getInt(sub);
    }
1347993
public function get($id): Column
    {
        if ($this->offsetExists($id)) {
            return $this->offsetGet($id);
        }

        return $this->getByName($id);
    }
1283221
public function getNameAt($i)
    {
        $fields = $this->getNames();
        if($i<$this->length())
        {
            return $fields[$i];
        }
        return null;
    }
1325466
public function getCurrentId()
    {
        $sql   = 'SELECT value FROM ' . $this->table . ' WHERE name = ?';

        $id = $this->db->fetchOne($sql, array($this->name));

        if (!empty($id) || '0' === $id || 0 === $id) {
            return (int) $id;
        }
    }
166384
public function getColumnDefinition(ColumnInterface $column)
    {
        $sql = parent::getColumnDefinition($column);
        if ($column instanceof Column && $column->getComment()) {
            $sql .= " COMMENT \"" . addcslashes($column->getComment(), '"') . "\"";
        }
        $def = $column->getDefault();
        // empty value will ignore when create table
        if (isset($def) && in_array($def, [0, '', '0'])) {
            $sql .= ' DEFAULT "' . $def . '"';
        }
        if ($column->getType() == Column::TYPE_INTEGER
            && $column->getSize() == 4) {
            $sql = preg_replace('/^INT/', 'TINYINT', $sql);
        }
        return $sql;
    }
697407
public function id($column = 'id')
    {
        $this->int($column)->unsigned()->autoIncrement();

        return $this->primary($column);
    }
117299
public function getid($id){
		$n=strlen($id);
		$i=0;
		$arrname='';
		while(($i<$n)&&($id[$i]!='[')){
			$arrname.=$id[$i];
			$i++;
			}
		if($id[$i]=='['){
			$i++;
			}
		$appendix='';
		$brackets=1;//opened brackets

		while(($i<$n)&&($brackets>=0)){
			if($id[$i]=='['){
				$brackets++;
				}
			if($id[$i]==']'){
				$brackets--;
				}

			$appendix.=$id[$i];
			$i++;
			}
		if(strlen($appendix)>0){
			$appendix=substr($appendix, 0, -1);
			}
		$name='bfields['.$arrname.']'.(empty($appendix)?'':'['.$appendix.']');
		//echo('name="'.$name.'", id="'.$id.'"');
		return $name;
		}
65884
public function get_step($i) {
        if ($i < 0 || $i >= count($this->steps)) {
            throw new coding_exception('Index out of bounds in question_attempt::get_step.');
        }
        return $this->steps[$i];
    }
1294956
public function findByIdentifier( $identifier )
    {

        $identifier = explode('.', $identifier);

        if( count( $identifier) < 2 ) {
            throw new \InvalidArgumentException("yeah, not a table.column level identifier");
        }

        $columnName = array_pop( $identifier );
        $tableName = implode('.',$identifier );

        $table = new Query( <<<SQL
SELECT
    a.attrelid::text || '.' || a.attnum AS key
FROM
    pg_attribute AS a
WHERE
    a.attrelid = quote_ident(%tableName:%)::regclass::oid AND
    attname = %columnName:% AND
    a.attnum > 0
SQL
,
            array(
                'tableName' => $tableName,
                'columnName' => $columnName,
            )
        );

        try {
            $columnKey = $this->db->query( $table )->fetch( Result::FETCH_SINGLE );
        } catch( \Exception $e ) {
            return null;
        }

        return $this->find( $columnKey );

    }
452752
protected function extractMarkerLength($i)
	{
		// Extract length only
		list(, $unpacked) = unpack("H*", substr($this->data, $i, self::LONG_SIZE));

		// Get width and height from unpacked size info
		$markerLength = hexdec(substr($unpacked, 0, 4));

		return $markerLength;
	}
274055
protected function _getIdColumnName()
        {
            if (!is_null($this->_instance_id_column)) {
                return $this->_instance_id_column;
            }

            if (isset(self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name])) {
                return self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name];
            }

            return self::$_config[$this->_connection_name]['id_column'];
        }
871721
protected function logoEmpresa($i)
    {
        $this->Ln(2);
        $this->SetFont($this->PadraoFont, '', $this->fdes);

        $logo = preg_replace('/\&.*/', '', $this->boleto[$i]->getLogo());
        $ext = pathinfo($logo, PATHINFO_EXTENSION);

        if ($this->boleto[$i]->getLogo() && !empty($this->boleto[$i]->getLogo())) {
            $this->Image($this->boleto[$i]->getLogo(), 20, ($this->GetY()), 0, 12, $ext);
        }
        $this->Cell(56);
        $this->Cell(0, $this->desc, $this->_($this->boleto[$i]->getBeneficiario()->getNome()), 0, 1);
        $this->Cell(56);
        $this->Cell(0, $this->desc, $this->_($this->boleto[$i]->getBeneficiario()->getDocumento(), '##.###.###/####-##'), 0, 1);
        $this->Cell(56);
        $this->Cell(0, $this->desc, $this->_($this->boleto[$i]->getBeneficiario()->getEndereco()), 0, 1);
        $this->Cell(56);
        $this->Cell(0, $this->desc, $this->_($this->boleto[$i]->getBeneficiario()->getCepCidadeUf()), 0, 1);
        $this->Ln(8);

        return $this;
    }
1201700
protected function getIdentifier( $alias )
    {
        $aliasParts = explode( '.', $alias );
        $identifiers = array();
        // If the alias consists of one part, then we just look it up in the
        // array. If we find it, we use it, otherwise we return the name as-is
        // and assume it's just a column name. The alias target can be a fully
        // qualified name (table.column).
        if ( count( $aliasParts ) == 1 )
        {
            if ( $this->aliases !== null &&
                array_key_exists( $alias, $this->aliases ) )
            {
                $alias = $this->aliases[$alias];
            }
            return $alias;
        }
        // If the passed name consist of two parts, we need to check all parts
        // of the passed-in name for aliases, because an alias can be made for
        // both a table name and a column name. For each element we try to find
        // whether we have an alias mapping. Unlike the above case, the alias
        // target can in this case *not* consist of a fully qualified name as
        // this would introduce another part of the name (with two dots).
        for ( $i = 0; $i < count( $aliasParts ); $i++ )
        {
            if ( $this->aliases !== null &&
                array_key_exists( $aliasParts[$i], $this->aliases ) )
            {
                // We only use the found alias if the alias target is not a fully
                // qualified name (table.column).
                $tmpAlias = $this->aliases[$aliasParts[$i]];
                if ( count( explode( '.', $tmpAlias ) ) === 1 )
                {
                    $aliasParts[$i] = $this->aliases[$aliasParts[$i]];
                }
            }
        }
        $alias = join( '.', $aliasParts );
        return $alias;
    }
163832
protected static function getInternal($identifier)
    {
        $ids = explode('.', $identifier);
        $base = &self::$container;

        while ($current = array_shift($ids)) {
            if (is_array($base) && array_key_exists($current, $base)) {
                $base = &$base[$current];
            } else {
                return null;
            }
        }

        $result = $base;

        return $result;
    }
778321
public function col_id($col, $table=false){
    
    if ( substr_count($col, ".") === 2 ){
      return $col;
    }
    else if ( substr_count($col, ".") === 1 ){
      if ( $table ){
        return $this->table_id($table).'.'.$this->simple_name($col);
      }
      else{
        return $this->simple_name($this->client_db).'.'.$col;
      }
    }
    else if ( $table ){
      return $this->table_id($table).'.'.$col;
    }
  }