Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for fc (0.28 sec)

  1. callbacks/preload.go

    	column, values := schema.ToQueryValues(clause.CurrentTable, relForeignKeys, foreignValues)
    
    	if len(values) != 0 {
    		for _, cond := range conds {
    			if fc, ok := cond.(func(*gorm.DB) *gorm.DB); ok {
    				tx = fc(tx)
    			} else {
    				inlineConds = append(inlineConds, cond)
    			}
    		}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  2. migrator/migrator.go

    	gorm.Dialector
    }
    
    type printSQLLogger struct {
    	logger.Interface
    }
    
    func (l *printSQLLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {
    	sql, _ := fc()
    	fmt.Println(sql + ";")
    	l.Interface.Trace(ctx, begin, fc, err)
    }
    
    // GormDataTypeInterface gorm data type interface
    type GormDataTypeInterface interface {
    	GormDBDataType(*gorm.DB, *schema.Field) string
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  3. tests/preload_test.go

    	DB.Create(&users)
    
    	query := make([]string, 0)
    	sess := DB.Session(&gorm.Session{Logger: Tracer{
    		Logger: DB.Config.Logger,
    		Test: func(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {
    			sql, _ := fc()
    			query = append(query, sql)
    		},
    	}})
    
    	var result []User
    	err := sess.
    		Joins("Manager").
    		Preload("Manager.Tools").
    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