Skip to content

Commit

Permalink
Merge pull request #7 from FalkorDB/clean-w1
Browse files Browse the repository at this point in the history
clean warns
  • Loading branch information
gkorland authored Nov 27, 2023
2 parents 28aafa4 + 00642d8 commit b1a0245
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/falkordb/impl/api/AbstractGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public abstract class AbstractGraph implements Graph {
* @param query Cypher query
* @return a result set
*/
@Override
public ResultSet query(String graphId, String query) {
return sendQuery(graphId, query);
}
Expand All @@ -69,6 +70,7 @@ public ResultSet query(String graphId, String query) {
* @param query Cypher query
* @return a result set
*/
@Override
public ResultSet readOnlyQuery(String graphId, String query) {
return sendReadOnlyQuery(graphId, query);
}
Expand Down Expand Up @@ -130,6 +132,7 @@ public ResultSet query(String graphId, String query, Map<String, Object> params)
* @param params parameters map.
* @return a result set.
*/
@Override
public ResultSet readOnlyQuery(String graphId, String query, Map<String, Object> params) {
String preparedQuery = Utils.prepareQuery(query, params);
return sendReadOnlyQuery(graphId, preparedQuery);
Expand Down Expand Up @@ -163,14 +166,17 @@ public ResultSet readOnlyQuery(String graphId, String query, Map<String, Object>
return sendReadOnlyQuery(graphId, preparedQuery, timeout);
}

@Override
public ResultSet callProcedure(String graphId, String procedure){
return callProcedure(graphId, procedure, Utils.DUMMY_LIST, Utils.DUMMY_MAP);
}

@Override
public ResultSet callProcedure(String graphId, String procedure, List<String> args){
return callProcedure(graphId, procedure, args, Utils.DUMMY_MAP);
}

@Override
public ResultSet callProcedure(String graphId, String procedure, List<String> args , Map<String, List<String>> kwargs){

String preparedProcedure = Utils.prepareProcedure(procedure, args, kwargs);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/falkordb/impl/api/GraphPipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public ResultSet build(Object o) {
* @param procedure procedure name to invoke
* @return response with result set with the procedure data
*/
@Override
public Response<ResultSet> callProcedure(String graphId, String procedure){
return callProcedure(graphId, procedure, Utils.DUMMY_LIST, Utils.DUMMY_MAP);
}
Expand All @@ -216,11 +217,11 @@ public Response<ResultSet> callProcedure(String graphId, String procedure){
* @param args procedure arguments
* @return response with result set with the procedure data
*/
@Override
public Response<ResultSet> callProcedure(String graphId, String procedure, List<String> args ){
return callProcedure(graphId, procedure, args, Utils.DUMMY_MAP);
}


/**
* Invoke a stored procedure
* @param graphId a graph to perform the query on
Expand All @@ -229,6 +230,7 @@ public Response<ResultSet> callProcedure(String graphId, String procedure, List<
* @param kwargs - procedure output arguments
* @return response with result set with the procedure data
*/
@Override
public Response<ResultSet> callProcedure(String graphId, String procedure, List<String> args,
Map<String, List<String>> kwargs) {
String preparedProcedure = Utils.prepareProcedure(procedure, args, kwargs);
Expand All @@ -241,6 +243,7 @@ public Response<ResultSet> callProcedure(String graphId, String procedure, List<
* @param graphId graph to delete
* @return response with the deletion running time statistics
*/
@Override
public Response<String> deleteGraph(String graphId){

client.sendCommand(GraphCommand.DELETE, graphId);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/falkordb/impl/api/GraphTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ public ResultSet build(Object o) {
* @param procedure procedure name to invoke
* @return response with result set with the procedure data
*/
@Override
public Response<ResultSet> callProcedure(String graphId, String procedure) {
return callProcedure(graphId, procedure, Utils.DUMMY_LIST, Utils.DUMMY_MAP);
}
Expand All @@ -238,6 +239,7 @@ public Response<ResultSet> callProcedure(String graphId, String procedure) {
* @param args procedure arguments
* @return response with result set with the procedure data
*/
@Override
public Response<ResultSet> callProcedure(String graphId, String procedure, List<String> args) {
return callProcedure(graphId, procedure, args, Utils.DUMMY_MAP);
}
Expand All @@ -250,6 +252,7 @@ public Response<ResultSet> callProcedure(String graphId, String procedure, List<
* @param kwargs - procedure output arguments
* @return response with result set with the procedure data
*/
@Override
public Response<ResultSet> callProcedure(String graphId, String procedure, List<String> args,
Map<String, List<String>> kwargs) {
String preparedProcedure = Utils.prepareProcedure(procedure, args, kwargs);
Expand All @@ -261,6 +264,7 @@ public Response<ResultSet> callProcedure(String graphId, String procedure, List<
* @param graphId graph to delete
* @return response with the deletion running time statistics
*/
@Override
public Response<String> deleteGraph(String graphId) {
client.sendCommand(GraphCommand.DELETE, graphId);
Response<String> response = getResponse(BuilderFactory.STRING);
Expand All @@ -272,5 +276,4 @@ public Response<String> deleteGraph(String graphId) {
public void setGraphCaches(GraphCaches caches) {
this.caches = caches;
}

}

0 comments on commit b1a0245

Please sign in to comment.