Skip to content

Commit

Permalink
fix schema string for list predicates (#45)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeffrey Stiles <freb@users.noreply.github.com>
  • Loading branch information
freb and freb committed May 2, 2020
1 parent 96398bd commit b484841
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ type Schema struct {
}

func (s Schema) String() string {
schema := fmt.Sprintf("%s: %s ", s.Predicate, s.Type)
t := s.Type
if s.List {
t = fmt.Sprintf("[%s]", t)
}
schema := fmt.Sprintf("%s: %s ", s.Predicate, t)
if s.Index {
schema += fmt.Sprintf("@index(%s) ", strings.Join(s.Tokenizer, ","))
}
Expand Down

0 comments on commit b484841

Please sign in to comment.