Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for Assignment (0.07 sec)

  1. clause/set.go

    	}
    	return assignments
    }
    
    func AssignmentColumns(values []string) Set {
    	assignments := make([]Assignment, len(values))
    	for idx, value := range values {
    		assignments[idx] = Assignment{Column: Column{Name: value}, Value: Column{Table: "excluded", Name: value}}
    	}
    	return assignments
    }
    
    // Assignments implements Assigner for a single Assignment.
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Tue Sep 09 01:34:33 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  2. clause/set_test.go

    func TestAssignments(t *testing.T) {
    	set := clause.Assignments(map[string]interface{}{
    		"name": "jinzhu",
    		"age":  18,
    	})
    
    	assignments := []clause.Assignment(set)
    
    	sort.Slice(assignments, func(i, j int) bool {
    		return strings.Compare(assignments[i].Column.Name, assignments[j].Column.Name) > 0
    	})
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Mon Sep 08 11:18:54 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  3. callbacks/update.go

    							set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now.UnixNano()})
    						} else if field.AutoUpdateTime == schema.UnixMillisecond {
    							set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now.UnixMilli()})
    						} else if field.AutoUpdateTime == schema.UnixSecond {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun May 25 07:40:40 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  4. clause/association.go

    type AssociationAssigner interface {
    	AssociationAssignments() []Association
    }
    
    // Assignments implements the Assigner interface so that AssociationOperation can be used as a Set method parameter
    func (ao Association) Assignments() []Assignment {
    	return []Assignment{}
    }
    
    // AssociationAssignments implements the AssociationAssigner interface
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Sep 12 05:42:26 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  5. tests/test_union_body_discriminator_annotated.py

            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/pet/assignment": {
                        "post": {
                            "summary": "Create Pet Assignment",
                            "operationId": "create_pet_assignment_pet_assignment_post",
                            "requestBody": {
                                "content": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  6. callbacks/create.go

    								if field.AutoUpdateTime > 0 {
    									assignment := clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: curTime}
    									switch field.AutoUpdateTime {
    									case schema.UnixNanosecond:
    										assignment.Value = curTime.UnixNano()
    									case schema.UnixMillisecond:
    										assignment.Value = curTime.UnixMilli()
    									case schema.UnixSecond:
    										assignment.Value = curTime.Unix()
    									}
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Tue Jul 29 11:06:13 UTC 2025
    - 13K bytes
    - Viewed (0)
  7. tests/association_generics_test.go

    	}
    
    	// Test Set + Create with belongs-to association using field assignment
    	err := gorm.G[User](DB).Set(
    		clause.Assignment{Column: clause.Column{Name: "name"}, Value: "TestClauseAssociationSetCreateWithBelongsTo"},
    		clause.Assignment{Column: clause.Column{Name: "age"}, Value: 25},
    		clause.Assignment{Column: clause.Column{Name: "company_id"}, Value: company.ID},
    	).Create(ctx)
    	if err != nil {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Sep 12 05:42:26 UTC 2025
    - 37.9K bytes
    - Viewed (0)
  8. tests/generics_test.go

    		Type:        clause.OpCreate,
    		Set: []clause.Assignment{
    			{Column: clause.Column{Name: "amount"}, Value: 100},
    			{Column: clause.Column{Name: "state"}, Value: "new"},
    		},
    	}
    
    	// Verify it implements Assigner interface
    	assignments := assoc.Assignments()
    	if len(assignments) != 0 {
    		t.Errorf("Association.Assignments() should return empty slice, got %v", assignments)
    	}
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Nov 02 14:09:18 UTC 2025
    - 33.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/Ascii.java

       * processing or telecommunication systems, more especially switching devices "on" or "off." (If a
       * single "stop" control is required to interrupt or turn off ancillary devices, DC4 is the
       * preferred assignment.)
       *
       * @since 8.0
       */
      public static final byte DC1 = 17; // aka XON
    
      /**
       * Transmission On: Although originally defined as DC1, this ASCII control character is now better
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 21.7K bytes
    - Viewed (0)
  10. generics.go

    	var (
    		assigns  []clause.Assignment
    		assocOps []clause.Association
    	)
    
    	for _, item := range items {
    		// Check if it's an AssociationAssigner
    		if assocAssigner, ok := item.(clause.AssociationAssigner); ok {
    			assocOps = append(assocOps, assocAssigner.AssociationAssignments()...)
    		} else {
    			assigns = append(assigns, item.Assignments()...)
    		}
    	}
    
    	return setCreateOrUpdateG[T]{
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Nov 02 14:09:18 UTC 2025
    - 25.9K bytes
    - Viewed (0)
Back to top