Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for mapValue (0.11 sec)

  1. callbacks/helper.go

    func ConvertMapToValuesForCreate(stmt *gorm.Statement, mapValue map[string]interface{}) (values clause.Values) {
    	values.Columns = make([]clause.Column, 0, len(mapValue))
    	selectColumns, restricted := stmt.SelectAndOmitColumns(true, false)
    
    	keys := make([]string, 0, len(mapValue))
    	for k := range mapValue {
    		keys = append(keys, k)
    	}
    	sort.Strings(keys)
    
    	for _, k := range keys {
    		value := mapValue[k]
    		if stmt.Schema != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Apr 14 12:32:57 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy.go

    	"k8s.io/apiserver/pkg/cel"
    )
    
    type GetFieldFunc func(*MapValue) ref.Val
    
    var _ ref.Val = (*MapValue)(nil)
    var _ traits.Mapper = (*MapValue)(nil)
    
    // MapValue is a map that lazily evaluate its value when a field is first accessed.
    // The map value is not designed to be thread-safe.
    type MapValue struct {
    	typeValue *types.Type
    
    	// values are previously evaluated values obtained from callbacks
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  3. scan.go

    		}
    	}
    }
    
    func scanIntoMap(mapValue map[string]interface{}, values []interface{}, columns []string) {
    	for idx, column := range columns {
    		if reflectValue := reflect.Indirect(reflect.Indirect(reflect.ValueOf(values[idx]))); reflectValue.IsValid() {
    			mapValue[column] = reflectValue.Interface()
    			if valuer, ok := mapValue[column].(driver.Valuer); ok {
    				mapValue[column], _ = valuer.Value()
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/value.go

    	return o
    }
    
    // NewMapValue returns an empty MapValue.
    func NewMapValue() *MapValue {
    	return &MapValue{
    		structValue: newStructValue(),
    	}
    }
    
    // MapValue declares an object with a set of named fields whose values are dynamically typed.
    type MapValue struct {
    	*structValue
    }
    
    // ConvertToObject produces an ObjectValue from the MapValue with the associated schema type.
    //
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 20.5K bytes
    - Viewed (0)
  5. src/internal/fmtsort/sort.go

    func Sort(mapValue reflect.Value) SortedMap {
    	if mapValue.Type().Kind() != reflect.Map {
    		return nil
    	}
    	// Note: this code is arranged to not panic even in the presence
    	// of a concurrent map update. The runtime is responsible for
    	// yelling loudly if that happens. See issue 33275.
    	n := mapValue.Len()
    	sorted := make(SortedMap, 0, n)
    	iter := mapValue.MapRange()
    	for iter.Next() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:31:45 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy_test.go

    	activation := &testActivation{variables: variablesMap}
    
    	// add foo as a string
    	variablesType.Fields["foo"] = apiservercel.NewDeclField("foo", apiservercel.StringType, true, nil, nil)
    	variablesMap.Append("foo", func(_ *MapValue) ref.Val {
    		return types.String("foo-string")
    	})
    
    	exp := "variables.foo == 'foo-string'"
    	v, err := compileAndRun(env, activation, exp)
    	if err != nil {
    		t.Fatalf("%q: %v", exp, err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/main/java/org/gradle/api/internal/provider/MappingProvider.java

                }
    
                return ExecutionTimeValue.value(mapValue(context, value.toValue()));
            }
        }
    
        @Nonnull
        @Override
        protected Value<OUT> mapValue(EvaluationContext.ScopeContext context, Value<? extends IN> value) {
            Value<OUT> transformedValue = super.mapValue(context, value);
            // Check MappingProvider contract with regard to the transform
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jan 17 23:22:41 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. platforms/core-configuration/model-core/src/main/java/org/gradle/api/internal/provider/TransformBackedProvider.java

                return ExecutionTimeValue.value(mapValue(context, value.toValue()));
            }
        }
    
        @Override
        protected Value<? extends OUT> calculateOwnValue(ValueConsumer consumer) {
            try (EvaluationContext.ScopeContext context = openScope()) {
                beforeRead(context);
                Value<? extends IN> value = provider.calculateValue(consumer);
                return mapValue(context, value);
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jan 17 23:22:41 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. callbacks/create.go

    			mapValues, ok := values.([]map[string]interface{})
    			if !ok {
    				if v, ok := values.(*[]map[string]interface{}); ok {
    					if *v != nil {
    						mapValues = *v
    					}
    				}
    			}
    
    			if config.LastInsertIDReversed {
    				insertID -= int64(len(mapValues)-1) * schema.DefaultAutoIncrementIncrement
    			}
    
    			for _, mapValue := range mapValues {
    				if mapValue != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 08 03:29:55 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  10. staging/src/k8s.io/api/node/v1beta1/generated.pb.go

    					postmsgIndex := iNdEx + mapmsglen
    					if postmsgIndex < 0 {
    						return ErrInvalidLengthGenerated
    					}
    					if postmsgIndex > l {
    						return io.ErrUnexpectedEOF
    					}
    					mapvalue = &resource.Quantity{}
    					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
    						return err
    					}
    					iNdEx = postmsgIndex
    				} else {
    					iNdEx = entryPreIndex
    					skippy, err := skipGenerated(dAtA[iNdEx:])
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 36.2K bytes
    - Viewed (0)
Back to top