Documentation
¶
Index ¶
- Variables
- func NewBackend(ctx context.Context, config *BackendConfig) (limited.Backend, error)
- type BackendConfig
- type Driver
- func (d *Driver) After(ctx context.Context, rev, limit int64) (*sql.Rows, error)
- func (d *Driver) AfterPrefix(ctx context.Context, key, rangeEnd []byte, startRevision, endRevision int64) (*sql.Rows, error)
- func (d *Driver) Close() error
- func (d *Driver) Compact(ctx context.Context, revision int64) (err error)
- func (d *Driver) Count(ctx context.Context, key, rangeEnd []byte, revision int64) (int64, error)
- func (d *Driver) Create(ctx context.Context, key, value []byte, ttl int64) (rev int64, succeeded bool, err error)
- func (d *Driver) CurrentRevision(ctx context.Context) (int64, error)
- func (d *Driver) Delete(ctx context.Context, key []byte, revision int64) (rev int64, deleted bool, err error)
- func (d *Driver) DeleteRevision(ctx context.Context, revision int64) error
- func (d *Driver) GetCompactRevision(ctx context.Context) (int64, int64, error)
- func (d *Driver) GetSize(ctx context.Context) (int64, error)
- func (d *Driver) List(ctx context.Context, key, rangeEnd []byte, limit, revision int64) (*sql.Rows, error)
- func (d *Driver) ListTTL(ctx context.Context, revision int64) (*sql.Rows, error)
- func (d *Driver) Update(ctx context.Context, key, value []byte, preRev, ttl int64) (rev int64, updated bool, err error)
- type DriverConfig
- type SchemaVersion
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrIncompatibleVersion = fmt.Errorf("incompatible schema version")
)
Functions ¶
func NewBackend ¶
Types ¶
type BackendConfig ¶
type BackendConfig struct {
limited.Config
//DriverConfig is the sqlite driver config
DriverConfig *DriverConfig
}
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) AfterPrefix ¶
func (*Driver) Compact ¶
Compact compacts the database up to the revision provided in the method's call. After the call, any request for a version older than the given revision will return a compacted error.
func (*Driver) CurrentRevision ¶
func (*Driver) DeleteRevision ¶
func (*Driver) GetCompactRevision ¶
type SchemaVersion ¶
type SchemaVersion int32
func NewSchemaVersion ¶
func NewSchemaVersion(major int16, minor int16) SchemaVersion
func (SchemaVersion) CompatibleWith ¶
func (sv SchemaVersion) CompatibleWith(targetSV SchemaVersion) error
func (SchemaVersion) Major ¶
func (sv SchemaVersion) Major() int16
func (SchemaVersion) Minor ¶
func (sv SchemaVersion) Minor() int16
Click to show internal directories.
Click to hide internal directories.