Documentation ¶
Overview ¶
Package sqlite contains an implementation of the `gokv.Store` interface for sqlite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ Path: "sqlite.db", TableName: defaultDBname, Codec: encoding.JSON, }
DefaultOptions is an Options object with default values.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a gokv.Store implementation for sqlite.
func NewClient ¶
NewClient creates a new sqlite client.
You must call the Close() method on the client when you're done working with it.
func (Client) Close ¶
Close closes the client. It must be called to make sure that all open transactions finish and to release all DB resources.
type Options ¶
type Options struct { // Path Path string // Name of the table in which the key-value pairs are stored. // Optional ("Item" by default). TableName string // Encoding format. // Optional (encoding.JSON by default). Codec encoding.Codec Db *gosql.DB }
Options are the options for the sqlite client.
Click to show internal directories.
Click to hide internal directories.