Versions in this module Expand all Collapse all v0 v0.3.1 Jul 31, 2014 Changes in this version + var ErrCannotBulkLoad = errors.New("triplestore: cannot bulk load") + func ContainsLogIn(it Iterator, val Value) + func ContainsLogOut(it Iterator, val Value, good bool) bool + func InitTripleStore(name, dbpath string, opts Options) error + func RegisterTripleStore(name string, newFunc NewStoreFunc, initFunc InitStoreFunc) + func TripleStores() []string + type BulkLoader interface + BulkLoad func(quad.Unmarshaler) error type FixedIterator + Add func(Value) + type InitStoreFunc func(string, Options) error type Iterator + Contains func(Value) bool + Result func() Value + ResultTree func() *ResultTree + Stats func() IteratorStats + SubIterators func() []Iterator + Tagger func() *Tagger + UID func() uint64 type IteratorStats + ContainsCost int64 + type NewStoreFunc func(string, Options) (TripleStore, error) + type Nexter interface + Next func() (Value, bool) + type Options map[string]interface + func (d Options) IntKey(key string) (int, bool) + func (d Options) StringKey(key string) (string, bool) type ResultTree + func (t *ResultTree) String() string + type Tagger struct + func (t *Tagger) Add(tag string) + func (t *Tagger) AddFixed(tag string, value Value) + func (t *Tagger) CopyFrom(src Iterator) + func (t *Tagger) Fixed() map[string]Value + func (t *Tagger) Tags() []string type TripleStore + func NewTripleStore(name, dbpath string, opts Options) (TripleStore, error) + FixedIterator func() FixedIterator + NameOf func(Value) string + NodesAllIterator func() Iterator + Quad func(Value) *quad.Quad + TripleDirection func(id Value, d quad.Direction) Value + TripleIterator func(quad.Direction, Value) Iterator + TriplesAllIterator func() Iterator + ValueOf func(string) Value + type Type int + const All + const And + const Comparison + const Fixed + const HasA + const Invalid + const LinksTo + const Not + const Null + const Optional + const Or + func RegisterIterator(name string) Type + func (t Type) String() string + type Value interface + func Next(it Iterator) (Value, bool) v0.3.0 Jun 28, 2014 Changes in this version + var TripleDirections = [4]string + func BaseIteratorInit(b *BaseIterator) + func BasicEquality(a, b TSVal) bool + func CheckLogIn(it Iterator, val TSVal) + func CheckLogOut(it Iterator, val TSVal, good bool) bool + func NextLogIn(it Iterator) + func OutputQueryShapeForIterator(it Iterator, ts TripleStore, outputMap *map[string]interface{}) + func PrintResultTreeEvaluator(it Iterator) + func RunIntOp(a int64, op ComparisonOperator, b int64) bool + func StringResultTreeEvaluator(it Iterator) string + type AndIterator struct + func NewAndIterator() *AndIterator + func (and *AndIterator) AddSubIterator(sub Iterator) + func (and *AndIterator) Check(val TSVal) bool + func (and *AndIterator) Clone() Iterator + func (and *AndIterator) Close() + func (and *AndIterator) DebugString(indent int) string + func (and *AndIterator) GetResultTree() *ResultTree + func (and *AndIterator) GetStats() *IteratorStats + func (and *AndIterator) GetSubIterators() *list.List + func (and *AndIterator) Next() (TSVal, bool) + func (and *AndIterator) NextResult() bool + func (and *AndIterator) Optimize() (Iterator, bool) + func (and *AndIterator) Reset() + func (and *AndIterator) Size() (int64, bool) + func (and *AndIterator) TagResults(out *map[string]TSVal) + func (and *AndIterator) Type() string + type BaseIterator struct + Last TSVal + func (a *BaseIterator) Reset() + func (a *BaseIterator) TagResults(out_map *map[string]TSVal) + func (b *BaseIterator) AddFixedTag(tag string, value TSVal) + func (b *BaseIterator) AddTag(tag string) + func (b *BaseIterator) CopyTagsFrom(other_it Iterator) + func (b *BaseIterator) FixedTags() map[string]TSVal + func (b *BaseIterator) GetResultTree() *ResultTree + func (b *BaseIterator) GetUid() int + func (b *BaseIterator) Nextable() bool + func (b *BaseIterator) Tags() []string + func (n *BaseIterator) Check(v TSVal) bool + func (n *BaseIterator) DebugString(indent int) string + func (n *BaseIterator) GetStats() *IteratorStats + func (n *BaseIterator) GetSubIterators() *list.List + func (n *BaseIterator) LastResult() TSVal + func (n *BaseIterator) Next() (TSVal, bool) + func (n *BaseIterator) NextResult() bool + func (n *BaseIterator) Size() (int64, bool) + type ComparisonOperator int + type Equality func(a, b TSVal) bool + type FixedIterator struct + func NewFixedIteratorWithCompare(compareFn Equality) *FixedIterator + func (a *FixedIterator) GetStats() *IteratorStats + func (f *FixedIterator) AddValue(v TSVal) + func (f *FixedIterator) Check(v TSVal) bool + func (f *FixedIterator) Clone() Iterator + func (f *FixedIterator) Close() + func (f *FixedIterator) DebugString(indent int) string + func (f *FixedIterator) Next() (TSVal, bool) + func (f *FixedIterator) Optimize() (Iterator, bool) + func (f *FixedIterator) Reset() + func (f *FixedIterator) Size() (int64, bool) + func (f *FixedIterator) Type() string + type HasaIterator struct + func NewHasaIterator(ts TripleStore, subIt Iterator, dir string) *HasaIterator + func (h *HasaIterator) Check(val TSVal) bool + func (h *HasaIterator) Clone() Iterator + func (h *HasaIterator) Close() + func (h *HasaIterator) DebugString(indent int) string + func (h *HasaIterator) Direction() string + func (h *HasaIterator) GetCheckResult() bool + func (h *HasaIterator) GetResultTree() *ResultTree + func (h *HasaIterator) GetStats() *IteratorStats + func (h *HasaIterator) GetSubIterators() *list.List + func (h *HasaIterator) Next() (TSVal, bool) + func (h *HasaIterator) NextResult() bool + func (h *HasaIterator) Optimize() (Iterator, bool) + func (h *HasaIterator) Reset() + func (h *HasaIterator) TagResults(out *map[string]TSVal) + func (h *HasaIterator) Type() string + type HttpSession interface + BuildJson func(interface{}) + ClearJson func() + ExecInput func(string, chan interface{}, int) + GetJson func() (interface{}, error) + GetQuery func(string, chan map[string]interface{}) + InputParses func(string) (ParseResult, error) + ToggleDebug func() + type Int64AllIterator struct + func NewInt64AllIterator(min, max int64) *Int64AllIterator + func (a *Int64AllIterator) Check(tsv TSVal) bool + func (a *Int64AllIterator) Clone() Iterator + func (a *Int64AllIterator) Close() + func (a *Int64AllIterator) DebugString(indent int) string + func (a *Int64AllIterator) GetStats() *IteratorStats + func (a *Int64AllIterator) Next() (TSVal, bool) + func (a *Int64AllIterator) Optimize() (Iterator, bool) + func (a *Int64AllIterator) Reset() + func (a *Int64AllIterator) Size() (int64, bool) + func (a *Int64AllIterator) Type() string + type Iterator interface + AddFixedTag func(string, TSVal) + AddTag func(string) + Check func(TSVal) bool + Clone func() Iterator + Close func() + CopyTagsFrom func(Iterator) + DebugString func(int) string + FixedTags func() map[string]TSVal + GetResultTree func() *ResultTree + GetStats func() *IteratorStats + GetSubIterators func() *list.List + GetUid func() int + LastResult func() TSVal + Next func() (TSVal, bool) + NextResult func() bool + Nextable func() bool + Optimize func() (Iterator, bool) + Reset func() + Size func() (int64, bool) + TagResults func(*map[string]TSVal) + Tags func() []string + Type func() string + type IteratorStats struct + CheckCost int64 + NextCost int64 + Size int64 + type Link struct + LinkNode int + Pred int + Source int + Target int + type LinksToIterator struct + func NewLinksToIterator(ts TripleStore, it Iterator, dir string) *LinksToIterator + func (l *LinksToIterator) Check(val TSVal) bool + func (l *LinksToIterator) Clone() Iterator + func (l *LinksToIterator) Close() + func (l *LinksToIterator) DebugString(indent int) string + func (l *LinksToIterator) Direction() string + func (l *LinksToIterator) GetResultTree() *ResultTree + func (l *LinksToIterator) GetStats() *IteratorStats + func (l *LinksToIterator) Next() (TSVal, bool) + func (l *LinksToIterator) NextResult() bool + func (l *LinksToIterator) Reset() + func (l *LinksToIterator) TagResults(out *map[string]TSVal) + func (l *LinksToIterator) Type() string + func (lto *LinksToIterator) GetSubIterators() *list.List + func (lto *LinksToIterator) Optimize() (Iterator, bool) + type Node struct + Id int + IsFixed bool + IsLinkNode bool + Tags []string + Values []string + type NullIterator struct + func NewNullIterator() *NullIterator + func (a *NullIterator) Close() + func (n *NullIterator) Clone() Iterator + func (n *NullIterator) DebugString(indent int) string + func (n *NullIterator) GetStats() *IteratorStats + func (n *NullIterator) Optimize() (Iterator, bool) + func (n *NullIterator) Type() string + type OptionalIterator struct + func NewOptionalIterator(it Iterator) *OptionalIterator + func (o *OptionalIterator) Check(val TSVal) bool + func (o *OptionalIterator) Clone() Iterator + func (o *OptionalIterator) Close() + func (o *OptionalIterator) DebugString(indent int) string + func (o *OptionalIterator) GetStats() *IteratorStats + func (o *OptionalIterator) Next() (TSVal, bool) + func (o *OptionalIterator) NextResult() bool + func (o *OptionalIterator) Optimize() (Iterator, bool) + func (o *OptionalIterator) Reset() + func (o *OptionalIterator) TagResults(out *map[string]TSVal) + func (o *OptionalIterator) Type() string + type OptionsDict map[string]interface + func (d OptionsDict) GetIntKey(key string) (int, bool) + func (d OptionsDict) GetStringKey(key string) (string, bool) + type OrIterator struct + func NewOrIterator() *OrIterator + func NewShortCircuitOrIterator() *OrIterator + func (or *OrIterator) AddSubIterator(sub Iterator) + func (or *OrIterator) Check(val TSVal) bool + func (or *OrIterator) Clone() Iterator + func (or *OrIterator) Close() + func (or *OrIterator) DebugString(indent int) string + func (or *OrIterator) GetResultTree() *ResultTree + func (or *OrIterator) GetStats() *IteratorStats + func (or *OrIterator) GetSubIterators() *list.List + func (or *OrIterator) Next() (TSVal, bool) + func (or *OrIterator) NextResult() bool + func (or *OrIterator) Optimize() (Iterator, bool) + func (or *OrIterator) Reset() + func (or *OrIterator) Size() (int64, bool) + func (or *OrIterator) TagResults(out *map[string]TSVal) + func (or *OrIterator) Type() string + type ParseResult int + const ParseFail + const ParseMore + const Parsed + type ResultTree struct + func NewResultTree(result TSVal) *ResultTree + func (tree *ResultTree) AddSubtree(sub *ResultTree) + func (tree *ResultTree) ToString() string + type Session interface + ExecInput func(string, chan interface{}, int) + InputParses func(string) (ParseResult, error) + ToText func(interface{}) string + ToggleDebug func() + type TSVal interface + func NextLogOut(it Iterator, val TSVal, ok bool) (TSVal, bool) + type TestTripleStore struct + func (ts *TestTripleStore) AddTriple(*Triple) + func (ts *TestTripleStore) AddTripleSet([]*Triple) + func (ts *TestTripleStore) Close() + func (ts *TestTripleStore) DebugPrint() + func (ts *TestTripleStore) GetIdFor(s string) TSVal + func (ts *TestTripleStore) GetIteratorByString(string, string, string) Iterator + func (ts *TestTripleStore) GetNameFor(v TSVal) string + func (ts *TestTripleStore) GetNodesAllIterator() Iterator + func (ts *TestTripleStore) GetTriple(TSVal) *Triple + func (ts *TestTripleStore) GetTripleDirection(TSVal, string) TSVal + func (ts *TestTripleStore) GetTripleIterator(s string, i TSVal) Iterator + func (ts *TestTripleStore) GetTriplesAllIterator() Iterator + func (ts *TestTripleStore) MakeFixed() *FixedIterator + func (ts *TestTripleStore) OptimizeIterator(it Iterator) (Iterator, bool) + func (ts *TestTripleStore) RemoveTriple(t *Triple) + func (ts *TestTripleStore) Size() int64 + type Triple struct + Obj string + Pred string + Provenance string + Sub string + func MakeTriple(sub string, pred string, obj string, provenance string) *Triple + func NewTriple() *Triple + func (t *Triple) Equals(other *Triple) bool + func (t *Triple) Get(dir string) string + func (t *Triple) IsValid() bool + func (t *Triple) ToNTriple() string + func (t *Triple) ToString() string + type TripleStore interface + AddTriple func(*Triple) + AddTripleSet func([]*Triple) + Close func() + GetIdFor func(string) TSVal + GetNameFor func(TSVal) string + GetNodesAllIterator func() Iterator + GetTriple func(TSVal) *Triple + GetTripleDirection func(triple_id TSVal, dir string) TSVal + GetTripleIterator func(string, TSVal) Iterator + GetTriplesAllIterator func() Iterator + MakeFixed func() *FixedIterator + OptimizeIterator func(it Iterator) (Iterator, bool) + RemoveTriple func(*Triple) + Size func() int64 + type ValueComparisonIterator struct + func NewValueComparisonIterator(subIt Iterator, operator ComparisonOperator, value interface{}, ts TripleStore) *ValueComparisonIterator + func (vc *ValueComparisonIterator) Check(val TSVal) bool + func (vc *ValueComparisonIterator) Clone() Iterator + func (vc *ValueComparisonIterator) Close() + func (vc *ValueComparisonIterator) DebugString(indent int) string + func (vc *ValueComparisonIterator) GetStats() *IteratorStats + func (vc *ValueComparisonIterator) Next() (TSVal, bool) + func (vc *ValueComparisonIterator) NextResult() bool + func (vc *ValueComparisonIterator) Optimize() (Iterator, bool) + func (vc *ValueComparisonIterator) Reset() + func (vc *ValueComparisonIterator) TagResults(out *map[string]TSVal) + func (vc *ValueComparisonIterator) Type() string