Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for Ref (0.15 sec)

  1. callbacks/associations.go

    									rv = rv.Addr()
    								}
    
    								for _, ref := range rel.References {
    									if ref.OwnPrimaryKey {
    										fv, _ := ref.PrimaryKey.ValueOf(db.Statement.Context, obj)
    										db.AddError(ref.ForeignKey.Set(db.Statement.Context, rv, fv))
    									} else if ref.PrimaryValue != "" {
    										db.AddError(ref.ForeignKey.Set(db.Statement.Context, rv, ref.PrimaryValue))
    									}
    								}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 03:06:13 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  2. callbacks/query.go

    							for idx, ref := range relation.References {
    								if ref.OwnPrimaryKey {
    									exprs[idx] = clause.Eq{
    										Column: clause.Column{Table: parentTableName, Name: ref.PrimaryKey.DBName},
    										Value:  clause.Column{Table: tableAliasName, Name: ref.ForeignKey.DBName},
    									}
    								} else {
    									if ref.PrimaryValue == "" {
    										exprs[idx] = clause.Eq{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  3. cmd/namespace-lock.go

    		n.lockMap[resource].ref--
    		if n.lockMap[resource].ref < 0 {
    			logger.CriticalIf(GlobalContext, errors.New("resource reference count was lower than 0"))
    		}
    		if n.lockMap[resource].ref == 0 {
    			// Remove from the map if there are no more references.
    			delete(n.lockMap, resource)
    		}
    		n.lockMapMutex.Unlock()
    	}
    
    	return
    }
    
    // Unlock the namespace resource.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  4. schema/schema_helper_test.go

    			}
    
    			for _, ref := range relation.References {
    				var found bool
    				for _, rf := range r.References {
    					if (rf.PrimaryKey == nil || (rf.PrimaryKey.Name == ref.PrimaryKey && rf.PrimaryKey.Schema.Name == ref.PrimarySchema)) && (rf.PrimaryValue == ref.PrimaryValue) && (rf.ForeignKey.Name == ref.ForeignKey && rf.ForeignKey.Schema.Name == ref.ForeignSchema) && (rf.OwnPrimaryKey == ref.OwnPrimaryKey) {
    						found = true
    					}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. internal/s3select/simdj/reader_amd64_test.go

    		t.Skip("Unsupported cpu")
    	}
    
    	for _, tt := range testCases {
    		t.Run(tt.name, func(t *testing.T) {
    			ref := loadCompressed(t, tt.name)
    
    			var err error
    			dst := make(chan simdjson.Object, 100)
    			dec := NewElementReader(dst, &err, &json.ReaderArgs{ContentType: "json"})
    			pj, err := simdjson.ParseND(ref, nil)
    			if err != nil {
    				t.Fatal(err)
    			}
    			i := pj.Iter()
    			cpy := i
    			b, err := cpy.MarshalJSON()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  6. src/cmd/cgo/godefs.go

    	}
    
    	// Otherwise, if the source file says type T C.whatever,
    	// use "T" as the mangling of C.whatever,
    	// except in the definition (handled at end of function).
    	refName := make(map[*ast.Expr]*Name)
    	for _, r := range f.Ref {
    		refName[r.Expr] = r.Name
    	}
    	for _, d := range f.AST.Decls {
    		d, ok := d.(*ast.GenDecl)
    		if !ok || d.Tok != token.TYPE {
    			continue
    		}
    		for _, s := range d.Specs {
    			s := s.(*ast.TypeSpec)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  7. internal/hash/sha256/sh256_fips.go

    import (
    	fipssha256 "crypto/sha256"
    	"hash"
    )
    
    // New returns a new hash.Hash computing the SHA256 checksum.
    // The SHA256 implementation is FIPS 140-2 compliant when the
    // boringcrypto branch of Go is used.
    // Ref: https://github.com/golang/go/tree/dev.boringcrypto
    func New() hash.Hash { return fipssha256.New() }
    
    // Sum256 returns the SHA256 checksum of the data.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Aug 29 23:57:16 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  8. association.go

    				}
    			}
    
    			for _, ref := range rel.References {
    				if ref.OwnPrimaryKey {
    					primaryFields = append(primaryFields, ref.PrimaryKey)
    					foreignKeys = append(foreignKeys, ref.ForeignKey.DBName)
    					updateMap[ref.ForeignKey.DBName] = nil
    				} else if ref.PrimaryValue != "" {
    					tx.Where(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    				}
    			}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  9. schema/relationship_test.go

    			"Cat": {
    				Relations: map[string]Relation{
    					"Toy": {
    						Name:        "Toy",
    						Type:        schema.HasOne,
    						Schema:      "User",
    						FieldSchema: "Toy",
    						Polymorphic: Polymorphic{ID: "ref_id", Type: "Type", Value: "users"},
    						References: []Reference{
    							{ForeignKey: "Type", ForeignSchema: "Toy", PrimaryValue: "users"},
    						},
    					},
    				},
    			},
    		})
    	})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  10. cmd/encryption-v1_test.go

    			oRef, lRef, skipRef, snRef, psRef := decryptedRangeRef(test.decSizes, skipLen, readLen, false)
    			if o != oRef || l != lRef || skip != skipRef || sn != snRef || ps != psRef {
    				t.Errorf("Case %d: test failed: %d %d %d %d %d (Ref: %d %d %d %d %d)",
    					i, o, l, skip, sn, ps, oRef, lRef, skipRef, snRef, psRef)
    			}
    		}
    
    		// Read the last 6Mib+1 bytes of the (decrypted)
    		// object
    		//
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Sep 24 04:17:08 GMT 2022
    - 19.9K bytes
    - Viewed (0)
Back to top