subtype_field : ID type_ref NL
511656
def p_enumerated_subtype_field(self, p):
        ''
        p[0] = AstSubtypeField(
            self.path, p.lineno(1), p.lexpos(1), p[1], p[2])
1304891
def get_field_def(
    schema: GraphQLSchema, parent_type: GraphQLType, field_node: FieldNode
) -> Optional[GraphQLField]:
    
    name = field_node.name.value
    if name == "__schema" and schema.query_type is parent_type:
        return SchemaMetaFieldDef
    if name == "__type" and schema.query_type is parent_type:
        return TypeMetaFieldDef
    if name == "__typename" and is_composite_type(parent_type):
        return TypeNameMetaFieldDef
    if is_object_type(parent_type) or is_interface_type(parent_type):
        parent_type = cast(Union[GraphQLObjectType, GraphQLInterfaceType], parent_type)
        return parent_type.fields.get(name)
    return None
1211871
def type_in_db(self, tp, params):
        
        tw = TypeWrapper(tp, params)
        return self.version_db.is_versioned(tw)
685566
def subtype_ids(elements, subtype):
    
    return [i for (i, element) in enumerate(elements)
            if isinstance(element, subtype)]
571189
def p_example_field_ref(self, p):
        ''
        p[0] = AstExampleField(self.path, p.lineno(1), p.lexpos(1),
            p[1], AstExampleRef(self.path, p.lineno(3), p.lexpos(3), p[3]))
247134
def lookupBaseFieldTypeByName( fieldName )
      type = ""
      fid = lookupFieldIDByName( fieldName )
      field = lookupField( fid ) if fid
      type = field.attributes[ "base_type" ] if field
      type
   end
629890
def lookupFieldTypeByName( fieldName )
      type = ""
      fid = lookupFieldIDByName( fieldName )
      field = lookupField( fid ) if fid
      type = field.attributes[ "field_type" ] if field
      type
   end
1205
def sub_types
      # Iterate through the Google::Protobuf::FieldDescriptor list
      entries.map do |fd|
        # fd.name = 'current_entity_to_update'
        # fd.number = 1
        # fd.label = :optional
        # fd.submsg_name = "com.foo.bar.Baz"
        # fd.subtype = #<Google::Protobuf::Descriptor:0x007fabb3947f08>
        if fd.subtype.class == Google::Protobuf::Descriptor
          # There is a subtype; recurse
          [name, fd.submsg_name] + fd.subtype.sub_types
        else
          [name, fd.submsg_name]
        end
      end.flatten.compact
    end
1068668
def mk_id(field):
  
  name = field.type_id
  if name == "string":
    return "%s" % ("char")
  elif name == "array" and field.size:
    if field.options['fill'].value not in CONSTRUCT_CODE:
      return "%s" % convert(field.options['fill'].value)
    else:
      return "%s" % field.options['fill'].value
  elif name == "array":
    return "%s" % convert(field.options['fill'].value)
  elif name not in CONSTRUCT_CODE:
    return convert(name)
  else:
    return name
82535
def lookUpFieldType(field_type):
    
    if field_type == "esriFieldTypeDate":
        return "DATE"
    elif field_type == "esriFieldTypeInteger":
        return "LONG"
    elif field_type == "esriFieldTypeSmallInteger":
        return "SHORT"
    elif field_type == "esriFieldTypeDouble":
        return "DOUBLE"
    elif field_type == "esriFieldTypeString":
        return "TEXT"
    elif field_type == "esriFieldTypeBlob":
        return "BLOB"
    elif field_type == "esriFieldTypeSingle":
        return "FLOAT"
    elif field_type == "esriFieldTypeRaster":
        return "RASTER"
    elif field_type == "esriFieldTypeGUID":
        return "GUID"
    elif field_type == "esriFieldTypeGlobalID":
        return "TEXT"
    else:
        return "TEXT"
59609
function mapFieldTypeToBindType($field_type)
    {
        switch ($field_type) {
        case MYSQLI_TYPE_DECIMAL:
        case MYSQLI_TYPE_NEWDECIMAL:
        case MYSQLI_TYPE_FLOAT:
        case MYSQLI_TYPE_DOUBLE:
        case MYSQLI_TYPE_BIT:
        case MYSQLI_TYPE_TINY:
        case MYSQLI_TYPE_SHORT:
        case MYSQLI_TYPE_LONG:
        case MYSQLI_TYPE_LONGLONG:
        case MYSQLI_TYPE_INT24:
        case MYSQLI_TYPE_YEAR:
        case MYSQLI_TYPE_ENUM:
            return 'number';

        case MYSQLI_TYPE_DATE:
            return 'date';

        case MYSQLI_TYPE_TIME:
            return 'time';
        case MYSQLI_TYPE_TIMESTAMP:
        case MYSQLI_TYPE_DATETIME:
        case MYSQLI_TYPE_NEWDATE:
            return 'datetime';
        
        case MYSQLI_TYPE_VAR_STRING:
        case MYSQLI_TYPE_STRING:
        case MYSQLI_TYPE_CHAR:
        case MYSQLI_TYPE_GEOMETRY:
        case MYSQLI_TYPE_TINY_BLOB:
        case MYSQLI_TYPE_MEDIUM_BLOB:
        case MYSQLI_TYPE_LONG_BLOB:
        case MYSQLI_TYPE_BLOB:
            return 'string';

        default:
            return 'unknown';
        }
    }
477997
def _get_info_singlevalue_subfield(info, field):
        
        search = re.search(pattern=field + " (?P<value>\d+)", string=info)
        return {field: int(search.group("value"))}
249455
def refkeys(self,fields):
    ""
    # todo doc: better explanation of what refkeys are and how fields plays in
    dd=collections.defaultdict(list)
    if any(f not in self.REFKEYS for f in fields): raise ValueError(fields,'not all in',self.REFKEYS.keys())
    for f in fields:
      rk=self.REFKEYS[f]
      for model in rk.refmodels: dd[model].extend(rk.pkeys(self,f))
    return dd
323000
def p_subind_str(p):
    
    p[0] = (make_typecast(TYPE.uinteger, p[2], p.lineno(1)),
            make_typecast(TYPE.uinteger, p[4], p.lineno(3)))
416143
def children_types( record, index, key='refs', stop_types=STOP_TYPES ):
    """"""
    types = {}
    for child in children( record, index, key, stop_types=stop_types ):
        types.setdefault(child['type'],[]).append( child )
    return types
1094453
function genTypePartial(gen, field, fieldIndex, ref) {
  return field.resolvedType.group ?
    gen('types[%i].encode(%s,w.uint32(%i)).uint32(%i)', fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) :
    gen('types[%i].encode(%s,w.uint32(%i).fork()).ldelim()', fieldIndex, ref, (field.id << 3 | 2) >>> 0);
}
305164
def config_field_type(field, cls):
    
    return defs.ConfigField(lambda _: isinstance(_, cls),
                            lambda: CONFIG_FIELD_TYPE_ERROR.format(field, cls.__name__))