- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 500 for reflect2 (0.06 sec)
-
statement.go
} writer.WriteString(subdb.Statement.SQL.String()) stmt.Vars = subdb.Statement.Vars default: switch rv := reflect.ValueOf(v); rv.Kind() { case reflect.Slice, reflect.Array: if rv.Len() == 0 { writer.WriteString("(NULL)") } else if rv.Type().Elem() == reflect.TypeOf(uint8(0)) { stmt.Vars = append(stmt.Vars, v) stmt.DB.Dialector.BindVarTo(writer, stmt, v) } else {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 19.9K bytes - Viewed (0) -
callbacks/callmethod.go
package callbacks import ( "reflect" "gorm.io/gorm" ) func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) { tx := db.Session(&gorm.Session{NewDB: true}) if called := fc(db.Statement.ReflectValue.Interface(), tx); !called { switch db.Statement.ReflectValue.Kind() { case reflect.Slice, reflect.Array: db.Statement.CurDestIndex = 0 for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Feb 18 01:20:29 UTC 2023 - 846 bytes - Viewed (0) -
utils/tests/utils.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Mar 10 09:21:56 UTC 2023 - 3.9K bytes - Viewed (0) -
callbacks/helper_test.go
} if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf(&t1)); !loaded { t.Fatalf("loaded should be true") } // t1 already exist but t2 not if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf([]*testM{&t1, &t2, &t3})); loaded { t.Fatalf("loaded should be false") } if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf([]*testM{&t2, &t3})); !loaded { t.Fatalf("loaded should be true") } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 05 02:22:57 UTC 2024 - 3.4K bytes - Viewed (0) -
schema/utils.go
} return reflect.StructTag(fmt.Sprintf(`gorm:"%s;%s"`, value, t)) } // GetRelationsValues get relations's values from a reflect value func GetRelationsValues(ctx context.Context, reflectValue reflect.Value, rels []*Relationship) (reflectResults reflect.Value) { for _, rel := range rels { reflectResults = reflect.MakeSlice(reflect.SliceOf(reflect.PtrTo(rel.FieldSchema.ModelType)), 0, 1) appendToResults := func(value reflect.Value) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Aug 19 13:35:14 UTC 2023 - 5.5K bytes - Viewed (0) -
callbacks/associations.go
isPtr := fieldType.Kind() == reflect.Ptr if !isPtr { fieldType = reflect.PtrTo(fieldType) } elems := reflect.MakeSlice(reflect.SliceOf(fieldType), 0, 10) distinctElems := reflect.MakeSlice(reflect.SliceOf(fieldType), 0, 10) joins := reflect.MakeSlice(reflect.SliceOf(reflect.PtrTo(rel.JoinTable.ModelType)), 0, 10) objs := []reflect.Value{}
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Apr 11 03:06:13 UTC 2023 - 14.3K bytes - Viewed (0) -
association.go
switch reflectValue.Kind() { case reflect.Slice, reflect.Array: for i := 0; i < reflectValue.Len(); i++ { association.Error = rel.Field.Set(association.DB.Statement.Context, reflectValue.Index(i), reflect.Zero(rel.Field.FieldType).Interface()) } case reflect.Struct: association.Error = rel.Field.Set(association.DB.Statement.Context, reflectValue, reflect.Zero(rel.Field.FieldType).Interface()) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
scan.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 10.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/DummyProxy.java
import com.google.common.collect.Sets; import com.google.common.reflect.AbstractInvocationHandler; import com.google.common.reflect.Invokable; import com.google.common.reflect.Parameter; import com.google.common.reflect.TypeToken; import java.io.Serializable; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Set; import org.checkerframework.checker.nullness.qual.Nullable; /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 08 17:31:55 UTC 2024 - 3.9K bytes - Viewed (0) -
callbacks/preload.go
if reflectFieldValue.Kind() == reflect.Ptr && reflectFieldValue.IsNil() { reflectFieldValue.Set(reflect.New(rel.Field.FieldType.Elem())) } reflectFieldValue = reflect.Indirect(reflectFieldValue) switch reflectFieldValue.Kind() { case reflect.Struct: tx.AddError(rel.Field.Set(tx.Statement.Context, data, elem.Interface())) case reflect.Slice, reflect.Array:
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 11.6K bytes - Viewed (0)