Package app.ductape.sdk.graph.adapters
Class BaseGraphAdapter
java.lang.Object
app.ductape.sdk.graph.adapters.BaseGraphAdapter
- Direct Known Subclasses:
ArangoDBAdapter,CosmosGremlinAdapter,MemgraphAdapter,Neo4jAdapter,Neo4jBoltGraphAdapter,NeptuneAdapter,SpannerGraphAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected intprotected final Set<GraphTypes.GraphFeature> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbeginTransaction(Map<String, Object> options) voidcommitTransaction(Map<String, Object> transaction) countNodes(Map<String, Object> options) TScountNodes(labels?, where?, ...)aggregated result{ count }.countRelationships(Map<String, Object> options) TScountRelationships(types?, where?, ...)aggregated result{ count }.createNode(Map<String, Object> node) createNodeConstraint(Map<String, Object> options) TS schema — node constraint DDL.createNodeIndex(Map<String, Object> options) TS schema — node index DDL.createRelationship(Map<String, Object> relationship) createRelationshipIndex(Map<String, Object> options) TS schema — relationship index DDL.abstract voiddropConstraint(String constraintName) TS schema — drop constraint by canonical name (adapter-specific semantics).TS schema — drop index by canonical name (adapter-specific semantics).protected voidprotected <T> TexecuteWithRetry(Callable<T> operation) protected <T> TexecuteWithRetry(Callable<T> operation, int retries) findConnectedComponents(Map<String, Object> options) findNodeById(Object id) TSfindNodeById— wrapped as{ node }when present.TSfindRelationshipById— wrapped as{ relationship }when present.findRelationships(Map<String, Object> where) fullTextSearch(Map<String, Object> options) getNeighborhood(Map<String, Object> options) protected abstract GraphTypes.GraphTypebooleanprotected booleanisConnectionError(Throwable error) removeLabels(Map<String, Object> options) voidrollbackTransaction(Map<String, Object> transaction) shortestPath(Map<String, Object> options) booleansupportsFeature(GraphTypes.GraphFeature feature) testConnection(Map<String, Object> options) vectorSearch(Map<String, Object> options)
-
Field Details
-
connected
protected boolean connected -
connectionUrl
-
connectionOptions
-
maxRetries
protected int maxRetries -
supportedFeatures
-
-
Constructor Details
-
BaseGraphAdapter
public BaseGraphAdapter()
-
-
Method Details
-
graphType
-
isConnected
public boolean isConnected() -
getGraphType
-
supportsFeature
-
getSupportedFeatures
-
executeWithRetry
-
executeWithRetry
-
isConnectionError
-
attemptReconnect
protected void attemptReconnect() -
ensureConnected
protected void ensureConnected() -
connect
-
testConnection
-
disconnect
public abstract void disconnect() -
createNode
-
findNodes
-
createRelationship
-
findRelationships
-
beginTransaction
-
commitTransaction
-
rollbackTransaction
-
query
-
traverse
-
getStatistics
-
listLabels
-
listRelationshipTypes
-
listIndexes
-
listConstraints
-
shortestPath
-
allPaths
-
getNeighborhood
-
findConnectedComponents
-
fullTextSearch
-
vectorSearch
-
findNodeById
TSfindNodeById— wrapped as{ node }when present. -
findRelationshipById
TSfindRelationshipById— wrapped as{ relationship }when present. -
addLabels
-
removeLabels
-
setLabels
-
countNodes
TScountNodes(labels?, where?, ...)aggregated result{ count }. -
countRelationships
TScountRelationships(types?, where?, ...)aggregated result{ count }. -
createNodeIndex
TS schema — node index DDL. -
createNodeConstraint
TS schema — node constraint DDL. -
createRelationshipIndex
TS schema — relationship index DDL. -
dropIndex
TS schema — drop index by canonical name (adapter-specific semantics). -
dropConstraint
TS schema — drop constraint by canonical name (adapter-specific semantics).
-