Returns an expression for a given argument index
@param \eMapper\Query\Field $field
@param string $index
@return string
169757
public function buildArgumentExpression(Field $field, $index) {
		$type = $field->getType();
		if (isset($type))
			return '#{' . "$index:$type" . '}';
		return '#{' . $index . '}';
	}
522626
public function column($field)
    {
        $query = clone $this->_queryForWrite();

        return $query->select($field)->execute()->column($field);
    }
514154
protected static function loadByPrimaryKey($index, $fields = null)
    {
        //
        $table = static::getTable();

        // get primary key
        $key = static::getPrimaryKey();

        //
        $alias = static::getClassName();

        //
        $join = null;

        //
        $requestedFields = $fields ? $fields : static::getDefaultFields();

        // parse SQL select fields
        $selectFields = static::getDatabase()
            ->getWriter()
            ->selectFields($requestedFields, $alias, $join);

        // prepare SQL query
        $sql = " SELECT {$selectFields} "
             ."   FROM {$table} AS {$alias} {$join} "
             ."  WHERE {$alias}.{$key}=:index "
             .'  LIMIT 1';

        $params = [
            'index' => $index,
        ];

        // fetch data on database and return it
        $result = static::fetch($sql, $params, [
            'SingleRow'     => true,
            'SingleValue'   => is_string($fields),
            'CastToObject'  => is_null($fields),
            //'ExpanseObject' => static::isReadable(),
            'ExpanseObject' => false,
        ]);

        //
        return $result;
    }
769443
public function getArgument($index)
    {
        if ($index < 0 || $index > count($this->arguments) - 1) {
            throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, count($this->arguments) - 1));
        }

        return $this->arguments[$index];
    }
1214461
public function getArgument(int $index): ReflectionArgument
    {
        if (!isset($this->arguments[$index])) {
            throw new ReflectionException("No such argument with index '{$index}'");
        }

        return $this->arguments[$index];
    }
315762
public function getDropIndexDDL(Index $index)
    {
        $pattern = "
DROP INDEX %s;
";

        return sprintf($pattern, $this->quoteIdentifier($index->getName()));
    }
566493
public function val($index = 0) {

		if(false === ('-' . intval($index) == '-' . $index)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($index)), E_USER_ERROR);
		}

		$val = $this -> strip();

		if(true === isset($val[$index])) {
			return $val[$index];
		}

		return null;
	}
814146
public function getIndexDeclarationSQL($name, Index $index)
    {
        $columns = $index->getQuotedColumns($this);
        $name = new Identifier($name);

        if (count($columns) == 0) {
            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
        }

        return 'INDEX ' . $name->getQuotedName($this) . ' USING FULLTEXT ('. $this->getIndexFieldDeclarationListSQL($columns) . ')';
    }
281471
public function getArgument($index)
    {
        if (!is_int($index)) {
            throw new InvalidArgumentException('integer', 0);
        }

        if (!isset($this->arguments[$index])) {
            return null;
        }

        return $this->arguments[$index];
    }
1314725
private function parseIndex( SimpleXMLElement $index )
    {
        $indexFields = array();

        foreach ( $index->field as $indexField )
        {
            $indexFieldName = (string) $indexField->name;

            $indexFields[$indexFieldName] = ezcDbSchema::createNewIndexField(
                isset( $indexField->sorting ) ? (string) $indexField->sorting : null
            );
        }

        return ezcDbSchema::createNewIndex(
            $indexFields,
            isset( $index->primary ) ? (string) $index->primary : false,
            isset( $index->unique ) ? (string) $index->unique : false
        );
    }
1101394
public function get(string $index) : string
    {
        if (!$this->isValid($index)) {
            throw new \InvalidArgumentException('The specified value does not exist');
        }
        return $this->map[$index];
    }
589585
public function getIndexDDL(Index $index)
    {
        return sprintf('%sINDEX %s (%s)',
            $index->isUnique() ? 'UNIQUE ' : '',
            $this->quoteIdentifier($index->getName()),
            $this->getColumnListDDL($index->getColumnObjects())
        );
    }
1253241
public function pluck($field, $indexField=null) {

        $fieldsFormat = $field;
        $usingFormatting = preg_match_all('/{(\w+\.\w+|\w+)}/', $field, $matches);

        //Obtención del campo/s de la consulta
        $fields = [];
        if ($usingFormatting) {
            $fields = $matches[1];
            foreach ($fields as $formatField) {
                if (($pos = strpos($formatField, '.')) !== false) {
                    $replaceFormatField = substr($formatField, $pos + 1);
                    $fieldsFormat = str_replace($formatField, $replaceFormatField, $fieldsFormat);
                }
            }
        }
        else {
            $fields = [$field];
        }

        //Establecer los campos del select
        $selectFields = $fields;
        if ($indexField != null && !in_array($indexField, $selectFields)) {
            $selectFields[] = $indexField;
        }
        $this->selectFields($selectFields);

        //Obtención del campo de indice
        $returnIndexField = $indexField;
        if (!empty($returnIndexField)) {
            if (($pos = strpos($returnIndexField, '.')) !== false) {
                $returnIndexField = substr($returnIndexField, $pos + 1);
            }
        }

        //Obtención de los campos de retorno
        $returnFields = [];
        foreach ($fields as $returnField) {
            if (($pos = strpos($returnField, '.')) !== false) {
                $returnField = substr($returnField, $pos + 1);
            }
            $returnFields[] = $returnField;
        }

        //Creación del array de resultados
        $fieldResults = [];
        $results = $this->find();
        foreach ($results as $result) {
            $value = null;
            if (!$usingFormatting) {
                $value = $result->{$returnFields[0]};
            }
            else {
                $value = $fieldsFormat;
                foreach ($returnFields as $returnField) {
                    $value = str_replace("{" . $returnField . "}", $result->$returnField, $value);
                }
            }

            if ($returnIndexField != null) {
                $fieldResults[$result->$returnIndexField] = $value;
            }
            else {
                $fieldResults[] = $value;
            }
        }
        return $fieldResults;
    }
795621
public function getIndexFromDBFData($field, $value)
    {
        foreach ($this->records as $index => $record) {
            if (isset($record->DBFData[$field]) &&
                (trim(strtoupper($record->DBFData[$field])) == strtoupper($value))
            ) {
                return $index;
            }
        }

        return -1;
    }
699160
protected function addFieldIndex(&$property, Field $field)
    {
        if ($field->isIndex && !$field->isUnique) {
            $property .= '->index()';
        }

        return $this;
    }
513769
protected function getTokenAtIndex(int $index): Token
    {
        if (!$this->hasTokenAtIndex($index)) {
            throw new OutOfRangeException("No token in buffer at given index");
        }
        return $this->tokenList[$index];
    }
176897
protected function getValue($index)
    {
        if ($this->values[$index] === null) {
            return null;
        }
        return $this->values[$index]->value;
    }