Sets the column auto increment flag.

@param boolean|null $autoIncrement The column auto increment flag.

@throws \Fridge\DBAL\Exception\SchemaException If the auto increment flag is not a boolean.
349434
public function setAutoIncrement($autoIncrement)
    {
        if (($autoIncrement !== null) && !is_bool($autoIncrement)) {
            throw SchemaException::invalidColumnAutoIncrementFlag($this->getName());
        }

        $this->autoIncrement = $autoIncrement;
    }
1315767
protected function initActiveCurrency()
    {
        $this->obActiveCurrency = null;
        if (!empty($this->sActiveCurrencyCode)) {
            $this->obActiveCurrency = $this->obCurrencyList->where('code', $this->sActiveCurrencyCode)->first();
        }

        if (empty($this->obActiveCurrency)) {
            $this->obActiveCurrency = $this->obDefaultCurrency;
        }
    }
913278
public function smallInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->table->addColumn($column, Type::SMALLINT, compact('autoIncrement', 'unsigned'));
    }
801136
public function getAutoIncrementString()
    {
        if ($this->isAutoIncrement() && IdMethod::NATIVE === $this->parentTable->getIdMethod()) {
            return $this->getPlatform()->getAutoIncrement();
        }

        if ($this->isAutoIncrement()) {
            throw new EngineException(sprintf(
                'You have specified autoIncrement for column "%s", but you have not specified idMethod="native" for table "%s".',
                $this->name,
                $this->parentTable->getName()
            ));
        }

        return '';
    }
617545
public function setNotNull($notNull)
    {
        if (($notNull !== null) && !is_bool($notNull)) {
            throw SchemaException::invalidColumnNotNullFlag($this->getName());
        }

        $this->notNull = $notNull;
    }
1269278
public function bigInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->addColumn('bigInteger', $column, compact('autoIncrement', 'unsigned'));
    }
53935
def _set_increment(self, statement):
        """"""
        assert isinstance(statement, CodeStatement)
        self.increment = statement
        statement.scope = self.body
127444
public int getAutoIncrementIncrement() throws SQLException {
    if (autoIncrementIncrement == 0) {
      lock.lock();
      try {
        Results results = new Results();
        executeQuery(true, results, "select @@auto_increment_increment");
        results.commandEnd();
        ResultSet rs = results.getResultSet();
        rs.next();
        autoIncrementIncrement = rs.getInt(1);
      } catch (SQLException e) {
        if (e.getSQLState().startsWith("08")) {
          throw e;
        }
        autoIncrementIncrement = 1;
      } finally {
        lock.unlock();
      }
    }
    return autoIncrementIncrement;
  }
944910
public function setAutoCloseState($autoCloseState)
    {
        $authorizedValues = [self::AUTO_CLOSED_STATE_CLOSED, self::AUTO_CLOSED_STATE_WAITING];
        if (in_array($autoCloseState, $authorizedValues)) {
            $this->autoCloseState = $autoCloseState;
        }
    }
1042534
protected function isColumnAutoIncremental($table, $columns)
    {
        foreach ($columns as $column) {
            if (isset($table->columns[$column]) && $table->columns[$column]->autoIncrement) {
                return true;
            }
        }
        return false;
    }
872729
public function setCreatedAt($value)
    {
        if (! is_null($column = $this->getCreatedAtColumn())) {
            $this->setAttribute($column, $value);
        }
    }
810851
public function setAutoCommit($autoCommit=true,$queryServer=null)
    {
        if($autoCommit)
            $this->query('SET AUTOCOMMIT=1',$queryServer);
        else
            $this->query('SET AUTOCOMMIT=0',$queryServer);
    }
965965
public function setAmount($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->amount !== $v) {
            $this->amount = $v;
            $this->modifiedColumns[GamecurrencyTableMap::COL_AMOUNT] = true;
        }

        return $this;
    }
802966
public function smallInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->addColumn('smallInteger', $column, compact('autoIncrement', 'unsigned'));
    }
995870
public function autoIncrementFieldValue(Event $event, EntityInterface $entity, ArrayObject $options) : void
    {
        $table = $event->getSubject();

        if (!$table instanceof Table) {
            return;
        }

        $fields = $this->getAutoIncrementFields($table);

        // skip if no auto-increment fields are defined
        if (empty($fields)) {
            return;
        }

        // skip modifying auto-increment field(s) on existing records.
        if (! $entity->isNew()) {
            foreach (array_keys($fields) as $field) {
                $entity->unsetProperty((string)$field);
            }

            return;
        }

        foreach ($fields as $field => $options) {
            // get max value
            $query = $table->find('withTrashed');

            try {
                $max = $query->select([$field => $query->func()->max($field)])
                    ->enableHydration(true)
                    ->firstOrFail();
                Assert::isInstanceOf($max, EntityInterface::class);
                $max = (float)$max->get((string)$field);
            } catch (RecordNotFoundException $e) {
                $max = 0;
            }

            if (empty($options['min'])) {
                $entity->set((string)$field, $max + 1);

                continue;
            }

            // if value is less than the allowed minimum, then set it to the minimum.
            $max = $max < $options['min'] ? $options['min'] : $max + 1;

            $entity->set((string)$field, $max);
        }
    }
227401
protected function _addSequence(Sequence $sequence)
    {
        $namespaceName = $sequence->getNamespaceName();
        $seqName       = $sequence->getFullQualifiedName($this->getName());

        if (isset($this->_sequences[$seqName])) {
            throw SchemaException::sequenceAlreadyExists($seqName);
        }

        if ($namespaceName !== null
            && ! $sequence->isInDefaultNamespace($this->getName())
            && ! $this->hasNamespace($namespaceName)) {
            $this->createNamespace($namespaceName);
        }

        $this->_sequences[$seqName] = $sequence;
    }
936339
def add_auto_increment(self, table, name):
        """"""
        # Get current column definition and add auto_incrementing
        definition = self.get_column_definition(table, name) + ' AUTO_INCREMENT'

        # Concatenate and execute modify statement
        self.execute("ALTER TABLE {0} MODIFY {1}".format(table, definition))
        self._printer('\tAdded AUTO_INCREMENT to column {0}'.format(name))
        return True