Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Mitake (0.19 sec)

  1. chainable_api.go

    	}
    	return
    }
    
    var tableRegexp = regexp.MustCompile(`(?i)(?:.+? AS (\w+)\s*(?:$|,)|^\w+\s+(\w+)$)`)
    
    // Table specify the table you would like to run db operations
    //
    //	// Get a user
    //	db.Table("users").Take(&result)
    func (db *DB) Table(name string, args ...interface{}) (tx *DB) {
    	tx = db.getInstance()
    	if strings.Contains(name, " ") || strings.Contains(name, "`") || len(args) > 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  2. finisher_api.go

    		}
    	}
    	tx.Statement.RaiseErrorOnNotFound = true
    	tx.Statement.Dest = dest
    	return tx.callbacks.Query().Execute(tx)
    }
    
    // Take finds the first record returned by the database in no specified order, matching given conditions conds
    func (db *DB) Take(dest interface{}, conds ...interface{}) (tx *DB) {
    	tx = db.Limit(1)
    	if len(conds) > 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  3. tests/preload_test.go

    	DB.Delete(&users3[0].Account)
    
    	if err := DB.Preload(clause.Associations).Take(&user4, "id = ?", users3[0].ID).Error; err != nil || user4.Account.ID != 0 {
    		t.Errorf("failed to query, got error %v, account: %#v", err, user4.Account)
    	}
    
    	if err := DB.Preload(clause.Associations, func(tx *gorm.DB) *gorm.DB {
    		return tx.Unscoped()
    	}).Take(&user4, "id = ?", users3[0].ID).Error; err != nil || user4.Account.ID == 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
Back to top