Documentation ¶
Index ¶
Constants ¶
View Source
const IndexSize int = 100
View Source
const SegmentSize int = 10000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct { Version int Name string Path string Segments []Segment Current int TopicLookup []string TopicCount int // contains filtered or unexported fields }
func NewDatabase ¶
NewDatabase creates a new database object in memory and creates the directory and files on disk for storing the data location is the base directory for creating the database
type Entry ¶
An Entry is a hydrated Datum, where the time and topic have been expanded.
func ParseEntry ¶
type Query ¶
type Query struct { Quantifier string Topics []string Range *TimeRange // nil means entire history (no time range) RangeSemantics string // none, before, since, between }
The Query object represents a single query on a database. It contains the 4 main variables of a query:
- Quantifier
- Topic(s)
- Time Range
- Data Predicate (TODO!)
type Result ¶
type Result struct {
Data Entries
}
Result wraps a slice of Items. TODO: Track query statistics and the like in here
type WriteAheadLog ¶
type WriteAheadLog struct {
LogPath string
}
func (*WriteAheadLog) AddEvent ¶
func (w *WriteAheadLog) AddEvent(d *Datum)
func (*WriteAheadLog) AddSegment ¶
func (w *WriteAheadLog) AddSegment(t time.Time)
func (*WriteAheadLog) AddTopic ¶
func (w *WriteAheadLog) AddTopic(t string)
func (*WriteAheadLog) ApplyToDB ¶
func (w *WriteAheadLog) ApplyToDB(d *Database)
Click to show internal directories.
Click to hide internal directories.