MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / format

Method format

gql-cli/src/cli/output.rs:15–21  ·  view source on GitHub ↗

Format query results in the specified format

(result: &QueryResult, format: crate::cli::commands::OutputFormat)

Source from the content-addressed store, hash-verified

13impl ResultFormatter {
14 /// Format query results in the specified format
15 pub fn format(result: &QueryResult, format: crate::cli::commands::OutputFormat) -> String {
16 match format {
17 crate::cli::commands::OutputFormat::Table => Self::format_table(result),
18 crate::cli::commands::OutputFormat::Json => Self::format_json(result),
19 crate::cli::commands::OutputFormat::Csv => Self::format_csv(result),
20 }
21 }
22
23 /// Format results as a table using comfy-table
24 fn format_table(result: &QueryResult) -> String {

Callers 4

cast_to_stringMethod · 0.80
executeMethod · 0.80
GraphLiteExceptionMethod · 0.80
toStringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected