Documentation ¶
Index ¶
- Constants
- Variables
- type Driver
- func (d *Driver) Create(db, table, id string, expressions []sql.Expression, config map[string]string) (sql.DriverIndex, error)
- func (d *Driver) Delete(i sql.DriverIndex, partitions sql.PartitionIter) error
- func (*Driver) ID() string
- func (d *Driver) LoadAll(ctx *sql.Context, db, table string) ([]sql.DriverIndex, error)
- func (d *Driver) Save(ctx *sql.Context, i sql.DriverIndex, iter sql.PartitionIndexKeyValueIter) (err error)
Constants ¶
const ( // DriverID the unique name of the pilosa driver. DriverID = "pilosa" // IndexNamePrefix the pilosa's indexes prefix IndexNamePrefix = "idx" // FieldNamePrefix the pilosa's field prefix FieldNamePrefix = "fld" // ConfigFileName is the extension of an index config file. ConfigFileName = "config.yml" // ProcessingFileName is the extension of the lock/processing index file. ProcessingFileName = ".processing" // MappingFileNamePrefix is the prefix in mapping file <prefix>-<mappingKey><extension> MappingFileNamePrefix = "map" // MappingFileNameExtension is the extension in mapping file <prefix>-<mappingKey><extension> MappingFileNameExtension = ".db" )
Variables ¶
var ( // RowsGauge describes a metric that takes number of indexes rows over time. RowsGauge = discard.NewGauge() // TotalHistogram describes a metric that takes repeated observations of the total time to index values. TotalHistogram = discard.NewHistogram() // MappingHistogram describes a metric that takes repeated observations of the total time to map values. MappingHistogram = discard.NewHistogram() // BitmapHistogram describes a metric that takes repeated observations of the total time to store values in bitmaps BitmapHistogram = discard.NewHistogram() )
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements sql.IndexDriver interface.
func NewDriver ¶
NewDriver returns a new instance of pilosa.Driver which satisfies sql.IndexDriver interface PLEASE NOTE: pilosa integration is not currently well supported, and the project maintainers are not currently prioritizing its development. Rather, native indexes implemented directly by integrators are the priority for development moving forward. The pilosa driver is believed to work as designed, but we don't have as much confidence in it as other parts of the engine. Getting better testing would be a good separable project for someone outside the core team to pick up if they need better support for pilosa.
func (*Driver) Create ¶
func (d *Driver) Create( db, table, id string, expressions []sql.Expression, config map[string]string, ) (sql.DriverIndex, error)
Create a new index.
func (*Driver) Delete ¶
func (d *Driver) Delete(i sql.DriverIndex, partitions sql.PartitionIter) error
Delete the given index for all partitions in the iterator.
func (*Driver) Save ¶
func (d *Driver) Save( ctx *sql.Context, i sql.DriverIndex, iter sql.PartitionIndexKeyValueIter, ) (err error)
Save the given index (mapping and bitmap)