add string comparison to value comparison iterator
This commit is contained in:
parent
7c0d8b28b0
commit
b2482ac5e1
3 changed files with 148 additions and 13 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue