Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for map (0.16 sec)

  1. chainable_api.go

    //	db.Preload("Orders", "state NOT IN (?)", "cancelled").Find(&users)
    func (db *DB) Preload(query string, args ...interface{}) (tx *DB) {
    	tx = db.getInstance()
    	if tx.Statement.Preloads == nil {
    		tx.Statement.Preloads = map[string][]interface{}{}
    	}
    	tx.Statement.Preloads[query] = args
    	return
    }
    
    // Attrs provide attributes used in [FirstOrCreate] or [FirstOrInit]
    //
    // Attrs only adds attributes if the record is not found.
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
Back to top