Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for foreignValues (0.34 sec)

  1. schema/utils.go

    	}
    	return resultsMap, results
    }
    
    // ToQueryValues to query values
    func ToQueryValues(table string, foreignKeys []string, foreignValues [][]interface{}) (interface{}, []interface{}) {
    	queryValues := make([]interface{}, len(foreignValues))
    	if len(foreignKeys) == 1 {
    		for idx, r := range foreignValues {
    			queryValues[idx] = r[0]
    		}
    
    		return clause.Column{Table: table, Name: foreignKeys[0]}, queryValues
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Aug 19 13:35:14 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  2. callbacks/preload.go

    				relForeignFields = append(relForeignFields, ref.PrimaryKey)
    				foreignFields = append(foreignFields, ref.ForeignKey)
    			}
    		}
    
    		identityMap, foreignValues = schema.GetIdentityFieldValuesMap(tx.Statement.Context, reflectValue, foreignFields)
    		if len(foreignValues) == 0 {
    			return nil
    		}
    	}
    
    	// nested preload
    	for p, pvs := range preloads {
    		tx = tx.Preload(p, pvs...)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. callbacks/delete.go

    							Value:  ref.PrimaryValue,
    						})
    					}
    				}
    
    				_, foreignValues := schema.GetIdentityFieldValuesMap(db.Statement.Context, db.Statement.ReflectValue, foreignFields)
    				column, values := schema.ToQueryValues(table, relForeignKeys, foreignValues)
    				queryConds = append(queryConds, clause.IN{Column: column, Values: values})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Feb 25 02:48:23 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  4. schema/relationship.go

    				relForeignKeys = append(relForeignKeys, ref.PrimaryKey.DBName)
    				foreignFields = append(foreignFields, ref.ForeignKey)
    			}
    		}
    	}
    
    	_, foreignValues := GetIdentityFieldValuesMap(ctx, reflectValue, foreignFields)
    	column, values := ToQueryValues(table, relForeignKeys, foreignValues)
    
    	conds = append(conds, clause.IN{Column: column, Values: values})
    	return
    }
    
    func copyableDataType(str DataType) bool {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top