- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for mapvalues (0.2 sec)
-
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 {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Apr 14 12:32:57 GMT 2022 - 3.7K bytes - Viewed (0) -
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 {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 08 03:29:55 GMT 2024 - 12.5K bytes - Viewed (0) -
tests/create_test.go
} // case 1: one record, create from map[string]interface{} mapValue1 := map[string]interface{}{"name": "create_from_map_with_schema1", "age": 1} if err := DB.Model(&User{}).Create(mapValue1).Error; err != nil { t.Fatalf("failed to create data from map, got error: %v", err) } if _, ok := mapValue1["id"]; !ok { t.Fatal("failed to create data from map with table, returning map has no primary key") }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
association.go
_, pvs := schema.GetIdentityFieldValuesMap(association.DB.Statement.Context, reflectValue, rel.Schema.PrimaryFields) if pcolumn, pvalues := schema.ToQueryValues(rel.Schema.Table, rel.Schema.PrimaryFieldDBNames, pvs); len(pvalues) > 0 { conds = append(conds, clause.IN{Column: pcolumn, Values: pvalues}) } else { return ErrPrimaryKeyRequired }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu May 04 11:30:45 GMT 2023 - 21.2K bytes - Viewed (0) -
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()
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Apr 26 09:53:11 GMT 2024 - 9.8K bytes - Viewed (0) -
internal/config/identity/openid/jwt.go
// as the sole audience. The azp value is a case sensitive // string containing a StringOrURI value azpValues, ok := policy.GetValuesFromClaims(claims, azpClaim) if !ok { return errors.New("STS JWT Token has `azp` claim invalid, `azp` must match configured OpenID Client ID") } if !azpValues.Contains(pCfg.ClientID) { return errors.New("STS JWT Token has `azp` claim invalid, `azp` must match configured OpenID Client ID")
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Nov 16 04:42:31 GMT 2023 - 8.3K bytes - Viewed (5) -
tests/postgres_test.go
); ALTER TABLE public.log_usage ALTER COLUMN log_id ADD GENERATED BY DEFAULT AS IDENTITY ( SEQUENCE NAME public.log_usage_log_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1 ); `).Error; err != nil { t.Fatalf("failed to create table, got error %v", err) } columns, err := DB.Migrator().ColumnTypes("log_usage") if err != nil {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Oct 08 09:16:32 GMT 2022 - 6.4K bytes - Viewed (3)