mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 00:52:26 -05:00 
			
		
		
		
	upstep bun to v1.0.9 (#252)
This commit is contained in:
		
					parent
					
						
							
								08cb8a3385
							
						
					
				
			
			
				commit
				
					
						9a53b1a8d1
					
				
			
		
					 53 changed files with 285 additions and 791 deletions
				
			
		
							
								
								
									
										16
									
								
								vendor/github.com/uptrace/bun/query_select.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/uptrace/bun/query_select.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -297,7 +297,7 @@ func (q *SelectQuery) Relation(name string, apply ...func(*SelectQuery) *SelectQ | |||
| 		return q | ||||
| 	} | ||||
| 
 | ||||
| 	join := q.tableModel.Join(name) | ||||
| 	join := q.tableModel.join(name) | ||||
| 	if join == nil { | ||||
| 		q.setErr(fmt.Errorf("%s does not have relation=%q", q.table, name)) | ||||
| 		return q | ||||
|  | @ -314,7 +314,7 @@ func (q *SelectQuery) forEachHasOneJoin(fn func(*relationJoin) error) error { | |||
| 	if q.tableModel == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	return q._forEachHasOneJoin(fn, q.tableModel.GetJoins()) | ||||
| 	return q._forEachHasOneJoin(fn, q.tableModel.getJoins()) | ||||
| } | ||||
| 
 | ||||
| func (q *SelectQuery) _forEachHasOneJoin(fn func(*relationJoin) error, joins []relationJoin) error { | ||||
|  | @ -325,7 +325,7 @@ func (q *SelectQuery) _forEachHasOneJoin(fn func(*relationJoin) error, joins []r | |||
| 			if err := fn(j); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if err := q._forEachHasOneJoin(fn, j.JoinModel.GetJoins()); err != nil { | ||||
| 			if err := q._forEachHasOneJoin(fn, j.JoinModel.getJoins()); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 		} | ||||
|  | @ -341,7 +341,7 @@ func (q *SelectQuery) selectJoins(ctx context.Context, joins []relationJoin) err | |||
| 
 | ||||
| 		switch j.Relation.Type { | ||||
| 		case schema.HasOneRelation, schema.BelongsToRelation: | ||||
| 			err = q.selectJoins(ctx, j.JoinModel.GetJoins()) | ||||
| 			err = q.selectJoins(ctx, j.JoinModel.getJoins()) | ||||
| 		case schema.HasManyRelation: | ||||
| 			err = j.selectMany(ctx, q.db.NewSelect()) | ||||
| 		case schema.ManyToManyRelation: | ||||
|  | @ -701,8 +701,8 @@ func (q *SelectQuery) Scan(ctx context.Context, dest ...interface{}) error { | |||
| 	} | ||||
| 
 | ||||
| 	if n, _ := res.RowsAffected(); n > 0 { | ||||
| 		if tableModel, ok := model.(tableModel); ok { | ||||
| 			if err := q.selectJoins(ctx, tableModel.GetJoins()); err != nil { | ||||
| 		if tableModel, ok := model.(TableModel); ok { | ||||
| 			if err := q.selectJoins(ctx, tableModel.getJoins()); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 		} | ||||
|  | @ -744,7 +744,7 @@ func (q *SelectQuery) Count(ctx context.Context) (int, error) { | |||
| 	} | ||||
| 
 | ||||
| 	query := internal.String(queryBytes) | ||||
| 	ctx, event := q.db.beforeQuery(ctx, qq, query, nil) | ||||
| 	ctx, event := q.db.beforeQuery(ctx, qq, query, nil, q.model) | ||||
| 
 | ||||
| 	var num int | ||||
| 	err = q.conn.QueryRowContext(ctx, query).Scan(&num) | ||||
|  | @ -803,7 +803,7 @@ func (q *SelectQuery) Exists(ctx context.Context) (bool, error) { | |||
| 	} | ||||
| 
 | ||||
| 	query := internal.String(queryBytes) | ||||
| 	ctx, event := q.db.beforeQuery(ctx, qq, query, nil) | ||||
| 	ctx, event := q.db.beforeQuery(ctx, qq, query, nil, q.model) | ||||
| 
 | ||||
| 	var exists bool | ||||
| 	err = q.conn.QueryRowContext(ctx, query).Scan(&exists) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue