Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for It (4.75 sec)

  1. tests/migrate_test.go

    						columnType.Name(), columnType.DatabaseTypeName(), dataType, columnType)
    				}
    			}
    		}
    	}
    }
    
    func TestTableType(t *testing.T) {
    	// currently it is only supported for mysql driver
    	if !isMysql() {
    		return
    	}
    
    	const tblName = "cities"
    	const tblSchema = "gorm"
    	const tblType = "BASE TABLE"
    	const tblComment = "foobar comment"
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  2. tests/query_test.go

    		t.Errorf("Should have user Name when selected it")
    	}
    
    	var result2 User
    	DB.Where("name = ?", user.Name).Select("name as name").Find(&result2)
    	if result2.ID != 0 {
    		t.Errorf("Should not have ID because only selected name, %+v", result2.ID)
    	}
    
    	if user.Name != result2.Name {
    		t.Errorf("Should have user Name when selected it")
    	}
    
    	dryDB := DB.Session(&gorm.Session{DryRun: true})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top