Set autoIncrement

@param boolean $autoIncrement

@return Attribute

@throws \InvalidArgumentException
349990
public function setAutoIncrement($autoIncrement)
    {
        if (!is_bool($autoIncrement)) {
            throw new \InvalidArgumentException('The attribute autoIncrement on the class Attribute has to be boolean (' . gettype($autoIncrement) . ('object' === gettype($autoIncrement) ? ' ' . get_class($autoIncrement) : '') . ' given).');
        }

        $this->autoIncrement = $autoIncrement;

        return $this;
    }
1126644
public function autoIncrement($table, $column, $triggerName, $sequenceName)
    {
        if (! $table || ! $column || ! $triggerName || ! $sequenceName) {
            return false;
        }

        if ($this->connection->getConfig('prefix_schema')) {
            $table        = $this->connection->getConfig('prefix_schema') . '.' . $table;
            $triggerName  = $this->connection->getConfig('prefix_schema') . '.' . $triggerName;
            $sequenceName = $this->connection->getConfig('prefix_schema') . '.' . $sequenceName;
        }

        $table  = $this->wrapValue($table);
        $column = $this->wrapValue($column);

        return $this->connection->statement("
            create trigger $triggerName
            before insert on {$table}
            for each row
                begin
            if :new.{$column} is null then
                select {$sequenceName}.nextval into :new.{$column} from dual;
            end if;
            end;");
    }
387219
public function setMin($min)
    {
        if (!is_int($min)) {
            throw new \InvalidArgumentException('The attribute min on the class Attribute has to be integer (' . gettype($min) . ('object' === gettype($min) ? ' ' . get_class($min) : '') . ' given).');
        }

        $this->min = $min;

        return $this;
    }
946843
public function setN($n)
    {
        if (is_int($n) || (gettype($n) === 'string' && Format::isVariableRef($n))) {
            $this->n = $n;
        } else {
            $msg = "The n attribute must be an integer or a variable reference, '" . gettype($n) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
585512
public function setUnique($unique)
    {
        if (!is_bool($unique)) {
            throw new \InvalidArgumentException('The attribute unique on the class Attribute has to be boolean (' . gettype($unique) . ('object' === gettype($unique) ? ' ' . get_class($unique) : '') . ' given).');
        }

        $this->unique = $unique;

        return $this;
    }
622967
public function setTotalAmount($totalAmount)
	{
		$this->validateInputIsDouble(Request::ATTRIBUTE_TOTAL_AMOUNT, $totalAmount);

		$this->totalAmount = $totalAmount;

		return $this;
	}
389238
public function setNestingLimit($limit)
	{
		$limit = (int) $limit;

		if ($limit < 1)
		{
			throw new InvalidArgumentException('nestingLimit must be a number greater than 0');
		}

		$this->nestingLimit = $limit;
	}
1269278
public function bigInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->addColumn('bigInteger', $column, compact('autoIncrement', 'unsigned'));
    }
430656
public function setPrimary($primary)
    {
        if (!is_bool($primary)) {
            throw new \InvalidArgumentException('The attribute primary on the class Attribute has to be boolean (' . gettype($primary) . ('object' === gettype($primary) ? ' ' . get_class($primary) : '') . ' given).');
        }

        $this->primary = $primary;

        return $this;
    }
317990
public function setAutoIncrement($autoIncrement)
    {
        if ($autoIncrement && !($this->dataType instanceof NumericTypeInterface)) {
            throw new LogicException(
                sprintf(
                    'Unable to set auto-increment property on the column. Data-type "%s" does not support an auto-incrementing value.',
                    $this->getDataType()->getType()
                )
            );
        }

        $this->autoIncrement = $autoIncrement;
    }
458814
public function mediumInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->addColumn('mediumInteger', $column, compact('autoIncrement', 'unsigned'));
    }
225067
final public function autoconfigure(bool $autoconfigured = true)
    {
        if ($autoconfigured && $this->definition instanceof ChildDefinition) {
            throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
        }
        $this->definition->setAutoconfigured($autoconfigured);

        return $this;
    }
880296
public function indent($increment = null)
    {
        if (null !== $increment) {
            $this->indent += $increment;
            if ($this->indent < 0) {
                throw new \InvalidArgumentException("Indent can not reach below zero!");
            }
        } else {
            $this->raw(str_repeat('    ', $this->indent));
        }
        return $this;
    }
802370
public function setSplitRule($splitRule)
    {

        if (!is_null($splitRule) && ($splitRule > 50)) {
            throw new \InvalidArgumentException('invalid value for $splitRule when calling UpdateEmailCampaign., must be smaller than or equal to 50.');
        }
        if (!is_null($splitRule) && ($splitRule < 1)) {
            throw new \InvalidArgumentException('invalid value for $splitRule when calling UpdateEmailCampaign., must be bigger than or equal to 1.');
        }

        $this->container['splitRule'] = $splitRule;

        return $this;
    }
1320681
public function getRecordId(array $identifier, string $autoIncrementColumn): int
    {
        if (isset($identifier[$autoIncrementColumn])) {
            return (int)$identifier[$autoIncrementColumn];
        }
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->select($autoIncrementColumn)
            ->from($this->table)
            ->setParameters($identifier);
        foreach (array_keys($identifier) as $key) {
            $queryBuilder->andWhere("$key = :$key");
        }
        $stmt = $this->connection->prepare($queryBuilder->getSQL());
        $stmt->execute($identifier);
        return (int)$stmt->fetchColumn();
    }
359708
public function _setAttributes($attributes)
    {
        if (is_array($attributes)) {
            foreach ($attributes as $attribute => $value) {
                $this->{$attribute} = $value;
            }

            return $this;
        }

        //@todo: put real exception here cos exception' gon be thrown either ways, so put one that makes sense
        //or something else that has more meaning
        throw new \InvalidArgumentException('Invalid argument Passed to set attributes on object');
    }
913278
public function smallInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->table->addColumn($column, Type::SMALLINT, compact('autoIncrement', 'unsigned'));
    }