Rename TSVal
This commit is contained in:
parent
a1453da84e
commit
d87e227ff3
29 changed files with 118 additions and 118 deletions
|
|
@ -31,7 +31,7 @@ func NewMemstoreAllIterator(ts *TripleStore) *AllIterator {
|
|||
return &out
|
||||
}
|
||||
|
||||
func (it *AllIterator) Next() (graph.TSVal, bool) {
|
||||
func (it *AllIterator) Next() (graph.Value, bool) {
|
||||
next, out := it.Int64.Next()
|
||||
if !out {
|
||||
return next, out
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ func (it *Iterator) Clone() graph.Iterator {
|
|||
|
||||
func (it *Iterator) Close() {}
|
||||
|
||||
func (it *Iterator) Next() (graph.TSVal, bool) {
|
||||
func (it *Iterator) Next() (graph.Value, bool) {
|
||||
graph.NextLogIn(it)
|
||||
if it.tree.Max() == nil || it.Last == int64(it.tree.Max().(Int64)) {
|
||||
return graph.NextLogOut(it, nil, false)
|
||||
|
|
@ -87,7 +87,7 @@ func (it *Iterator) Size() (int64, bool) {
|
|||
return int64(it.tree.Len()), true
|
||||
}
|
||||
|
||||
func (it *Iterator) Check(v graph.TSVal) bool {
|
||||
func (it *Iterator) Check(v graph.Value) bool {
|
||||
graph.CheckLogIn(it, v)
|
||||
if it.tree.Has(Int64(v.(int64))) {
|
||||
it.Last = v
|
||||
|
|
|
|||
|
|
@ -217,11 +217,11 @@ func (ts *TripleStore) RemoveTriple(t *graph.Triple) {
|
|||
}
|
||||
}
|
||||
|
||||
func (ts *TripleStore) Triple(index graph.TSVal) *graph.Triple {
|
||||
func (ts *TripleStore) Triple(index graph.Value) *graph.Triple {
|
||||
return &ts.triples[index.(int64)]
|
||||
}
|
||||
|
||||
func (ts *TripleStore) TripleIterator(d graph.Direction, value graph.TSVal) graph.Iterator {
|
||||
func (ts *TripleStore) TripleIterator(d graph.Direction, value graph.Value) graph.Iterator {
|
||||
index, ok := ts.index.Get(d, value.(int64))
|
||||
data := fmt.Sprintf("dir:%s val:%d", d, value.(int64))
|
||||
if ok {
|
||||
|
|
@ -243,11 +243,11 @@ func (ts *TripleStore) DebugPrint() {
|
|||
}
|
||||
}
|
||||
|
||||
func (ts *TripleStore) ValueOf(name string) graph.TSVal {
|
||||
func (ts *TripleStore) ValueOf(name string) graph.Value {
|
||||
return ts.idMap[name]
|
||||
}
|
||||
|
||||
func (ts *TripleStore) NameOf(id graph.TSVal) string {
|
||||
func (ts *TripleStore) NameOf(id graph.Value) string {
|
||||
return ts.revIdMap[id.(int64)]
|
||||
}
|
||||
|
||||
|
|
@ -259,7 +259,7 @@ func (ts *TripleStore) FixedIterator() graph.FixedIterator {
|
|||
return iterator.NewFixedIteratorWithCompare(iterator.BasicEquality)
|
||||
}
|
||||
|
||||
func (ts *TripleStore) TripleDirection(val graph.TSVal, d graph.Direction) graph.TSVal {
|
||||
func (ts *TripleStore) TripleDirection(val graph.Value, d graph.Direction) graph.Value {
|
||||
name := ts.Triple(val).Get(d)
|
||||
return ts.ValueOf(name)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue