mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
bump ncruces/go-sqlite3 to v0.21.0 (#3621)
This commit is contained in:
10
vendor/github.com/ncruces/go-sqlite3/stmt.go
generated
vendored
10
vendor/github.com/ncruces/go-sqlite3/stmt.go
generated
vendored
@ -582,7 +582,9 @@ func (s *Stmt) ColumnRawBlob(col int) []byte {
|
||||
func (s *Stmt) columnRawBytes(col int, ptr uint32) []byte {
|
||||
if ptr == 0 {
|
||||
r := s.c.call("sqlite3_errcode", uint64(s.c.handle))
|
||||
s.err = s.c.error(r)
|
||||
if r != _ROW && r != _DONE {
|
||||
s.err = s.c.error(r)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -637,7 +639,7 @@ func (s *Stmt) ColumnValue(col int) Value {
|
||||
// [TEXT] as string, and [BLOB] as []byte.
|
||||
// Any []byte are owned by SQLite and may be invalidated by
|
||||
// subsequent calls to [Stmt] methods.
|
||||
func (s *Stmt) Columns(dest []any) error {
|
||||
func (s *Stmt) Columns(dest ...any) error {
|
||||
defer s.c.arena.mark()()
|
||||
count := uint64(len(dest))
|
||||
typePtr := s.c.arena.new(count)
|
||||
@ -666,6 +668,10 @@ func (s *Stmt) Columns(dest []any) error {
|
||||
dest[i] = nil
|
||||
default:
|
||||
ptr := util.ReadUint32(s.c.mod, dataPtr+0)
|
||||
if ptr == 0 {
|
||||
dest[i] = []byte{}
|
||||
continue
|
||||
}
|
||||
len := util.ReadUint32(s.c.mod, dataPtr+4)
|
||||
buf := util.View(s.c.mod, ptr, uint64(len))
|
||||
if types[i] == byte(TEXT) {
|
||||
|
Reference in New Issue
Block a user