Sets autoincrement values for all autoincrement fields.

 @return [ true ]
774375
def update_auto_increments
      self.class.incrementing_fields.each do |field, options|
        increment!(field, options) if options[:auto]
      end && true
    end
652810
def set_all(params = self.class::DEFAULT_REQUEST_HEADER)
      params = params.data if params.class <= Resource
      params = Hash[params.map { |(k, v)| [k.to_s, v] }]
      params.each { |key, value| set(key.to_s, value) }
      self
    end
798566
def max list = @alt
      values = self[list]
      values.reduce(0){ |memo,v| (v>memo ? v : memo) }
    end
494650
def set_attributes(values)
      import_indices([values.length - 1, @max_elements - 1].min).each_with_index do |indices, i|
        param = nil
        if indices
          param = values.values_at(*indices)
          param = param[0] if param.length == 1
        end
        self.send("#{@attributes[i]}=", param)
      end
      @crc = values[-1]
    end
581069
public function setMultiple($value_pair, $ttl = null)
    {
        $this->throwInvalidArrayArgumentException($value_pair);

        foreach($value_pair as $key => $value) {
            $this->set($key, $value, $ttl);
        }

        return true;
    }
689833
protected static function _initFields()
    {
        $className = get_called_class();
        $optionsMask = [
            'type' => null,
            'length' => null,
            'primary' => null,
            'unique' => null,
            'autoincrement' => null,
            'notnull' => null,
            'unsigned' => null,
            'default' => null,
            'values' => null,
        ];

        // apply default values to field definitions
        if (!empty(static::$_classFields[$className])) {
            $fields = [];

            foreach (static::$_classFields[$className] as $field => $options) {
                if (is_string($field)) {
                    if (is_array($options)) {
                        $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field], $options);
                    } elseif (is_string($options)) {
                        $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field, 'type' => $options]);
                    } elseif ($options == null) {
                        continue;
                    }
                } elseif (is_string($options)) {
                    $field = $options;
                    $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field]);
                }

                if ($field == 'Class') {
                    // apply Class enum values
                    $fields[$field]['values'] = static::$subClasses;
                }

                if (!isset($fields[$field]['blankisnull']) && empty($fields[$field]['notnull'])) {
                    $fields[$field]['blankisnull'] = true;
                }

                if ($fields[$field]['autoincrement']) {
                    $fields[$field]['primary'] = true;
                }
            }

            static::$_classFields[$className] = $fields;
        }
    }
510874
def add(values)
      values.each do |key, val|
        k_sym = key.to_sym
        fail Override, "Property :#{key} already present" if respond_to?(k_sym)
        define_singleton_method(k_sym) { val }
      end
    end
1232901
public boolean add (int[] values)
    {
        boolean modified = false;
        int vlength = values.length;
        for (int i = 0; i < vlength; i++) {
            modified = (add(values[i]) || modified);
        }
        return modified;
    }
1318716
def calculate_set_values(self):
        
        for ac in self.asset_classes:
            ac.alloc_value = self.total_amount * ac.allocation / Decimal(100)
208723
public boolean addAll(final IntHashSet coll)
    {
        boolean acc = false;

        for (final int value : coll.values)
        {
            if (value != MISSING_VALUE)
            {
                acc |= add(value);
            }
        }

        if (coll.containsMissingValue)
        {
            acc |= add(MISSING_VALUE);
        }

        return acc;
    }
28900
def update_with(&blk)
      self.class.options.each do |name, config|
        value = yield(config)
        @values[name] = value unless value.nil?
      end
    end
1052395
def all_more_like_this_fields
      @more_like_this_field_factories_cache.values.map do |field_factories| 
        field_factories.map { |field_factory| field_factory.build }
      end.flatten
    end
277510
public function create()
    {
        $autoIncrementField = $this->getAutoIncrementField();
        if ($autoIncrementField && $this->$autoIncrementField === null) {
            $this->$autoIncrementField = $this->getNextAutoIncrementId();
        }

        $fields = $this->getFields();
        foreach ($this->getAutoFilledData(self::OP_CREATE) as $field => $value) {
            /** @noinspection NotOptimalIfConditionsInspection */
            if (!in_array($field, $fields, true) || $this->$field !== null) {
                continue;
            }
            $this->$field = $value;
        }

        $this->validate($fields);

        $this->eventsManager->fireEvent('model:beforeSave', $this);
        $this->eventsManager->fireEvent('model:beforeCreate', $this);

        $fieldValues = [];
        $defaultValueFields = [];
        foreach ($fields as $field) {
            if ($this->$field !== null) {
                $fieldValues[$field] = $this->$field;
            } elseif ($field !== $autoIncrementField) {
                $defaultValueFields[] = $field;
            }
        }

        foreach ($this->getJsonFields() as $field) {
            if (is_array($this->$field)) {
                $fieldValues[$field] = json_encode($this->$field, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
            }
        }

        /**
         * @var \ManaPHP\DbInterface $connection
         */
        $connection = $this->_di->getShared($this->getDb($this));

        if ($autoIncrementField && $this->$autoIncrementField === null) {
            $this->$autoIncrementField = (int)$connection->insert($this->getSource($this), $fieldValues, true);
        } else {
            $connection->insert($this->getSource($this), $fieldValues);
        }

        if ($defaultValueFields) {
            if ($r = static::query(null, $this)->select($defaultValueFields)->where($this->_getPrimaryKeyValuePairs())->fetch(true)) {
                foreach ($r[0] as $field => $value) {
                    $this->$field = $value;
                }
            }
        }

        $this->_snapshot = $this->toArray();

        $this->eventsManager->fireEvent('model:afterCreate', $this);
        $this->eventsManager->fireEvent('model:afterSave', $this);

        return $this;
    }
771626
def _set_all_tables(self, schema, **kwargs):
        
        with self.transaction(**kwargs) as connection:
            kwargs['connection'] = connection
            # go through and make sure all foreign key referenced tables exist
            for field_name, field_val in schema.fields.items():
                s = field_val.schema
                if s:
                    self._set_all_tables(s, **kwargs)

            # now that we know all fk tables exist, create this table
            self.set_table(schema, **kwargs)

        return True
865589
def set_roles *roles
      roles_to_set = make_valid_roles(*roles).flat_uniq
      return false if !roles_to_set || roles_to_set.empty?
      store.set_roles(roles_to_set) 
    end
492394
def clear!
      @values.delete_if do |_, value|
        if value.is_a?(::Protobuf::Field::FieldArray) || value.is_a?(::Protobuf::Field::FieldHash)
          value.clear
          false
        else
          true
        end
      end
      self
    end
264476
def input_value_for(addresses)
      own = inputs.select { |input| addresses.include?(input.output.address) }
      own.inject(0) { |sum, input| input.output.value }
    end