Balvinder Singh
Balvinder Singh

Reputation: 41

Neo4jClient: Does it support timeout parameter for executing queries?

I am using neo4j 1.9.4 community and soon will upgrade to 2.x. I know that neo4j can be configured with timeout in 2 ways as described here But I wanna know if the second approach i.e. including max-execution-timeout in REST call header is supported by any of the Neo4jClient method so that I can pass that value as a parameter before returning my results? Also, will it be supported by future neo4j release?

The goal is to define a timeout for each query rather global setting.

Something like :

GraphClient
    .Root
    .StartCypher("root")
    .Match("root-[:HAS]->childs")
    .Return("childs")
    .Results(5000) // passing timeout value in ms

Upvotes: 0

Views: 149

Answers (1)

Charlotte Skardon
Charlotte Skardon

Reputation: 6280

At present, no, Neo4jClient doesn't have this capability. Will it be supported? That depends on a few things, but as it's open source (https://github.com/Readify/Neo4jClient) you can always add it yourself and get it into the next release.

PS. For using against a 2.x db, you will want to look at the .Cypher so your query will look more like:

GraphClient.Cypher
    .Match("root-[:HAS]->child")
    .Return(child => child.As<ChildObj>())
    .Results();

Upvotes: 1

Related Questions