add Triple function
This is a shortcut for those that are not using the label field. It can become very verbose always calling Quad with an empty string as the last parameter.
This commit is contained in:
parent
a2622536e9
commit
7d18978492
1 changed files with 4 additions and 0 deletions
|
|
@ -27,6 +27,10 @@ type Handle struct {
|
|||
graph.QuadWriter
|
||||
}
|
||||
|
||||
func Triple(subject, predicate, object string) quad.Quad {
|
||||
return quad.Quad{subject, predicate, object, ""}
|
||||
}
|
||||
|
||||
func Quad(subject, predicate, object, label string) quad.Quad {
|
||||
return quad.Quad{subject, predicate, object, label}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue