Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 180 for called (0.16 sec)

  1. 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++ {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 846 bytes
    - Viewed (0)
  2. callbacks/update.go

    		callMethod(db, func(value interface{}, tx *gorm.DB) (called bool) {
    			if db.Statement.Schema.BeforeSave {
    				if i, ok := value.(BeforeSaveInterface); ok {
    					called = true
    					db.AddError(i.BeforeSave(tx))
    				}
    			}
    
    			if db.Statement.Schema.BeforeUpdate {
    				if i, ok := value.(BeforeUpdateInterface); ok {
    					called = true
    					db.AddError(i.BeforeUpdate(tx))
    				}
    			}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
  3. cmd/local-locker.go

    	}
    	return true
    }
    
    func (l *localLocker) Lock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    	if len(args.Resources) > maxDeleteList {
    		return false, fmt.Errorf("internal error: localLocker.Lock called with more than %d resources", maxDeleteList)
    	}
    
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    
    	if !l.canTakeLock(args.Resources...) {
    		// Not all locks can be taken on resources,
    		// reject it completely.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  4. cmd/service.go

    	globalServiceFreezeMu.Lock()
    	// If multiple calls, first one creates channel.
    	globalServiceFreezeCnt++
    	if globalServiceFreezeCnt == 1 {
    		globalServiceFreeze.Store(make(chan struct{}))
    	}
    	globalServiceFreezeMu.Unlock()
    }
    
    // unfreezeServices will unfreeze all incoming S3 API calls.
    // For each call, unfreezeServices must be called once.
    func unfreezeServices() {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Feb 28 07:02:14 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/pod_cache_test.go

    	}
    
    	if !reflect.DeepEqual(netns1, netns2) {
    		t.Fatalf("Expected the same Netns for the same uid, got %v and %v", netns1, netns2)
    	}
    
    	if counter.Load() != 2 {
    		t.Fatalf("Expected openNetns to be called twice, got %d", counter.Load())
    	}
    }
    
    func TestUpsertPodCacheWithNewInode(t *testing.T) {
    	counter.Store(0)
    
    	p := newPodNetnsCache(openNsTestOverrideWithInodes(1, 2))
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. src/archive/zip/writer.go

    // underlying writer. It should be used when the zip data is appended to an
    // existing file, such as a binary executable.
    // It must be called before any data is written.
    func (w *Writer) SetOffset(n int64) {
    	if w.cw.count != 0 {
    		panic("zip: SetOffset called after data was written")
    	}
    	w.cw.count = n
    }
    
    // Flush flushes any buffered data to the underlying writer.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  7. cmd/metacache-set.go

    	// If set to nil, it will not be called.
    
    	// agreed is called if all disks agreed.
    	agreed func(entry metaCacheEntry)
    
    	// partial will be called when there is disagreement between disks.
    	// if disk did not return any result, but also haven't errored
    	// the entry will be empty and errs will
    	partial func(entries metaCacheEntries, errs []error)
    
    	// finished will be called when all streams have finished and
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 19:52:52 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/lex/slice.go

    	// Cannot happen because we only have slices of already-scanned text,
    	// but be prepared.
    	s.base = base
    }
    
    func (s *Slice) Line() int {
    	return s.line
    }
    
    func (s *Slice) Col() int {
    	// TODO: Col is only called when defining a macro and all it cares about is increasing
    	// position to discover whether there is a blank before the parenthesis.
    	// We only get here if defining a macro inside a macro.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jun 29 22:49:50 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  9. internal/s3select/sql/aggregation.go

    		return e.evalAggregationNode(r, tableAlias)
    	default:
    		// TODO: traverse arguments and call aggregateRow on
    		// them if they could be an ancestor of an
    		// aggregation.
    	}
    	return nil
    }
    
    // getAggregate() implementation for each AST node follows. This is
    // called after calling aggregateRow() on each input row, to calculate
    // the final aggregate result.
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  10. cmd/sftp-server-driver.go

    	}
    
    	_, err = obj.Stat()
    	if err != nil {
    		return nil, err
    	}
    
    	return obj, nil
    }
    
    // TransferError will catch network errors during transfer.
    // When TransferError() is called Close() will also
    // be called, so we do not need to Wait() here.
    func (w *writerAt) TransferError(err error) {
    	_ = w.w.CloseWithError(err)
    	_ = w.r.CloseWithError(err)
    	w.err = err
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 12.9K bytes
    - Viewed (0)
Back to top