Modify field schema.
428977
def modify_schema(self, field_schema):
        """"""
        field_schema['pattern'] = utilities.convert_python_regex_to_ecma(
            self.pattern, self.flags)
1038190
def add_field(self, field):
        """"""
        self.remove_field(field.name)
        self._fields[field.name] = field

        if field.default is not None:
            if six.callable(field.default):
                self._default_callables[field.key] = field.default
            else:
                self._defaults[field.key] = field.default
1064804
public void add(String fldName, Schema sch) {
		Type type = sch.type(fldName);
		addField(fldName, type);
	}
212445
def prepend_schema(self, name):
        
        return '.'.join([self.schema, name]) if self.schema else name
516852
def transform_field(field):
    """"""
    field.name = field.attname
    if isinstance(field, models.AutoField):
        field.__class__ = models.IntegerField

    elif isinstance(field, models.FileField):
        # Don't copy file, just path.
        field.__class__ = models.TextField

    # Historical instance shouldn't change create/update timestamps
    field.auto_now = False
    field.auto_now_add = False

    if field.primary_key or field.unique:
        # Unique fields can no longer be guaranteed unique,
        # but they should still be indexed for faster lookups.
        field.primary_key = False
        field._unique = False
        field.db_index = True
        field.serialize = True
945600
def to_schema(self):
        """"""
        if not self.name or not self.process:
            raise ValueError("field is not registered with process")

        schema = {
            'name': self.name,
            'type': self.get_field_type(),
        }
        if self.required is not None:
            schema['required'] = self.required
        if self.label is not None:
            schema['label'] = self.label
        if self.description is not None:
            schema['description'] = self.description
        if self.default is not None:
            schema['default'] = self.default
        if self.hidden is not None:
            schema['hidden'] = self.hidden
        if self.choices is not None:
            for choice, label in self.choices:
                schema.setdefault('choices', []).append({
                    'label': label,
                    'value': choice,
                })

        return schema
467594
function (Schema, fieldName, parent) {
		var schema = new Schema();
		var name = fieldName.replace(this.KEY_FIELD_REG_EXP, this._patchFormat(schema));

		return parent.field(name).like(schema);
	}
877272
def modify_schema(self, field_schema):
        """"""
        field_schema['minimum'] = self.minimum_value
        if self.exclusive:
            field_schema['exclusiveMinimum'] = True
115900
def modify(self, **params):
        """"""
        data = self.api_client.update_account(self.id, **params)
        self.update(data)
        return data
445793
def extend_schema_spec(self) -> None:
        
        super().extend_schema_spec()

        identity_field = {
            'Name': '_identity',
            'Type': BtsType.STRING,
            'Value': 'identity',
            ATTRIBUTE_INTERNAL: True
        }

        if self.ATTRIBUTE_FIELDS in self._spec:
            self._spec[self.ATTRIBUTE_FIELDS].insert(0, identity_field)
            self.schema_loader.add_schema_spec(identity_field, self.fully_qualified_name)
13850
public function modifyTable()
    {
        $table = $this->getTable();
        if (!$table->hasPrimaryKey() && !$table->hasBehavior('concrete_inheritance')) {
            $columnAttributes = array_merge(['primaryKey' => 'true'], $this->getParameters());
            $this->getTable()->addColumn($columnAttributes);
        }
    }
171914
protected function initSchemaFields()
    {
        $schema = static::getSchemaFields();
        $parser = static::getDatabase()->getParser();

        // prepare field values strip schema definitions
        foreach ($schema as $field) {
            $this->{$field} = $parser->getNotationValue($this->{$field});
        }
    }
132139
def update(self, **args):
        """"""
        data = {}
        for field in args:
            data[field] = args[field]

        super(Version, self).update(**data)
1027053
def add_field(self, field, **kwargs):
        """"""
        getattr(self, self._private_fields_name).append(field)
        self._expire_cache(reverse=True)
        self._expire_cache(reverse=False)
1167715
def AddDescriptorFromSchema(self, schema_name, schema):
        """"""
        # TODO(craigcitro): Is schema_name redundant?
        if self.__GetDescriptor(schema_name):
            return
        if schema.get('enum'):
            self.__DeclareEnum(schema_name, schema)
            return
        if schema.get('type') == 'any':
            self.__DeclareMessageAlias(schema, 'extra_types.JsonValue')
            return
        if schema.get('type') != 'object':
            raise ValueError('Cannot create message descriptors for type %s' %
                             schema.get('type'))
        message = extended_descriptor.ExtendedMessageDescriptor()
        message.name = self.__names.ClassName(schema['id'])
        message.description = util.CleanDescription(schema.get(
            'description', 'A %s object.' % message.name))
        self.__DeclareDescriptor(message.name)
        with self.__DescriptorEnv(message):
            properties = schema.get('properties', {})
            for index, (name, attrs) in enumerate(sorted(properties.items())):
                field = self.__FieldDescriptorFromProperties(
                    name, index + 1, attrs)
                message.fields.append(field)
                if field.name != name:
                    message.field_mappings.append(
                        type(message).JsonFieldMapping(
                            python_name=field.name, json_name=name))
                    self.__AddImport(
                        'from %s import encoding' % self.__base_files_package)
            if 'additionalProperties' in schema:
                self.__AddAdditionalProperties(message, schema, properties)
        self.__RegisterDescriptor(message)
162079
def extend(self, values):
        """"""
        if self.asserted:
            raise RuntimeError("Fact already asserted")

        self._multifield.extend(values)
39059
def _replace(self, **kwds):
        ''
        result = self._make(map(kwds.pop, self._fields, self))
        
        if kwds:
            raise ValueError('Got unexpected field names: %r' % kwds.keys())
        
        return result