From be44451679d8ae55f3252aac170950357d8f8fa0 Mon Sep 17 00:00:00 2001 From: Tpt Date: Fri, 15 Mar 2024 21:15:47 +0100 Subject: [PATCH] CLI: Documents better the dump --graph argument Issue #824 --- cli/src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 4dfe0778..cf6788d9 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -176,7 +176,10 @@ enum Command { format: Option, /// Name of the graph to dump. /// + /// Use "default" to dump the default graph. + /// /// By default all graphs are dumped if the output format supports datasets. + /// If the format does not support named graph, then this parameter must be set. #[arg(long, value_hint = ValueHint::Url)] graph: Option, }, @@ -815,7 +818,10 @@ fn dump( format: RdfFormat, from_graph_name: Option>, ) -> anyhow::Result { - ensure!(format.supports_datasets() || from_graph_name.is_some(), "The --graph option is required when writing a format not supporting datasets like NTriples, Turtle or RDF/XML"); + ensure!( + format.supports_datasets() || from_graph_name.is_some(), + "The --graph option is required when writing a format not supporting datasets like NTriples, Turtle or RDF/XML. Use --graph \"default\" to dump only the default graph." + ); Ok(if let Some(from_graph_name) = from_graph_name { store.dump_graph_to_write(from_graph_name, format, write) } else {