Skip to content

Deleting a graph from PropertyGraphDataSource #930

Open
@goshaQ

Description

The deleteGraph method doesn't take into account created constraints on the metaLabel. Problem is that DETACH DELETE doesn't remove associated constraints and indexes. That causes an error when a PropertyGraph with the same name is deleted and written back again. See the following example:

val neo4jSource = GraphSources.cypher.neo4j(neo4jConfig)
val name = GraphName("arbitraryGraph")
neo4jSource.store(name, graph)
neo4jSource.delete(name)
neo4jSource.store(name, graph)

That causes the following exception:

Exception in thread "main" org.opencypher.okapi.impl.exception.GraphAlreadyExistsException: A graph with name arbitraryGraph is already stored in this graph data source.

Moreover, it doesn't allow write a PropertyGraph with entireGraphName, which makes no sense to me. What if I would like just store everything to the database and never restore that PropertyGraph (so metaLabel and related properties, i.e. ___morpheusID are not desired to be saved), because I have other data sources and graph database is the destination of the processed data?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions