-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from FalkorDB/refactor-driver
refactor to driver
- Loading branch information
Showing
25 changed files
with
548 additions
and
733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.falkordb; | ||
|
||
import java.io.Closeable; | ||
|
||
import redis.clients.jedis.Jedis; | ||
|
||
public interface Driver extends Closeable{ | ||
GraphContextGenerator graph(String graphId); | ||
|
||
Jedis getConnection(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.falkordb; | ||
|
||
import com.falkordb.impl.api.DriverImpl; | ||
|
||
final public class FalkorDB { | ||
|
||
private FalkorDB() {} | ||
|
||
public static Driver driver (){ | ||
return new DriverImpl(); | ||
} | ||
|
||
public static Driver driver (String host, int port){ | ||
return new DriverImpl(host, port); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
package com.falkordb; | ||
|
||
public interface GraphContextGenerator extends Graph { | ||
|
||
/** | ||
* Generate a connection bounded api | ||
* @return a connection bounded api | ||
*/ | ||
GraphContext getContext(); | ||
|
||
} |
Oops, something went wrong.