From 20d0c75dc87143411e4211fbf9368edf6d9da3b2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 16 Nov 2025 18:13:30 +0000 Subject: [PATCH 1/6] Initial plan From 2e6ac2f6fc3632eeb624cb3c01f0eafe814a1597 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 16 Nov 2025 18:19:24 +0000 Subject: [PATCH 2/6] Add multi-language support to command documentation files Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com> --- commands/graph.info.md | 100 ++++++++++++++++++++++++++++++++++--- commands/graph.list.md | 36 +++++++++++++ commands/graph.memory.md | 65 ++++++++++++++++++++++-- commands/graph.ro-query.md | 17 ++++++- commands/graph.slowlog.md | 66 ++++++++++++++++++++++-- 5 files changed, 268 insertions(+), 16 deletions(-) diff --git a/commands/graph.info.md b/commands/graph.info.md index d34327b1..e018b242 100644 --- a/commands/graph.info.md +++ b/commands/graph.info.md @@ -19,18 +19,102 @@ If no argument is provided, both running and waiting queries are returned. ## Examples +### Get all query information + +{% capture shell_0 %} +GRAPH.INFO +{% endcapture %} + +{% capture python_0 %} +from falkordb import FalkorDB +client = FalkorDB() +info = client.info() +print(info) +{% endcapture %} + +{% capture javascript_0 %} +import { FalkorDB } from 'falkordb'; +const client = await FalkorDB.connect(); +const info = await client.info(); +console.log(info); +{% endcapture %} + +{% capture java_0 %} +FalkorDB client = new FalkorDB(); +String info = client.info(); +System.out.println(info); +{% endcapture %} + +{% capture rust_0 %} +let client = FalkorDB::connect_default(); +let info = client.info()?; +println!("{}", info); +{% endcapture %} + +{% include code_tabs.html id="info_all_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} + +### Get running queries + +{% capture shell_1 %} +GRAPH.INFO RunningQueries +{% endcapture %} + +{% capture python_1 %} +info = client.info("RunningQueries") +print(info) +{% endcapture %} + +{% capture javascript_1 %} +const info = await client.info("RunningQueries"); +console.log(info); +{% endcapture %} + +{% capture java_1 %} +String info = client.info("RunningQueries"); +System.out.println(info); +{% endcapture %} + +{% capture rust_1 %} +let info = client.info("RunningQueries")?; +println!("{}", info); +{% endcapture %} + +{% include code_tabs.html id="info_running_tabs" shell=shell_1 python=python_1 javascript=javascript_1 java=java_1 rust=rust_1 %} + +### Get waiting queries + +{% capture shell_2 %} +GRAPH.INFO WaitingQueries +{% endcapture %} + +{% capture python_2 %} +info = client.info("WaitingQueries") +print(info) +{% endcapture %} + +{% capture javascript_2 %} +const info = await client.info("WaitingQueries"); +console.log(info); +{% endcapture %} + +{% capture java_2 %} +String info = client.info("WaitingQueries"); +System.out.println(info); +{% endcapture %} + +{% capture rust_2 %} +let info = client.info("WaitingQueries")?; +println!("{}", info); +{% endcapture %} + +{% include code_tabs.html id="info_waiting_tabs" shell=shell_2 python=python_2 javascript=javascript_2 java=java_2 rust=rust_2 %} + +### Sample Output + ```sh 127.0.0.1:6379> GRAPH.INFO 1) "# Running queries" 2) (empty array) 3) "# Waiting queries" 4) (empty array) - -127.0.0.1:6379> GRAPH.INFO RunningQueries -1) "# Running queries" -2) (empty array) - -127.0.0.1:6379> GRAPH.INFO WaitingQueries -1) "# Waiting queries" -2) (empty array) ``` diff --git a/commands/graph.list.md b/commands/graph.list.md index ffa20d36..7948e5ca 100644 --- a/commands/graph.list.md +++ b/commands/graph.list.md @@ -10,6 +10,42 @@ parent: "Commands" Lists all graph keys in the keyspace. +## Examples + +{% capture shell_0 %} +GRAPH.LIST +{% endcapture %} + +{% capture python_0 %} +from falkordb import FalkorDB +client = FalkorDB() +graphs = client.list() +print(graphs) +{% endcapture %} + +{% capture javascript_0 %} +import { FalkorDB } from 'falkordb'; +const client = await FalkorDB.connect(); +const graphs = await client.list(); +console.log(graphs); +{% endcapture %} + +{% capture java_0 %} +FalkorDB client = new FalkorDB(); +List graphs = client.list(); +System.out.println(graphs); +{% endcapture %} + +{% capture rust_0 %} +let client = FalkorDB::connect_default(); +let graphs = client.list()?; +println!("{:?}", graphs); +{% endcapture %} + +{% include code_tabs.html id="list_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} + +### Sample Output + ```sh 127.0.0.1:6379> GRAPH.LIST 2) G diff --git a/commands/graph.memory.md b/commands/graph.memory.md index 4555078b..f0fcfab4 100644 --- a/commands/graph.memory.md +++ b/commands/graph.memory.md @@ -46,16 +46,73 @@ The command returns an array of key-value pairs, where each pair represents a sp ## Examples ### Basic Usage -```bash + +{% capture shell_0 %} GRAPH.MEMORY USAGE myGraph -``` +{% endcapture %} + +{% capture python_0 %} +from falkordb import FalkorDB +client = FalkorDB() +graph = client.select_graph('myGraph') +memory_info = graph.memory_usage() +print(memory_info) +{% endcapture %} + +{% capture javascript_0 %} +import { FalkorDB } from 'falkordb'; +const client = await FalkorDB.connect(); +const graph = client.selectGraph('myGraph'); +const memoryInfo = await graph.memoryUsage(); +console.log(memoryInfo); +{% endcapture %} + +{% capture java_0 %} +FalkorDB client = new FalkorDB(); +Graph graph = client.selectGraph("myGraph"); +Map memoryInfo = graph.memoryUsage(); +System.out.println(memoryInfo); +{% endcapture %} + +{% capture rust_0 %} +let client = FalkorDB::connect_default(); +let graph = client.select_graph("myGraph"); +let memory_info = graph.memory_usage()?; +println!("{:?}", memory_info); +{% endcapture %} + +{% include code_tabs.html id="memory_basic_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} ### With Sampling -```bash + +{% capture shell_1 %} GRAPH.MEMORY USAGE myGraph SAMPLES 500 -``` +{% endcapture %} + +{% capture python_1 %} +memory_info = graph.memory_usage(samples=500) +print(memory_info) +{% endcapture %} + +{% capture javascript_1 %} +const memoryInfo = await graph.memoryUsage({ samples: 500 }); +console.log(memoryInfo); +{% endcapture %} + +{% capture java_1 %} +Map memoryInfo = graph.memoryUsage(500); +System.out.println(memoryInfo); +{% endcapture %} + +{% capture rust_1 %} +let memory_info = graph.memory_usage_with_samples(500)?; +println!("{:?}", memory_info); +{% endcapture %} + +{% include code_tabs.html id="memory_samples_tabs" shell=shell_1 python=python_1 javascript=javascript_1 java=java_1 rust=rust_1 %} ### Sample Output + ```sh 127.0.0.1:6379> GRAPH.MEMORY USAGE flights 1) "total_graph_sz_mb" diff --git a/commands/graph.ro-query.md b/commands/graph.ro-query.md index 715ad5d4..7caf1a17 100644 --- a/commands/graph.ro-query.md +++ b/commands/graph.ro-query.md @@ -25,6 +25,21 @@ GRAPH.RO_QUERY us_government "MATCH (p:president)-[:born]->(:state {name:'Hawaii graph.ro_query("MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p") {% endcapture %} -{% include code_tabs.html id="tabs_0" shell=shell_0 python=python_0 %} +{% capture javascript_0 %} +const result = await graph.ro_query("MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p"); +console.log(result); +{% endcapture %} + +{% capture java_0 %} +ResultSet result = graph.readOnlyQuery("MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p"); +System.out.println(result); +{% endcapture %} + +{% capture rust_0 %} +let result = graph.ro_query(r#"MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p"#).execute().await?; +println!("{:?}", result); +{% endcapture %} + +{% include code_tabs.html id="tabs_0" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} Query-level timeouts can be set as described in [the configuration section](/configuration#timeout). diff --git a/commands/graph.slowlog.md b/commands/graph.slowlog.md index 4e35c988..41b595af 100644 --- a/commands/graph.slowlog.md +++ b/commands/graph.slowlog.md @@ -16,6 +16,48 @@ Each item in the list has the following structure: 3. The issued query. 4. The amount of time needed for its execution, in milliseconds. +## Examples + +### Get slowlog + +{% capture shell_0 %} +GRAPH.SLOWLOG graph_id +{% endcapture %} + +{% capture python_0 %} +from falkordb import FalkorDB +client = FalkorDB() +graph = client.select_graph('graph_id') +slowlog = graph.slowlog() +print(slowlog) +{% endcapture %} + +{% capture javascript_0 %} +import { FalkorDB } from 'falkordb'; +const client = await FalkorDB.connect(); +const graph = client.selectGraph('graph_id'); +const slowlog = await graph.slowlog(); +console.log(slowlog); +{% endcapture %} + +{% capture java_0 %} +FalkorDB client = new FalkorDB(); +Graph graph = client.selectGraph("graph_id"); +List> slowlog = graph.slowlog(); +System.out.println(slowlog); +{% endcapture %} + +{% capture rust_0 %} +let client = FalkorDB::connect_default(); +let graph = client.select_graph("graph_id"); +let slowlog = graph.slowlog()?; +println!("{:?}", slowlog); +{% endcapture %} + +{% include code_tabs.html id="slowlog_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} + +### Sample Output + ```sh GRAPH.SLOWLOG graph_id 1) 1) "1581932396" @@ -28,10 +70,28 @@ GRAPH.SLOWLOG graph_id 4) "0.288" ``` -To reset a graph's slowlog issue the following command: +### Reset slowlog -```sh +{% capture shell_1 %} GRAPH.SLOWLOG graph_id RESET -``` +{% endcapture %} + +{% capture python_1 %} +graph.slowlog_reset() +{% endcapture %} + +{% capture javascript_1 %} +await graph.slowlogReset(); +{% endcapture %} + +{% capture java_1 %} +graph.slowlogReset(); +{% endcapture %} + +{% capture rust_1 %} +graph.slowlog_reset()?; +{% endcapture %} + +{% include code_tabs.html id="slowlog_reset_tabs" shell=shell_1 python=python_1 javascript=javascript_1 java=java_1 rust=rust_1 %} Once cleared the information is lost forever. From 57e2cbe863e6412586fd7adbfab04f97ff3d60b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 16 Nov 2025 19:11:08 +0000 Subject: [PATCH 3/6] Fix code examples to use correct client library APIs Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com> --- commands/graph.info.md | 100 +++----------------------------------- commands/graph.list.md | 32 ++++++++---- commands/graph.memory.md | 64 ++---------------------- commands/graph.slowlog.md | 66 ++----------------------- 4 files changed, 37 insertions(+), 225 deletions(-) diff --git a/commands/graph.info.md b/commands/graph.info.md index e018b242..d34327b1 100644 --- a/commands/graph.info.md +++ b/commands/graph.info.md @@ -19,102 +19,18 @@ If no argument is provided, both running and waiting queries are returned. ## Examples -### Get all query information - -{% capture shell_0 %} -GRAPH.INFO -{% endcapture %} - -{% capture python_0 %} -from falkordb import FalkorDB -client = FalkorDB() -info = client.info() -print(info) -{% endcapture %} - -{% capture javascript_0 %} -import { FalkorDB } from 'falkordb'; -const client = await FalkorDB.connect(); -const info = await client.info(); -console.log(info); -{% endcapture %} - -{% capture java_0 %} -FalkorDB client = new FalkorDB(); -String info = client.info(); -System.out.println(info); -{% endcapture %} - -{% capture rust_0 %} -let client = FalkorDB::connect_default(); -let info = client.info()?; -println!("{}", info); -{% endcapture %} - -{% include code_tabs.html id="info_all_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} - -### Get running queries - -{% capture shell_1 %} -GRAPH.INFO RunningQueries -{% endcapture %} - -{% capture python_1 %} -info = client.info("RunningQueries") -print(info) -{% endcapture %} - -{% capture javascript_1 %} -const info = await client.info("RunningQueries"); -console.log(info); -{% endcapture %} - -{% capture java_1 %} -String info = client.info("RunningQueries"); -System.out.println(info); -{% endcapture %} - -{% capture rust_1 %} -let info = client.info("RunningQueries")?; -println!("{}", info); -{% endcapture %} - -{% include code_tabs.html id="info_running_tabs" shell=shell_1 python=python_1 javascript=javascript_1 java=java_1 rust=rust_1 %} - -### Get waiting queries - -{% capture shell_2 %} -GRAPH.INFO WaitingQueries -{% endcapture %} - -{% capture python_2 %} -info = client.info("WaitingQueries") -print(info) -{% endcapture %} - -{% capture javascript_2 %} -const info = await client.info("WaitingQueries"); -console.log(info); -{% endcapture %} - -{% capture java_2 %} -String info = client.info("WaitingQueries"); -System.out.println(info); -{% endcapture %} - -{% capture rust_2 %} -let info = client.info("WaitingQueries")?; -println!("{}", info); -{% endcapture %} - -{% include code_tabs.html id="info_waiting_tabs" shell=shell_2 python=python_2 javascript=javascript_2 java=java_2 rust=rust_2 %} - -### Sample Output - ```sh 127.0.0.1:6379> GRAPH.INFO 1) "# Running queries" 2) (empty array) 3) "# Waiting queries" 4) (empty array) + +127.0.0.1:6379> GRAPH.INFO RunningQueries +1) "# Running queries" +2) (empty array) + +127.0.0.1:6379> GRAPH.INFO WaitingQueries +1) "# Waiting queries" +2) (empty array) ``` diff --git a/commands/graph.list.md b/commands/graph.list.md index 7948e5ca..4fc1a67e 100644 --- a/commands/graph.list.md +++ b/commands/graph.list.md @@ -18,28 +18,40 @@ GRAPH.LIST {% capture python_0 %} from falkordb import FalkorDB -client = FalkorDB() -graphs = client.list() +db = FalkorDB(host='localhost', port=6379) +graphs = db.list_graphs() print(graphs) {% endcapture %} {% capture javascript_0 %} import { FalkorDB } from 'falkordb'; -const client = await FalkorDB.connect(); -const graphs = await client.list(); +const db = await FalkorDB.connect({ + socket: { host: 'localhost', port: 6379 } +}); +const graphs = await db.list(); console.log(graphs); {% endcapture %} {% capture java_0 %} -FalkorDB client = new FalkorDB(); -List graphs = client.list(); -System.out.println(graphs); +import com.falkordb.*; + +Driver driver = FalkorDB.driver("localhost", 6379); +// Note: Java client accesses graphs directly by name +// Use driver.graph("graphName") to work with a specific graph {% endcapture %} {% capture rust_0 %} -let client = FalkorDB::connect_default(); -let graphs = client.list()?; -println!("{:?}", graphs); +use falkordb::{FalkorClientBuilder, FalkorConnectionInfo}; + +let connection_info: FalkorConnectionInfo = "falkor://127.0.0.1:6379" + .try_into() + .expect("Invalid connection info"); +let client = FalkorClientBuilder::new() + .with_connection_info(connection_info) + .build() + .expect("Failed to build client"); +// Note: Rust client accesses graphs directly by name +// Use client.select_graph("graphName") to work with a specific graph {% endcapture %} {% include code_tabs.html id="list_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} diff --git a/commands/graph.memory.md b/commands/graph.memory.md index f0fcfab4..cc7d340a 100644 --- a/commands/graph.memory.md +++ b/commands/graph.memory.md @@ -46,70 +46,14 @@ The command returns an array of key-value pairs, where each pair represents a sp ## Examples ### Basic Usage - -{% capture shell_0 %} +```bash GRAPH.MEMORY USAGE myGraph -{% endcapture %} - -{% capture python_0 %} -from falkordb import FalkorDB -client = FalkorDB() -graph = client.select_graph('myGraph') -memory_info = graph.memory_usage() -print(memory_info) -{% endcapture %} - -{% capture javascript_0 %} -import { FalkorDB } from 'falkordb'; -const client = await FalkorDB.connect(); -const graph = client.selectGraph('myGraph'); -const memoryInfo = await graph.memoryUsage(); -console.log(memoryInfo); -{% endcapture %} - -{% capture java_0 %} -FalkorDB client = new FalkorDB(); -Graph graph = client.selectGraph("myGraph"); -Map memoryInfo = graph.memoryUsage(); -System.out.println(memoryInfo); -{% endcapture %} - -{% capture rust_0 %} -let client = FalkorDB::connect_default(); -let graph = client.select_graph("myGraph"); -let memory_info = graph.memory_usage()?; -println!("{:?}", memory_info); -{% endcapture %} - -{% include code_tabs.html id="memory_basic_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} +``` ### With Sampling - -{% capture shell_1 %} +```bash GRAPH.MEMORY USAGE myGraph SAMPLES 500 -{% endcapture %} - -{% capture python_1 %} -memory_info = graph.memory_usage(samples=500) -print(memory_info) -{% endcapture %} - -{% capture javascript_1 %} -const memoryInfo = await graph.memoryUsage({ samples: 500 }); -console.log(memoryInfo); -{% endcapture %} - -{% capture java_1 %} -Map memoryInfo = graph.memoryUsage(500); -System.out.println(memoryInfo); -{% endcapture %} - -{% capture rust_1 %} -let memory_info = graph.memory_usage_with_samples(500)?; -println!("{:?}", memory_info); -{% endcapture %} - -{% include code_tabs.html id="memory_samples_tabs" shell=shell_1 python=python_1 javascript=javascript_1 java=java_1 rust=rust_1 %} +``` ### Sample Output diff --git a/commands/graph.slowlog.md b/commands/graph.slowlog.md index 41b595af..4e35c988 100644 --- a/commands/graph.slowlog.md +++ b/commands/graph.slowlog.md @@ -16,48 +16,6 @@ Each item in the list has the following structure: 3. The issued query. 4. The amount of time needed for its execution, in milliseconds. -## Examples - -### Get slowlog - -{% capture shell_0 %} -GRAPH.SLOWLOG graph_id -{% endcapture %} - -{% capture python_0 %} -from falkordb import FalkorDB -client = FalkorDB() -graph = client.select_graph('graph_id') -slowlog = graph.slowlog() -print(slowlog) -{% endcapture %} - -{% capture javascript_0 %} -import { FalkorDB } from 'falkordb'; -const client = await FalkorDB.connect(); -const graph = client.selectGraph('graph_id'); -const slowlog = await graph.slowlog(); -console.log(slowlog); -{% endcapture %} - -{% capture java_0 %} -FalkorDB client = new FalkorDB(); -Graph graph = client.selectGraph("graph_id"); -List> slowlog = graph.slowlog(); -System.out.println(slowlog); -{% endcapture %} - -{% capture rust_0 %} -let client = FalkorDB::connect_default(); -let graph = client.select_graph("graph_id"); -let slowlog = graph.slowlog()?; -println!("{:?}", slowlog); -{% endcapture %} - -{% include code_tabs.html id="slowlog_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} - -### Sample Output - ```sh GRAPH.SLOWLOG graph_id 1) 1) "1581932396" @@ -70,28 +28,10 @@ GRAPH.SLOWLOG graph_id 4) "0.288" ``` -### Reset slowlog +To reset a graph's slowlog issue the following command: -{% capture shell_1 %} +```sh GRAPH.SLOWLOG graph_id RESET -{% endcapture %} - -{% capture python_1 %} -graph.slowlog_reset() -{% endcapture %} - -{% capture javascript_1 %} -await graph.slowlogReset(); -{% endcapture %} - -{% capture java_1 %} -graph.slowlogReset(); -{% endcapture %} - -{% capture rust_1 %} -graph.slowlog_reset()?; -{% endcapture %} - -{% include code_tabs.html id="slowlog_reset_tabs" shell=shell_1 python=python_1 javascript=javascript_1 java=java_1 rust=rust_1 %} +``` Once cleared the information is lost forever. From fef957400bb8a41b82e46e6fd1f2221fc0543b33 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 16 Nov 2025 19:18:26 +0000 Subject: [PATCH 4/6] Add client library examples for SLOWLOG and MEMORY commands Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com> --- commands/graph.memory.md | 29 +++++++++++++++++++++++---- commands/graph.slowlog.md | 42 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/commands/graph.memory.md b/commands/graph.memory.md index cc7d340a..75338383 100644 --- a/commands/graph.memory.md +++ b/commands/graph.memory.md @@ -46,14 +46,35 @@ The command returns an array of key-value pairs, where each pair represents a sp ## Examples ### Basic Usage -```bash + +{% capture shell_0 %} GRAPH.MEMORY USAGE myGraph -``` +{% endcapture %} + +{% capture javascript_0 %} +import { FalkorDB } from 'falkordb'; +const db = await FalkorDB.connect({ + socket: { host: 'localhost', port: 6379 } +}); +const graph = db.selectGraph('myGraph'); +const memoryInfo = await graph.memoryUsage(); +console.log(memoryInfo); +{% endcapture %} + +{% include code_tabs.html id="memory_basic_tabs" shell=shell_0 javascript=javascript_0 %} ### With Sampling -```bash + +{% capture shell_1 %} GRAPH.MEMORY USAGE myGraph SAMPLES 500 -``` +{% endcapture %} + +{% capture javascript_1 %} +const memoryInfo = await graph.memoryUsage({ samples: 500 }); +console.log(memoryInfo); +{% endcapture %} + +{% include code_tabs.html id="memory_samples_tabs" shell=shell_1 javascript=javascript_1 %} ### Sample Output diff --git a/commands/graph.slowlog.md b/commands/graph.slowlog.md index 4e35c988..28040bfc 100644 --- a/commands/graph.slowlog.md +++ b/commands/graph.slowlog.md @@ -16,6 +16,36 @@ Each item in the list has the following structure: 3. The issued query. 4. The amount of time needed for its execution, in milliseconds. +## Examples + +### Get slowlog + +{% capture shell_0 %} +GRAPH.SLOWLOG graph_id +{% endcapture %} + +{% capture python_0 %} +from falkordb import FalkorDB +db = FalkorDB(host='localhost', port=6379) +graph = db.select_graph('graph_id') +slowlog = graph.slowlog() +print(slowlog) +{% endcapture %} + +{% capture javascript_0 %} +import { FalkorDB } from 'falkordb'; +const db = await FalkorDB.connect({ + socket: { host: 'localhost', port: 6379 } +}); +const graph = db.selectGraph('graph_id'); +const slowlog = await graph.slowLog(); +console.log(slowlog); +{% endcapture %} + +{% include code_tabs.html id="slowlog_tabs" shell=shell_0 python=python_0 javascript=javascript_0 %} + +### Sample Output + ```sh GRAPH.SLOWLOG graph_id 1) 1) "1581932396" @@ -28,10 +58,16 @@ GRAPH.SLOWLOG graph_id 4) "0.288" ``` -To reset a graph's slowlog issue the following command: +### Reset slowlog -```sh +{% capture shell_1 %} GRAPH.SLOWLOG graph_id RESET -``` +{% endcapture %} + +{% capture python_1 %} +graph.slowlog_reset() +{% endcapture %} + +{% include code_tabs.html id="slowlog_reset_tabs" shell=shell_1 python=python_1 %} Once cleared the information is lost forever. From 45324e04d531cc03aeb6c84a0accb4ba755932d0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Nov 2025 08:15:59 +0000 Subject: [PATCH 5/6] Fix Java and Rust API calls for listing graphs Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com> --- commands/graph.list.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/graph.list.md b/commands/graph.list.md index 4fc1a67e..53ed7812 100644 --- a/commands/graph.list.md +++ b/commands/graph.list.md @@ -36,8 +36,8 @@ console.log(graphs); import com.falkordb.*; Driver driver = FalkorDB.driver("localhost", 6379); -// Note: Java client accesses graphs directly by name -// Use driver.graph("graphName") to work with a specific graph +List graphs = driver.listGraphs(); +System.out.println(graphs); {% endcapture %} {% capture rust_0 %} @@ -50,8 +50,8 @@ let client = FalkorClientBuilder::new() .with_connection_info(connection_info) .build() .expect("Failed to build client"); -// Note: Rust client accesses graphs directly by name -// Use client.select_graph("graphName") to work with a specific graph +let graphs = client.list_graphs(); +println!("{:?}", graphs); {% endcapture %} {% include code_tabs.html id="list_tabs" shell=shell_0 python=python_0 javascript=javascript_0 java=java_0 rust=rust_0 %} From d930603a2ccf894b14ac4d8fc09bc32e7f945b1d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Nov 2025 09:50:40 +0000 Subject: [PATCH 6/6] Add missing API method names to wordlist for spell check Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com> --- .wordlist.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.wordlist.txt b/.wordlist.txt index 2785e126..fa9da807 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -203,11 +203,14 @@ keyspace lTrim labelsList len +listGraphs +list_graphs lon malte matchRegEx maxCost maxLen +memoryUsage multithreaded myGraph myPassword @@ -270,6 +273,7 @@ schemas shortestPath signum slowlog +slowLog sourceNode sqrt stDev