mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Use created & updated instead BeforeInsert & BeforeUpdate (#2482)
* use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
This commit is contained in:
		
							
								
								
									
										12
									
								
								vendor/github.com/go-xorm/xorm/convert.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								vendor/github.com/go-xorm/xorm/convert.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -334,3 +334,15 @@ func convertInt(v interface{}) (int64, error) { | ||||
| 	} | ||||
| 	return 0, fmt.Errorf("unsupported type: %v", v) | ||||
| } | ||||
|  | ||||
| func asBool(bs []byte) (bool, error) { | ||||
| 	if len(bs) == 0 { | ||||
| 		return false, nil | ||||
| 	} | ||||
| 	if bs[0] == 0x00 { | ||||
| 		return false, nil | ||||
| 	} else if bs[0] == 0x01 { | ||||
| 		return true, nil | ||||
| 	} | ||||
| 	return strconv.ParseBool(string(bs)) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user