mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-04 00:32:24 -06:00 
			
		
		
		
	Update dependencies (#333)
This commit is contained in:
		
					parent
					
						
							
								ce22e03f9d
							
						
					
				
			
			
				commit
				
					
						182b4eea73
					
				
			
		
					 848 changed files with 377869 additions and 107280 deletions
				
			
		
							
								
								
									
										8
									
								
								vendor/github.com/jackc/pgconn/stmtcache/lru.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/jackc/pgconn/stmtcache/lru.go
									
										
									
										generated
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -42,6 +42,14 @@ func NewLRU(conn *pgconn.PgConn, mode int, cap int) *LRU {
 | 
			
		|||
 | 
			
		||||
// Get returns the prepared statement description for sql preparing or describing the sql on the server as needed.
 | 
			
		||||
func (c *LRU) Get(ctx context.Context, sql string) (*pgconn.StatementDescription, error) {
 | 
			
		||||
	if ctx != context.Background() {
 | 
			
		||||
		select {
 | 
			
		||||
		case <-ctx.Done():
 | 
			
		||||
			return nil, ctx.Err()
 | 
			
		||||
		default:
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// flush an outstanding bad statements
 | 
			
		||||
	txStatus := c.conn.TxStatus()
 | 
			
		||||
	if (txStatus == 'I' || txStatus == 'T') && len(c.stmtsToClear) > 0 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue