mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-31 22:32:25 -05:00
Update dependencies (#333)
This commit is contained in:
parent
ce22e03f9d
commit
182b4eea73
848 changed files with 377869 additions and 107280 deletions
30
vendor/github.com/jackc/pgx/v4/batch.go
generated
vendored
30
vendor/github.com/jackc/pgx/v4/batch.go
generated
vendored
|
|
@ -41,6 +41,9 @@ type BatchResults interface {
|
|||
// QueryRow reads the results from the next query in the batch as if the query has been sent with Conn.QueryRow.
|
||||
QueryRow() Row
|
||||
|
||||
// QueryFunc reads the results from the next query in the batch as if the query has been sent with Conn.QueryFunc.
|
||||
QueryFunc(scans []interface{}, f func(QueryFuncRow) error) (pgconn.CommandTag, error)
|
||||
|
||||
// Close closes the batch operation. This must be called before the underlying connection can be used again. Any error
|
||||
// that occurred during a batch operation may have made it impossible to resyncronize the connection with the server.
|
||||
// In this case the underlying connection will have been closed.
|
||||
|
|
@ -135,6 +138,33 @@ func (br *batchResults) Query() (Rows, error) {
|
|||
return rows, nil
|
||||
}
|
||||
|
||||
// QueryFunc reads the results from the next query in the batch as if the query has been sent with Conn.QueryFunc.
|
||||
func (br *batchResults) QueryFunc(scans []interface{}, f func(QueryFuncRow) error) (pgconn.CommandTag, error) {
|
||||
rows, err := br.Query()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
for rows.Next() {
|
||||
err = rows.Scan(scans...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = f(rows)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return rows.CommandTag(), nil
|
||||
}
|
||||
|
||||
// QueryRow reads the results from the next query in the batch as if the query has been sent with QueryRow.
|
||||
func (br *batchResults) QueryRow() Row {
|
||||
rows, _ := br.Query()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue