Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for topo (0.5 sec)

  1. tests/sql_builder_test.go

    	// By default DB.DryRun should false
    	if DB.DryRun {
    		t.Fatal("Failed expect DB.DryRun to be false")
    	}
    
    	if DB.Dialector.Name() == "sqlserver" {
    		t.Skip("Skip SQL Server for this test, because it too difference with other dialects.")
    	}
    
    	date, _ := time.ParseInLocation("2006-01-02", "2021-10-18", time.Local)
    
    	// find
    	sql := DB.ToSQL(func(tx *gorm.DB) *gorm.DB {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Jan 12 08:42:21 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  2. association.go

    		}
    
    		for i := 0; i < reflectValue.Len(); i++ {
    			appendToRelations(reflectValue.Index(i), reflect.Indirect(reflect.ValueOf(values[i])), clear)
    			if association.Error != nil {
    				return
    			}
    
    			// TODO support save slice data, sql with case?
    			association.Error = associationDB.Updates(reflectValue.Index(i).Addr().Interface()).Error
    		}
    	case reflect.Struct:
    		// clear old data
    		if clear && len(values) == 0 {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  3. migrator/migrator.go

    // For example, values that can pass this regular expression are:
    // - "123"
    // - "abc456"
    // -"%$#@789"
    var regFullDataType = regexp.MustCompile(`\D*(\d+)\D?`)
    
    // TODO:? Create const vars for raw sql queries ?
    
    var _ gorm.Migrator = (*Migrator)(nil)
    
    // Migrator m struct
    type Migrator struct {
    	Config
    }
    
    // Config schema config
    type Config struct {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Apr 26 07:15:49 UTC 2024
    - 29K bytes
    - Viewed (0)
  4. schema/schema.go

    	}
    	for _, cbName := range callbackTypes {
    		if methodValue := callBackToMethodValue(modelValue, cbName); methodValue.IsValid() {
    			switch methodValue.Type().String() {
    			case "func(*gorm.DB) error": // TODO hack
    				reflect.Indirect(reflect.ValueOf(schema)).FieldByName(string(cbName)).SetBool(true)
    			default:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  5. tests/migrate_test.go

    				if v, ok := columnType.Unique(); !sqlserver && (!ok || !v) {
    					t.Fatalf("column code2 unique should be correct, name: %v, column: %#v", columnType.Name(),
    						columnType)
    				}
    			case "code3":
    				// TODO
    				// if v, ok := columnType.Unique(); !ok || v {
    				// 	t.Fatalf("column code unique should be correct, name: %v, column: %#v", columnType.Name(), columnType)
    				// }
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 11:24:16 UTC 2024
    - 56.2K bytes
    - Viewed (0)
Back to top