You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The translation from sqlite3store is relatively trivial, here's a snippet:
func (p*SQLite3XStore) exec(querystring, opts*sqlitex.ExecOptions) error {
conn, err:=p.pool.Take(context.Background())
iferr!=nil {
returnerr
}
deferp.pool.Put(conn)
returnsqlitex.Execute(conn, query, opts)
}
// Find returns the data for a given session token from the SQLite3XStore instance.// If the session token is not found or is expired, the returned exists flag will// be set to false.func (p*SQLite3XStore) Find(tokenstring) (b []byte, existsbool, errerror) {
err=p.exec("SELECT data FROM sessions WHERE token = $1 AND julianday('now') < expiry",
&sqlitex.ExecOptions{
Args: []any{token},
ResultFunc: func(stmt*sqlite.Stmt) error {
exists=trueb=make([]byte, stmt.ColumnLen(0))
stmt.ColumnBytes(0, b)
returnnil
},
})
return
}
The text was updated successfully, but these errors were encountered:
Is there interest in an sqlite3 store using the CGO-less translation of sqlite3 at https://modernc.org/sqlite + https://github.com/zombiezen/go-sqlite ? Performance is roughly 30% worse than the CGO version.
The translation from sqlite3store is relatively trivial, here's a snippet:
The text was updated successfully, but these errors were encountered: