Documentation ¶
Index ¶
- Constants
- type Backend
- func (b *Backend) Delete(ctx context.Context, segID common.RawBytes) (int, error)
- func (b *Backend) DeleteWithIntf(ctx context.Context, intf query.IntfSpec) (int, error)
- func (b *Backend) Get(ctx context.Context, params *query.Params) ([]*query.Result, error)
- func (b *Backend) Insert(ctx context.Context, pseg *seg.PathSegment, segTypes []proto.PathSegType) (int, error)
- func (b *Backend) InsertWithHPCfgIDs(ctx context.Context, pseg *seg.PathSegment, segTypes []proto.PathSegType, ...) (int, error)
Constants ¶
View Source
const ( // SchemaVersion is the version of the SQLite schema understood by this backend. // Whenever changes to the schema are made, this version number should be increased // to prevent data corruption between incompatible database schemas. SchemaVersion = 1 // Schema is the SQLite database layout. Schema = `` /* 1187-byte string literal not displayed */ SegmentsTable = "Segments" IntfToSegTable = "IntfToSeg" StartsAtTable = "StartsAt" EndsAtTable = "EndsAt" SegTypesTable = "SegTypes" HpCfgIdsTable = "HpCfgIds" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
func New ¶
New returns a new SQLite backend opening a database at the given path. If no database exists a new database is be created. If the schema version of the stored database is different from the one in schema.go, an error is returned.
func (*Backend) DeleteWithIntf ¶
func (*Backend) Insert ¶
func (b *Backend) Insert(ctx context.Context, pseg *seg.PathSegment, segTypes []proto.PathSegType) (int, error)
func (*Backend) InsertWithHPCfgIDs ¶
Click to show internal directories.
Click to hide internal directories.