Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add call cypher result interface #16

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</licenses>

<properties>
<revision>1.4.1</revision>
<revision>1.4.2</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netty.version>4.1.44.Final</netty.version>
<lombok.version>1.18.28</lombok.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.ArrayList;

public class TuGraphDbRpcClientTest {
static Logger log = LoggerFactory.getLogger(TuGraphDbRpcClientTest.class);
Expand All @@ -15,11 +14,13 @@ public static void deleteProcedure(TuGraphDbRpcClient client) {
log.info("----------------testDeleteProcedure--------------------");
try {
boolean result = client.deleteProcedure("CPP", "sortstr", "default");
log.info("deleteProcedure : " + result);
log.info("deleteProcedure sortstr : " + result);
assert (result);
// should throw TuGraphDbRpcException
result = client.deleteProcedure("CPP", "scan_graph", "default");
log.info("loadProcedure : " + result);
log.info("deleteProcedure scan_graph : " + result);
result = client.deleteProcedure("CPP", "multi_file", "default");
log.info("deleteProcedure multi_file : " + result);
} catch (Exception e) {
log.info("catch Exception : " + e.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ static void importDataFromContent(Logger log, TuGraphDbRpcClient client, boolean
JSONObject jsonObject = jsonArray.getJSONObject(0);
assert (jsonObject.containsKey("COUNT(n)"));
assert (jsonObject.getIntValue("COUNT(n)") == 13);
res = client.callCypher("MATCH (n) RETURN n,n.name LIMIT 3", "default", 10, true);
log.info("MATCH (n) RETURN n,n.name LIMIT 3 : " + res);
}

static void importSchemaFromFile(Logger log, TuGraphDbRpcClient client, boolean isHa) throws Exception {
Expand Down Expand Up @@ -190,7 +192,7 @@ static void importDataFromFile(Logger log, TuGraphDbRpcClient client, boolean is
assert (jsonObject.containsKey("COUNT(n)"));
assert (jsonObject.getIntValue("COUNT(n)") == 13);

res = client.callCypher("match(n) -[r]->(m) return count(r)", "default", 1000);
res = client.callCypher("match (n)-[r]->(m) return count(r)", "default", 1000);
log.info("match(n) -[r]->(m) return count(r) : " + res);
jsonArray = JSONArray.parseArray(res);
assert (jsonArray.size() == 1);
Expand Down
Loading
Loading