add string comparison to value comparison iterator

This commit is contained in:
ben hockey 2015-05-29 10:27:53 -05:00
parent 7c0d8b28b0
commit b2482ac5e1
3 changed files with 148 additions and 13 deletions

View file

@ -47,11 +47,18 @@ func (qs *store) NodesAllIterator() graph.Iterator { return &Null{} }
func (qs *store) QuadsAllIterator() graph.Iterator { return &Null{} }
func (qs *store) NameOf(v graph.Value) string {
i := v.(int)
if i < 0 || i >= len(qs.data) {
switch v.(type) {
case int:
i := v.(int)
if i < 0 || i >= len(qs.data) {
return ""
}
return qs.data[i]
case string:
return v.(string)
default:
return ""
}
return qs.data[i]
}
func (qs *store) Size() int64 { return 0 }