kvdb: add sqlite

This commit is contained in:
Elle Mouton
2022-12-15 18:13:13 +02:00
parent 3d91bb65f7
commit 74b9c9ce9a
16 changed files with 374 additions and 10 deletions

13
kvdb/sqlite/config.go Normal file
View File

@@ -0,0 +1,13 @@
package sqlite
import "time"
// Config holds sqlite configuration data.
//
//nolint:lll
type Config struct {
Timeout time.Duration `long:"timeout" description:"The time after which a database query should be timed out."`
BusyTimeout time.Duration `long:"busytimeout" description:"The maximum amount of time to wait for a database connection to become available for a query."`
MaxConnections int `long:"maxconnections" description:"The maximum number of open connections to the database. Set to zero for unlimited."`
PragmaOptions []string `long:"pragmaoptions" description:"A list of pragma options to set on a database connection. For example, 'auto_vacuum=incremental'. Note that the flag must be specified multiple times if multiple options are to be set."`
}