Documentation ¶
Index ¶
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetNames() []string
- func EnsureDBVersion(db *sql.DB) (int64, error)
- func Migrate(db *sql.DB) error
- type Aggregation
- type Answer
- type ChangeEvent
- type Constraint
- type DataType
- type DateAggregation
- type DateGranularity
- type Iter
- type MerkleNode
- type MigrationRecord
- type PartitionedEvent
- type Pruner
- type Question
- type RangePartitionDescriptor
- type TombstoneEvent
- type UnpartitionedEvent
- type UpsertEvent
- type VersionStore
- func (v *VersionStore) Accept(repo int64, ev ChangeEvent) error
- func (v *VersionStore) Digest(repo int64) (map[string]string, error)
- func (v *VersionStore) Interview(repository int64, cons []Constraint, aggs []Aggregation, answer []Answer) *Iter
- func (v *VersionStore) NewRepository(name string, parts map[string]RangePartitionDescriptor) (repo int64, err error)
- func (v *VersionStore) SliceThreshold() int
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTableDoesNotExist = errors.New("table does not exist") ErrNoPreviousVersion = errors.New("no previous version found") )
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
Types ¶
type Aggregation ¶
type ChangeEvent ¶
type ChangeEvent interface {
Id() string
}
type Constraint ¶
type Constraint interface {
AttributeName() string
}
type DateAggregation ¶
type DateAggregation struct{}
func (*DateAggregation) AttributeName ¶
func (d *DateAggregation) AttributeName() string
func (*DateAggregation) Bucket ¶
func (d *DateAggregation) Bucket(value string) string
func (*DateAggregation) Granularity ¶
func (d *DateAggregation) Granularity() DateGranularity
func (*DateAggregation) Parent ¶
func (d *DateAggregation) Parent() string
type DateGranularity ¶
type DateGranularity uint
const ( Yearly DateGranularity = iota Monthly Daily )
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
func NextQuestion ¶
func NextQuestion(repository int64, cons []Constraint, aggs []Aggregation, p *Pruner) *Iter
type MerkleNode ¶
type MerkleNode struct { Name string Id string Version string Child *MerkleNode }
func BuildDateTimeNode ¶
func BuildDateTimeNode(id string, version string, d time.Time) *MerkleNode
func BuildEntityNode ¶
func BuildEntityNode(id string, version string) *MerkleNode
func BuildHierarchy ¶
func BuildHierarchy(path string) *MerkleNode
func (*MerkleNode) DescendencyPath ¶
func (node *MerkleNode) DescendencyPath() string
func (*MerkleNode) IsLeaf ¶
func (node *MerkleNode) IsLeaf() bool
type MigrationRecord ¶
type PartitionedEvent ¶
type PartitionedEvent interface { UnpartitionedEvent Attributes() map[string]string AttributeHierarchy() *MerkleNode }
func NewDatePartitionedEvent ¶
func NewDatePartitionedEvent(id, version, attributeName string, d time.Time) PartitionedEvent
type Question ¶
type Question interface { Constraints() []Constraint Aggregations() []Aggregation SliceThreshold() int }
type RangePartitionDescriptor ¶
type RangePartitionDescriptor struct {
DataType DataType
}
type TombstoneEvent ¶
type TombstoneEvent interface { ChangeEvent }
type UnpartitionedEvent ¶
type UnpartitionedEvent interface { UpsertEvent IdHierarchy() *MerkleNode }
type UpsertEvent ¶
type UpsertEvent interface { ChangeEvent Version() string }
type VersionStore ¶
type VersionStore struct {
// contains filtered or unexported fields
}
func OpenStore ¶
func OpenStore(path string) (*VersionStore, error)
func (*VersionStore) Accept ¶
func (v *VersionStore) Accept(repo int64, ev ChangeEvent) error
func (*VersionStore) Interview ¶
func (v *VersionStore) Interview(repository int64, cons []Constraint, aggs []Aggregation, answer []Answer) *Iter
func (*VersionStore) NewRepository ¶
func (v *VersionStore) NewRepository(name string, parts map[string]RangePartitionDescriptor) (repo int64, err error)
func (*VersionStore) SliceThreshold ¶
func (v *VersionStore) SliceThreshold() int
Click to show internal directories.
Click to hide internal directories.