Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Curtice (0.14 sec)

  1. tests/create_test.go

    	user := User{Name: "CreateUserExistingTimestamp"}
    	curTime := now.MustParse("2016-01-01")
    	user.CreatedAt = curTime
    	user.UpdatedAt = curTime
    	DB.Save(&user)
    
    	AssertEqual(t, user.CreatedAt, curTime)
    	AssertEqual(t, user.UpdatedAt, curTime)
    
    	var newUser User
    	DB.First(&newUser, user.ID)
    
    	AssertEqual(t, newUser.CreatedAt, curTime)
    	AssertEqual(t, newUser.UpdatedAt, curTime)
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  2. callbacks.go

    func (cs *callbacks) Raw() *processor {
    	return cs.processors["raw"]
    }
    
    func (p *processor) Execute(db *DB) *DB {
    	// call scopes
    	for len(db.Statement.scopes) > 0 {
    		db = db.executeScopes()
    	}
    
    	var (
    		curTime           = time.Now()
    		stmt              = db.Statement
    		resetBuildClauses bool
    	)
    
    	if len(stmt.BuildClauses) == 0 {
    		stmt.BuildClauses = p.Clauses
    		resetBuildClauses = true
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  3. callbacks/create.go

    									switch field.AutoUpdateTime {
    									case schema.UnixNanosecond:
    										assignment.Value = curTime.UnixNano()
    									case schema.UnixMillisecond:
    										assignment.Value = curTime.UnixMilli()
    									case schema.UnixSecond:
    										assignment.Value = curTime.Unix()
    									}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
Back to top