- Sort Score
- Result 10 results
- Languages All
Results 351 - 360 of 1,025 for _func (0.03 sec)
-
tests/table_test.go
gorm.Model Name string } func (UserWithTableNamer) TableName(namer schema.Namer) string { return namer.TableName("user") } func TestTableWithNamer(t *testing.T) { db, _ := gorm.Open(tests.DummyDialector{}, &gorm.Config{ NamingStrategy: schema.NamingStrategy{ TablePrefix: "t_", }, }) sql := db.ToSQL(func(tx *gorm.DB) *gorm.DB {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
internal/dsync/utils.go
package dsync import ( "math/rand" "time" ) func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration { if unit > time.Hour { // Protect against integer overflow panic("unit cannot exceed one hour") } return func(r *rand.Rand, attempt uint) time.Duration { sleep := min sleep += unit * time.Duration(attempt) if sleep > cap {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat May 13 15:42:21 UTC 2023 - 1.2K bytes - Viewed (0) -
clause/group_by.go
package clause // GroupBy group by clause type GroupBy struct { Columns []Column Having []Expression } // Name from clause name func (groupBy GroupBy) Name() string { return "GROUP BY" } // Build build group by clause func (groupBy GroupBy) Build(builder Builder) { for idx, column := range groupBy.Columns { if idx > 0 { builder.WriteByte(',') } builder.WriteQuoted(column) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 30 10:28:09 UTC 2021 - 1K bytes - Viewed (0) -
schema/index.go
sort.Slice(idx.Fields, func(i, j int) bool { return idx.Fields[i].priority < idx.Fields[j].priority }) indexes[index.Name] = idx } } } for _, index := range indexes { if index.Class == "UNIQUE" && len(index.Fields) == 1 { index.Fields[0].Field.UniqueIndex = index.Name } } return indexes } func (schema *Schema) LookIndex(name string) *Index {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 3.7K bytes - Viewed (0) -
internal/bucket/lifecycle/filter_test.go
t.Run(fmt.Sprintf("Test %d", i+1), func(t *testing.T) { var filter Filter err := xml.Unmarshal([]byte(tc.inputXML), &filter) if err != nil { t.Fatalf("%d: Expected no error but got %v", i+1, err) } err = filter.Validate() if err != tc.expectedErr { t.Fatalf("%d: Expected %v but got %v", i+1, tc.expectedErr, err) } }) } } func TestObjectSizeFilters(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 27 00:01:20 UTC 2024 - 7.2K bytes - Viewed (0) -
cmd/metacache-stream_test.go
func loadMetacacheSample(t testing.TB) *metacacheReader { b, err := os.ReadFile("testdata/metacache.s2") if err != nil { t.Fatal(err) } return newMetacacheReader(bytes.NewReader(b)) } func loadMetacacheSampleEntries(t testing.TB) metaCacheEntriesSorted { r := loadMetacacheSample(t) defer r.Close()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 15K bytes - Viewed (0) -
cmd/os_unix.go
"fmt" "os" "strings" "sync" "syscall" "unsafe" "golang.org/x/sys/unix" ) func access(name string) error { if err := unix.Access(name, unix.F_OK); err != nil { return &os.PathError{Op: "lstat", Path: name, Err: err} } return nil } // openFileWithFD return 'fd' based file descriptor func openFileWithFD(name string, flag int, perm os.FileMode) (fd int, err error) { switch flag & writeMode {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.3K bytes - Viewed (0) -
tests/prepared_stmt_test.go
if err := tx.Find(&result3, user2.ID).Error; err != nil { t.Fatalf("no error should happen but got %v", err) } } func TestPreparedStmtFromTransaction(t *testing.T) { db := DB.Session(&gorm.Session{PrepareStmt: true, SkipDefaultTransaction: true}) tx := db.Begin() defer func() { if r := recover(); r != nil { tx.Rollback() } }() if err := tx.Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
internal/event/target/mqtt.go
loggerOnce logger.LogOnce } // ID - returns target ID. func (target *MQTTTarget) ID() event.TargetID { return target.id } // Name - returns the Name of the target. func (target *MQTTTarget) Name() string { return target.ID().String() } // Store returns any underlying store if set. func (target *MQTTTarget) Store() event.TargetStore { return target.store }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.2K bytes - Viewed (0) -
internal/s3select/json/reader.go
return dstRec, nil } // Close - closes underlying reader. func (r *Reader) Close() error { // Close the input. err := r.readCloser.Close() for range r.valueCh { // Drain values so we don't leak a goroutine. // Since we have closed the input, it should fail rather quickly. } return err } // NewReader - creates new JSON reader using readCloser. func NewReader(readCloser io.ReadCloser, args *ReaderArgs) *Reader {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.2K bytes - Viewed (0)