// ResolveType adds a resolved fully qualified type name
543621
func (nsr *NamespaceResolver) ResolveType(n node.Node) {
	switch nn := n.(type) {
	case *node.Nullable:
		nsr.ResolveType(nn.Expr)
	case name.Names:
		nsr.ResolveName(n, "")
	}
}
73948
func ResolveAuthConfig(ctx context.Context, cli Cli, index *registrytypes.IndexInfo) types.AuthConfig {
	configKey := index.Name
	if index.Official {
		configKey = ElectAuthServer(ctx, cli)
	}

	a, _ := cli.ConfigFile().GetAuthConfig(configKey)
	return types.AuthConfig(a)
}
1072180
func (g *graph) ResolveAll() []reflect.Value {
	var values []reflect.Value
	for _, def := range g.definitions {
		values = append(values, def.Resolve(g))
	}
	return values
}
111266
func (s *SearchService) SearchType(searchType string) *SearchService {
	s.searchType = searchType
	return s
}
776124
func (api *NameAPI) Resolve(ctx context.Context, name string, opts ...caopts.NameResolveOption) (coreiface.Path, error) {
	results, err := api.Search(ctx, name, opts...)
	if err != nil {
		return nil, err
	}

	err = coreiface.ErrResolveFailed
	var p coreiface.Path

	for res := range results {
		p, err = res.Path, res.Err
		if err != nil {
			break
		}
	}

	return p, err
}
1267021
func (r *Resolver) ResolveErr(qname, qtype string) (RRs, error) {
	ctx, cancel := context.WithTimeout(context.Background(), r.timeout)
	defer cancel()
	return r.resolve(ctx, toLowerFQDN(qname), qtype, 0)
}
998026
func (c Configuration) Resolve() (string, error) {
	listenAddrType := c.ListenAddressType

	var listenAddress string
	switch listenAddrType {
	case ConfigResolver:
		if c.Value == nil {
			err := fmt.Errorf("missing listen address value using: resolver=%s",
				string(listenAddrType))
			return "", err
		}
		listenAddress = *c.Value

	case EnvironmentResolver:
		// environment variable for port is required
		if c.EnvVarListenPort == nil {
			err := fmt.Errorf("missing port env var name using: resolver=%s",
				string(listenAddrType))
			return "", err
		}
		portStr := os.Getenv(*c.EnvVarListenPort)
		port, err := strconv.Atoi(portStr)
		if err != nil {
			err := fmt.Errorf("invalid port env var value using: resolver=%s, name=%s",
				string(listenAddrType), *c.EnvVarListenPort)
			return "", err
		}
		// if environment variable for hostname is not set, use the default
		if c.EnvVarListenHost == nil {
			listenAddress = fmt.Sprintf("%s:%d", defaultHostname, port)
		} else {
			envHost := os.Getenv(*c.EnvVarListenHost)
			listenAddress = fmt.Sprintf("%s:%d", envHost, port)
		}

	default:
		return "", fmt.Errorf("unknown listen address type: resolver=%s",
			string(listenAddrType))
	}

	return listenAddress, nil
}
458216
func (p *parser) prefixType(reg TypeRegistry, t *Type, prefix string) *Type {
	pre := TypeName(prefix)
	switch t.Variant {
	case TypeVariantAliasTypeDef:
		t.AliasTypeDef.Name = pre + t.AliasTypeDef.Name
		if !reg.IsBaseTypeName(t.AliasTypeDef.Type) {
			t.AliasTypeDef.Type = TypeRef(pre) + t.AliasTypeDef.Type
		}
	case TypeVariantStringTypeDef:
		t.StringTypeDef.Name = pre + t.StringTypeDef.Name
		if !reg.IsBaseTypeName(t.StringTypeDef.Type) {
			t.StringTypeDef.Type = TypeRef(pre) + t.StringTypeDef.Type
		}
	case TypeVariantNumberTypeDef:
		t.NumberTypeDef.Name = pre + t.NumberTypeDef.Name
		if !reg.IsBaseTypeName(t.NumberTypeDef.Type) {
			t.NumberTypeDef.Type = TypeRef(pre) + t.NumberTypeDef.Type
		}
	case TypeVariantArrayTypeDef:
		t.ArrayTypeDef.Name = pre + t.ArrayTypeDef.Name
		if !reg.IsBaseTypeName(t.ArrayTypeDef.Type) {
			t.ArrayTypeDef.Type = TypeRef(pre) + t.ArrayTypeDef.Type
		}
		if !reg.IsBaseTypeName(t.ArrayTypeDef.Items) {
			t.ArrayTypeDef.Items = TypeRef(pre) + t.ArrayTypeDef.Items
		}
	case TypeVariantMapTypeDef:
		t.MapTypeDef.Name = pre + t.MapTypeDef.Name
		if !reg.IsBaseTypeName(t.MapTypeDef.Type) {
			t.MapTypeDef.Type = TypeRef(pre) + t.MapTypeDef.Type
		}
		if t.MapTypeDef.Keys != "" && !reg.IsBaseTypeName(t.MapTypeDef.Keys) {
			t.MapTypeDef.Keys = TypeRef(pre) + t.MapTypeDef.Keys
		}
		if t.MapTypeDef.Items != "" && !reg.IsBaseTypeName(t.MapTypeDef.Items) {
			t.MapTypeDef.Items = TypeRef(pre) + t.MapTypeDef.Items
		}
	case TypeVariantStructTypeDef:
		t.StructTypeDef.Name = pre + t.StructTypeDef.Name
		if !reg.IsBaseTypeName(t.StructTypeDef.Type) {
			t.StructTypeDef.Type = TypeRef(pre) + t.StructTypeDef.Type
		}
		for _, f := range t.StructTypeDef.Fields {
			if !reg.IsBaseTypeName(f.Type) {
				f.Type = TypeRef(pre) + f.Type
			}
			if f.Keys != "" && !reg.IsBaseTypeName(f.Keys) {
				f.Keys = TypeRef(pre) + f.Keys
			}
			if f.Items != "" && !reg.IsBaseTypeName(f.Items) {
				f.Items = TypeRef(pre) + f.Items
			}
		}
	case TypeVariantBytesTypeDef:
		t.BytesTypeDef.Name = pre + t.BytesTypeDef.Name
		if !reg.IsBaseTypeName(t.BytesTypeDef.Type) {
			t.BytesTypeDef.Type = TypeRef(pre) + t.BytesTypeDef.Type
		}
	case TypeVariantEnumTypeDef:
		t.EnumTypeDef.Name = pre + t.EnumTypeDef.Name
		if !reg.IsBaseTypeName(t.EnumTypeDef.Type) {
			t.EnumTypeDef.Type = TypeRef(pre) + t.EnumTypeDef.Type
		}
	case TypeVariantUnionTypeDef:
		t.UnionTypeDef.Name = pre + t.UnionTypeDef.Name
		if !reg.IsBaseTypeName(t.UnionTypeDef.Type) {
			t.UnionTypeDef.Type = TypeRef(pre) + t.UnionTypeDef.Type
		}
		for i := 0; i < len(t.UnionTypeDef.Variants); i++ {
			if !reg.IsBaseTypeName(t.UnionTypeDef.Variants[i]) {
				t.UnionTypeDef.Variants[i] = TypeRef(pre) + t.UnionTypeDef.Variants[i]
			}
		}
	case TypeVariantBaseType:
		return nil
	}
	return t
}
349637
func (ns *Namespace) ResolveAlias(nameNode node.Node, aliasType string) (string, error) {
	aliasType = strings.ToLower(aliasType)
	nameParts := nameNode.(*name.Name).Parts

	firstPartStr := nameParts[0].(*name.NamePart).Value

	if len(nameParts) > 1 { // resolve aliases for qualified names, always against class alias type
		firstPartStr = strings.ToLower(firstPartStr)
		aliasType = ""
	} else {
		if aliasType != "const" { // constants are case-sensitive
			firstPartStr = strings.ToLower(firstPartStr)
		}
	}

	aliasName, ok := ns.Aliases[aliasType][firstPartStr]
	if !ok {
		return "", errors.New("Not found")
	}

	return aliasName, nil
}
284370
func (p *PhysicalHashJoin) ResolveIndices() (err error) {
	err = p.physicalSchemaProducer.ResolveIndices()
	if err != nil {
		return err
	}
	lSchema := p.children[0].Schema()
	rSchema := p.children[1].Schema()
	for i, fun := range p.EqualConditions {
		lArg, err := fun.GetArgs()[0].ResolveIndices(lSchema)
		if err != nil {
			return err
		}
		rArg, err := fun.GetArgs()[1].ResolveIndices(rSchema)
		if err != nil {
			return err
		}
		p.EqualConditions[i] = expression.NewFunctionInternal(fun.GetCtx(), fun.FuncName.L, fun.GetType(), lArg, rArg).(*expression.ScalarFunction)
	}
	for i, expr := range p.LeftConditions {
		p.LeftConditions[i], err = expr.ResolveIndices(lSchema)
		if err != nil {
			return err
		}
	}
	for i, expr := range p.RightConditions {
		p.RightConditions[i], err = expr.ResolveIndices(rSchema)
		if err != nil {
			return err
		}
	}
	for i, expr := range p.OtherConditions {
		p.OtherConditions[i], err = expr.ResolveIndices(expression.MergeSchema(lSchema, rSchema))
		if err != nil {
			return err
		}
	}
	return
}
310942
func resolveInterface(uses map[*ast.Ident]types.Object, iface *ast.InterfaceType) error {
	var rmi []int
	for i, m := range iface.Methods.List {
		if len(m.Names) > 0 {
			continue
		}
		newIface, err := exprInterfaceType(uses, m.Type)
		if err != nil {
			return err
		}
		iface.Methods.List = append(iface.Methods.List, newIface.Methods.List...)
		rmi = append(rmi, i)
	}

	// After adding the signatures, remove the embedded interface
	for i := len(rmi) - 1; i >= 0; i-- {
		iface.Methods.List = append(iface.Methods.List[:i], iface.Methods.List[i+1:]...)
	}

	return nil
}
466380
func (ctx *ServiceContext) ResolvePath(path string) string {
	return ctx.config.ResolvePath(path)
}
206998
func BindType(driverName string) int {
	switch driverName {
	case "postgres", "pgx", "pq-timeouts", "cloudsqlpostgres", "ql":
		return DOLLAR
	case "mysql":
		return QUESTION
	case "sqlite3":
		return QUESTION
	case "oci8", "ora", "goracle":
		return NAMED
	case "sqlserver":
		return AT
	}
	return UNKNOWN
}
1207765
func AddressedTypes(providerAddrs []addrs.ProviderConfig) []string {
	if len(providerAddrs) == 0 {
		return nil
	}
	m := map[string]struct{}{}
	for _, addr := range providerAddrs {
		m[addr.Type] = struct{}{}
	}

	names := make([]string, 0, len(m))
	for typeName := range m {
		names = append(names, typeName)
	}

	sort.Strings(names) // Stable result for tests
	return names
}
905935
func defaultResolveTypeFn(p ResolveTypeParams, abstractType Abstract) *Object {
	possibleTypes := p.Info.Schema.PossibleTypes(abstractType)
	for _, possibleType := range possibleTypes {
		if possibleType.IsTypeOf == nil {
			continue
		}
		isTypeOfParams := IsTypeOfParams{
			Value:   p.Value,
			Info:    p.Info,
			Context: p.Context,
		}
		if res := possibleType.IsTypeOf(isTypeOfParams); res {
			return possibleType
		}
	}
	return nil
}
1004255
func (sf *ScalarFunction) ResolveIndices(schema Schema) {
	for _, arg := range sf.GetArgs() {
		arg.ResolveIndices(schema)
	}
}
56532
func (r *ReindexDestination) Type(typ string) *ReindexDestination {
	r.typ = typ
	return r
}