Convert Type fields to use graph.Type

Add text encoding methods to replace string storage.
This commit is contained in:
kortschak 2014-09-05 09:49:15 +09:30
parent 62013d3dfc
commit e2eea6c283
18 changed files with 84 additions and 20 deletions

View file

@ -81,7 +81,7 @@ func (it *Int64) TagResults(dst map[string]graph.Value) {
func (it *Int64) Describe() graph.Description {
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Tags: it.tags.Tags(),
}
}

View file

@ -116,7 +116,7 @@ func (it *And) Describe() graph.Description {
primary := it.primaryIt.Describe()
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Tags: it.tags.Tags(),
Iterator: &primary,
Iterators: subIts,

View file

@ -107,7 +107,7 @@ func (it *Fixed) Describe() graph.Description {
return graph.Description{
UID: it.UID(),
Name: value,
Type: it.Type().String(),
Type: it.Type(),
Tags: fixed,
Size: int64(len(it.values)),
}

View file

@ -131,7 +131,7 @@ func (it *HasA) Describe() graph.Description {
primary := it.primaryIt.Describe()
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Tags: it.tags.Tags(),
Direction: it.dir,
Iterator: &primary,

View file

@ -80,7 +80,7 @@ func (it *Null) Optimize() (graph.Iterator, bool) { return it, false }
func (it *Null) Describe() graph.Description {
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
}
}

View file

@ -109,7 +109,7 @@ func (it *LinksTo) Describe() graph.Description {
primary := it.primaryIt.Describe()
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Direction: it.dir,
Iterator: &primary,
}

View file

@ -119,7 +119,7 @@ func (it *Materialize) Describe() graph.Description {
primary := it.subIt.Describe()
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Tags: it.tags.Tags(),
Size: int64(len(it.values)),
Iterator: &primary,

View file

@ -121,7 +121,7 @@ func (it *Optional) Describe() graph.Description {
primary := it.subIt.Describe()
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Tags: it.tags.Tags(),
Iterator: &primary,
}

View file

@ -117,7 +117,7 @@ func (it *Or) Describe() graph.Description {
}
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Tags: it.tags.Tags(),
Iterators: subIts,
}

View file

@ -192,7 +192,7 @@ func (it *Comparison) Describe() graph.Description {
primary := it.subIt.Describe()
return graph.Description{
UID: it.UID(),
Type: it.Type().String(),
Type: it.Type(),
Iterator: &primary,
}
}