mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
update go-sqlite3 to v0.18.0 (#3204)
This commit is contained in:
23
vendor/github.com/ncruces/go-sqlite3/txn.go
generated
vendored
23
vendor/github.com/ncruces/go-sqlite3/txn.go
generated
vendored
@ -32,6 +32,19 @@ func (c *Conn) Begin() Txn {
|
||||
return Txn{c}
|
||||
}
|
||||
|
||||
// BeginConcurrent starts a concurrent transaction.
|
||||
//
|
||||
// Experimental: requires a custom build of SQLite.
|
||||
//
|
||||
// https://sqlite.org/cgi/src/doc/begin-concurrent/doc/begin_concurrent.md
|
||||
func (c *Conn) BeginConcurrent() (Txn, error) {
|
||||
err := c.Exec(`BEGIN CONCURRENT`)
|
||||
if err != nil {
|
||||
return Txn{}, err
|
||||
}
|
||||
return Txn{c}, nil
|
||||
}
|
||||
|
||||
// BeginImmediate starts an immediate transaction.
|
||||
//
|
||||
// https://sqlite.org/lang_transaction.html
|
||||
@ -217,7 +230,7 @@ func (c *Conn) txnExecInterrupted(sql string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// TxnState starts a deferred transaction.
|
||||
// TxnState determines the transaction state of a database.
|
||||
//
|
||||
// https://sqlite.org/c3ref/txn_state.html
|
||||
func (c *Conn) TxnState(schema string) TxnState {
|
||||
@ -292,3 +305,11 @@ func updateCallback(ctx context.Context, mod api.Module, pDB uint32, action Auth
|
||||
c.update(action, schema, table, int64(rowid))
|
||||
}
|
||||
}
|
||||
|
||||
// CacheFlush flushes caches to disk mid-transaction.
|
||||
//
|
||||
// https://sqlite.org/c3ref/db_cacheflush.html
|
||||
func (c *Conn) CacheFlush() error {
|
||||
r := c.call("sqlite3_db_cacheflush", uint64(c.handle))
|
||||
return c.error(r)
|
||||
}
|
||||
|
Reference in New Issue
Block a user