mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:42:25 -05:00
bump to modernc.org/sqlite v1.29.7 (#2850)
This commit is contained in:
parent
c67bbe5ba0
commit
b3f2d44143
120 changed files with 631479 additions and 58069 deletions
41
vendor/modernc.org/sqlite/sqlite.go
generated
vendored
41
vendor/modernc.org/sqlite/sqlite.go
generated
vendored
|
|
@ -1138,32 +1138,6 @@ func (c *conn) bindText(pstmt uintptr, idx1 int, value string) (uintptr, error)
|
|||
return p, nil
|
||||
}
|
||||
|
||||
// C documentation
|
||||
//
|
||||
// int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
|
||||
func (c *conn) bindBlob(pstmt uintptr, idx1 int, value []byte) (uintptr, error) {
|
||||
if value != nil && len(value) == 0 {
|
||||
if rc := sqlite3.Xsqlite3_bind_zeroblob(c.tls, pstmt, int32(idx1), 0); rc != sqlite3.SQLITE_OK {
|
||||
return 0, c.errstr(rc)
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
p, err := c.malloc(len(value))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if len(value) != 0 {
|
||||
copy((*libc.RawMem)(unsafe.Pointer(p))[:len(value):len(value)], value)
|
||||
}
|
||||
if rc := sqlite3.Xsqlite3_bind_blob(c.tls, pstmt, int32(idx1), p, int32(len(value)), 0); rc != sqlite3.SQLITE_OK {
|
||||
c.free(p)
|
||||
return 0, c.errstr(rc)
|
||||
}
|
||||
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// C documentation
|
||||
//
|
||||
// int sqlite3_bind_int(sqlite3_stmt*, int, int);
|
||||
|
|
@ -1830,6 +1804,21 @@ type ExecQuerierContext interface {
|
|||
driver.QueryerContext
|
||||
}
|
||||
|
||||
// Commit releases all resources associated with the Backup object but does not
|
||||
// close the destination database connection.
|
||||
//
|
||||
// The destination database connection is returned to the caller or an error if raised.
|
||||
// It is the responsibility of the caller to handle the connection closure.
|
||||
func (b *Backup) Commit() (driver.Conn, error) {
|
||||
rc := sqlite3.Xsqlite3_backup_finish(b.srcConn.tls, b.pBackup)
|
||||
|
||||
if rc == sqlite3.SQLITE_OK {
|
||||
return b.dstConn, nil
|
||||
} else {
|
||||
return nil, b.srcConn.errstr(rc)
|
||||
}
|
||||
}
|
||||
|
||||
// ConnectionHookFn function type for a connection hook on the Driver. Connection
|
||||
// hooks are called after the connection has been set up.
|
||||
type ConnectionHookFn func(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue