mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 21:32:25 -05:00 
			
		
		
		
	[chore] Update bun and sqlite dependencies (#478)
* update bun + sqlite versions * step bun to v1.1.3
This commit is contained in:
		
					parent
					
						
							
								8d34d5af3c
							
						
					
				
			
			
				commit
				
					
						88979b35d4
					
				
			
		
					 246 changed files with 409690 additions and 148967 deletions
				
			
		
							
								
								
									
										38
									
								
								vendor/github.com/uptrace/bun/schema/field.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								vendor/github.com/uptrace/bun/schema/field.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -10,6 +10,7 @@ import ( | |||
| 
 | ||||
| type Field struct { | ||||
| 	StructField reflect.StructField | ||||
| 	IsPtr       bool | ||||
| 
 | ||||
| 	Tag          tagparser.Tag | ||||
| 	IndirectType reflect.Type | ||||
|  | @ -51,15 +52,36 @@ func (f *Field) Value(strct reflect.Value) reflect.Value { | |||
| 	return fieldByIndexAlloc(strct, f.Index) | ||||
| } | ||||
| 
 | ||||
| func (f *Field) HasZeroValue(v reflect.Value) bool { | ||||
| 	for _, idx := range f.Index { | ||||
| func (f *Field) HasNilValue(v reflect.Value) bool { | ||||
| 	if len(f.Index) == 1 { | ||||
| 		return v.Field(f.Index[0]).IsNil() | ||||
| 	} | ||||
| 
 | ||||
| 	for _, index := range f.Index { | ||||
| 		if v.Kind() == reflect.Ptr { | ||||
| 			if v.IsNil() { | ||||
| 				return true | ||||
| 			} | ||||
| 			v = v.Elem() | ||||
| 		} | ||||
| 		v = v.Field(idx) | ||||
| 		v = v.Field(index) | ||||
| 	} | ||||
| 	return v.IsNil() | ||||
| } | ||||
| 
 | ||||
| func (f *Field) HasZeroValue(v reflect.Value) bool { | ||||
| 	if len(f.Index) == 1 { | ||||
| 		return f.IsZero(v.Field(f.Index[0])) | ||||
| 	} | ||||
| 
 | ||||
| 	for _, index := range f.Index { | ||||
| 		if v.Kind() == reflect.Ptr { | ||||
| 			if v.IsNil() { | ||||
| 				return true | ||||
| 			} | ||||
| 			v = v.Elem() | ||||
| 		} | ||||
| 		v = v.Field(index) | ||||
| 	} | ||||
| 	return f.IsZero(v) | ||||
| } | ||||
|  | @ -70,7 +92,7 @@ func (f *Field) AppendValue(fmter Formatter, b []byte, strct reflect.Value) []by | |||
| 		return dialect.AppendNull(b) | ||||
| 	} | ||||
| 
 | ||||
| 	if f.NullZero && f.IsZero(fv) { | ||||
| 	if (f.IsPtr && fv.IsNil()) || (f.NullZero && f.IsZero(fv)) { | ||||
| 		return dialect.AppendNull(b) | ||||
| 	} | ||||
| 	if f.Append == nil { | ||||
|  | @ -98,14 +120,6 @@ func (f *Field) ScanValue(strct reflect.Value, src interface{}) error { | |||
| 	return f.ScanWithCheck(fv, src) | ||||
| } | ||||
| 
 | ||||
| func (f *Field) markAsPK() { | ||||
| 	f.IsPK = true | ||||
| 	f.NotNull = true | ||||
| 	if !f.Tag.HasOption("allowzero") { | ||||
| 		f.NullZero = true | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func indexEqual(ind1, ind2 []int) bool { | ||||
| 	if len(ind1) != len(ind2) { | ||||
| 		return false | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue