Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 325 for clone (0.15 sec)

  1. gorm.go

    	if sqldb, ok := connPool.(*sql.DB); ok && sqldb != nil {
    		return sqldb, nil
    	}
    
    	return nil, ErrInvalidDB
    }
    
    func (db *DB) getInstance() *DB {
    	if db.clone > 0 {
    		tx := &DB{Config: db.Config, Error: db.Error}
    
    		if db.clone == 1 {
    			// clone with new statement
    			tx.Statement = &Statement{
    				DB:        tx,
    				ConnPool:  db.Statement.ConnPool,
    				Context:   db.Statement.Context,
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  2. cmd/data-usage-cache.go

    	return hashPath(d.Info.Name)
    }
    
    // clone returns a copy of the cache with no references to the existing.
    func (d *dataUsageCache) clone() dataUsageCache {
    	clone := dataUsageCache{
    		Info:  d.Info,
    		Cache: make(map[string]dataUsageEntry, len(d.Cache)),
    	}
    	for k, v := range d.Cache {
    		clone.Cache[k] = v.clone()
    	}
    	return clone
    }
    
    // merge root of other into d.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 41.4K bytes
    - Viewed (1)
  3. internal/config/lambda/event/targetidset.go

    type TargetIDSet map[TargetID]struct{}
    
    // IsEmpty returns true if the set is empty.
    func (set TargetIDSet) IsEmpty() bool {
    	return len(set) != 0
    }
    
    // Clone - returns copy of this set.
    func (set TargetIDSet) Clone() TargetIDSet {
    	setCopy := NewTargetIDSet()
    	for k, v := range set {
    		setCopy[k] = v
    	}
    	return setCopy
    }
    
    // add - adds TargetID to the set.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  4. statement_test.go

    			s := new(Statement)
    			for w := 0; w < whereCount; w++ {
    				s = s.clone()
    				s.AddClause(clause.Where{
    					Exprs: s.BuildCondition(fmt.Sprintf("where%d", w)),
    				})
    			}
    
    			s1 := s.clone()
    			s1.AddClause(clause.Where{
    				Exprs: s.BuildCondition("FINAL1"),
    			})
    			s2 := s.clone()
    			s2.AddClause(clause.Where{
    				Exprs: s.BuildCondition("FINAL2"),
    			})
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Dec 23 13:19:41 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  5. cmd/admin-handlers-idp-config.go

    		return
    	}
    
    	var cfgList []madmin.IDPListItem
    	var err error
    	switch idpCfgType {
    	case madmin.OpenidIDPCfg:
    		cfg := globalServerConfig.Clone()
    		cfgList, err = globalIAMSys.OpenIDConfig.GetConfigList(cfg)
    	case madmin.LDAPIDPCfg:
    		cfg := globalServerConfig.Clone()
    		cfgList, err = globalIAMSys.LDAPConfig.GetConfigList(cfg)
    
    	default:
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrNotImplemented), r.URL)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  6. internal/config/errors-utils.go

    // Err implements error so we can use it anywhere
    type Err struct {
    	msg    string
    	detail string
    	action string
    	hint   string
    }
    
    // Clone returns a new Err struct with the same information
    func (u Err) Clone() Err {
    	return Err{
    		msg:    u.msg,
    		detail: u.detail,
    		action: u.action,
    		hint:   u.hint,
    	}
    }
    
    // Error returns the error message
    func (u Err) Error() string {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  7. cmd/bucket-stats.go

    func (brs *BucketReplicationStats) Empty() bool {
    	return len(brs.Stats) == 0 && brs.ReplicaSize == 0
    }
    
    // Clone creates a new BucketReplicationStats copy
    func (brs BucketReplicationStats) Clone() (c BucketReplicationStats) {
    	// This is called only by replicationStats cache and already holds a
    	// read lock before calling Clone()
    
    	c = brs
    	// We need to copy the map, so we do not reference the one in `brs`.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 13.1K bytes
    - Viewed (0)
  8. internal/config/config.go

    			} else {
    				currKVS.Delete(delKey)
    			}
    		}
    		c[subSys][tgt] = currKVS
    	} else {
    		delete(c[subSys], tgt)
    	}
    	return nil
    }
    
    // Clone - clones a config map entirely.
    func (c Config) Clone() Config {
    	cp := New()
    	for subSys, tgtKV := range c {
    		cp[subSys] = make(map[string]KVS)
    		for tgt, kv := range tgtKV {
    			cp[subSys][tgt] = append(cp[subSys][tgt], kv...)
    		}
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 02 05:11:03 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  9. src/arena/arena.go

    // slice after free may result in a fault, but this fault is also not guaranteed.
    func MakeSlice[T any](a *Arena, len, cap int) []T {
    	var sl []T
    	runtime_arena_arena_Slice(a.a, &sl, cap)
    	return sl[:len]
    }
    
    // Clone makes a shallow copy of the input value that is no longer bound to any
    // arena it may have been allocated from, returning the copy. If it was not
    // allocated from an arena, it is returned untouched. This function is useful
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  10. internal/config/batch/batch.go

    // would wait before working on next object.
    func (opts Config) KeyRotationWait() time.Duration {
    	configMu.RLock()
    	defer configMu.RUnlock()
    
    	return opts.KeyRotationWorkersWait
    }
    
    // Clone returns a copy of Config value
    func (opts Config) Clone() Config {
    	configMu.RLock()
    	defer configMu.RUnlock()
    
    	return Config{
    		ReplicationWorkersWait: opts.ReplicationWorkersWait,
    		KeyRotationWorkersWait: opts.KeyRotationWorkersWait,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Dec 06 09:09:22 GMT 2023
    - 4.7K bytes
    - Viewed (0)
Back to top