export nquads

This commit is contained in:
David Schor 2015-08-10 02:28:39 -04:00
parent 1e9c6990bb
commit 76e4a5d15e
2 changed files with 32 additions and 1 deletions

View file

@ -28,7 +28,19 @@ func Dump(qs graph.QuadStore, outFile, typ string) error {
if export.Err() != nil {
return export.Err()
}
export.ExportJson()
switch typ {
case "nquad":
export.ExportNquad()
case "json":
export.ExportJson()
default:
return fmt.Errorf("unknown format %q", typ)
}
if export.Err() != nil {
return export.Err()
}
if outFile != "-" {
fmt.Printf("%d entries were written\n", export.Count())