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

Make links unique with the help of indices #174

Merged
merged 9 commits into from
Jul 8, 2024

Conversation

kirillvasilenko
Copy link
Collaborator

@kirillvasilenko kirillvasilenko commented Jun 27, 2024

The links duplication problem is solved now in the following way:

  1. On adding a link, we check if there is already the same link. If there is, we just silently skip new one, if there is no, we add the new one.
  2. We do this checking only if there is an appropriate index for the edge class (for the in and out edges). If there is no an index, we do not check for link duplicates.

Check out the new tests to see how it works.

@kirillvasilenko kirillvasilenko marked this pull request as ready for review July 4, 2024 09:06
@andrii0lomakin
Copy link
Collaborator

Hi @kirillvasilenko
Please modify the findEdge method.
It should issue an SQL query to find edges with in-out parameters equal to those provided.

@kirillvasilenko
Copy link
Collaborator Author

@andrii0lomakin , done.

@andrii0lomakin andrii0lomakin merged commit 54f6c30 into graph-store Jul 8, 2024
1 check passed
@andrii0lomakin andrii0lomakin deleted the migrate-your-database-2 branch July 8, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants