Specify an index for the collection.

@param string $column
@param mixed  $options

@return Blueprint
553608
public function index($columns, $name = NULL, $algorithm = NULL)
    {
        $conn = $this->connection->getConnection();
        $db = r\db($this->connection->getDatabaseName());
        $db->table($this->table)->indexCreate($column)
            ->run($conn);

        return $this;
    }
1334261
public function orderBy($column, $order = Order::ASC)
    {
        $this->orders[] = [$column, $order];
        return $this;
    }
869181
public function whereIsNotNull(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereIsNotNull($column);

        return $instance;
    }
744808
public function columnSql($column, $platform)
    {
        $type = $this->width ? "bigint({$this->width})" : "bigint";

        return $platform->columnSql($column, $type, $this->options());
    }
343317
public function whereIsNull(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereIsNull($column);

        return $instance;
    }
60388
final public function createColumnIfNotExists(Column $column): Table
    {
        if (!$this->hasColumn($column::getName())) {
            $this->createColumn($column);
        }

        return $this;
    }
615946
protected function setRelationSort($column)
    {
        list($relationName, $relationColumn) = explode('.', $column);

        if ($this->queries->contains(function ($query) use ($relationName) {
            return 'with' === $query['method'] && in_array($relationName, $query['arguments'], true);
        })) {
            $relation = $this->model->$relationName();

            $this->queries->push([
                'method' => 'join',
                'arguments' => $this->joinParameters($relation),
            ]);

            $this->resetOrderBy();

            $this->queries->push([
                'method' => 'orderBy',
                'arguments' => [
                    $relation->getRelated()->getTable().'.'.$relationColumn,
                    $this->sort['type'],
                ],
            ]);
        }
    }
812156
public function whereIs(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereIs($column);

        return $instance;
    }
882423
public function columns($column)
    {
        foreach (func_get_args() as $column) {
            $this->columns[] = $this->grammar->buildId($column);
        }

        return $this;
    }
1213195
public function dropForeignKey(string $column): AbstractTable
    {
        if (empty($schema = $this->current->findForeignKey($column))) {
            throw new SchemaException("Undefined FK on '{$column}' in '{$this->getName()}'");
        }

        //Dropping foreign from current schema
        $this->current->forgerForeignKey($schema);

        return $this;
    }
648974
public function findIndex(array $columns): ?AbstractIndex
    {
        foreach ($this->indexes as $index) {
            if ($index->getColumns() == $columns) {
                return $index;
            }
        }

        return null;
    }
1191793
final public function addColumnIfNotExists(Column $column, int $size = null): Index
    {
        if (!$this->hasColumn($column::getName())) {
            $this->addColumn($column, $size);
        } else {
            $indexColumn = $this->findIndexColumnByName($column::getName());
            if ($indexColumn->getSize() !== $size) {
                $indexColumn->setSize($size);
            }
        }

        return $this;
    }
488214
public function orderBy($column, $type = Order::ASC)
    {
        if (null !== $return = $this->validateMethodCall()) {
            return $return;
        }

        $this->orderBy[] = [$column, $type];

        return $this;
    }
943315
public function distinct($column = null)
    {
        if ($column) {
            $column = ['index' => $column];
        }

        $this->query = $this->query->distinct($column);

        return $this;
    }
590227
public function setOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $method = 'set' . $name;
            if (! method_exists($this, $method)) {
                // next major: throw an exception
                @trigger_error(sprintf(
                    'The "%s" column option is not supported,' .
                    ' setting it is deprecated and will cause an error in Doctrine 3.0',
                    $name
                ), E_USER_DEPRECATED);

                continue;
            }
            $this->$method($value);
        }

        return $this;
    }
267906
protected function createIndexModelBuilder(iterable $columns = null): ModelQueryBuilder
    {
        $builder = $this->createBuilder($this->getModelClass());

        $this
            ->applyColumnMapper($builder);

        $builder
            ->selectModelColumns($columns)
            ->fromModelTable();

        $this
            ->applyAliasFilters($builder)
            ->applySorts($builder)
            ->applyRelationshipFiltersAndSorts($builder)
            ->applyPaging($builder);

        $result = $this->builderOnIndex($builder);

        $this->clearBuilderParameters();

        return $result;
    }
194813
public static function all($column='')
    {
        $instance = new static;

        $result = $instance->newRequest($instance->functionCall,$instance->module);

        $collection = $instance->newCollection();
        foreach($result as $key => $object){
            $collection->put($key, new static((array) $object));
        }
        return $collection;
    }