Skip to content

Unique indexes on link endpoints #1714

Answered by elprans
CodesInChaos asked this question in Q&A
Discussion options

You must be logged in to vote

Array-like multi-links need an unique constraint on (source.id, link.index)

This is already the case by default.

Allowing only one link between a pair of nodes needs one on (source.id, target.id)

Use constraint exclusive for this.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@CodesInChaos
Comment options

@elprans
Comment options

@elprans
Comment options

@CodesInChaos
Comment options

@elprans
Comment options

Answer selected by CodesInChaos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants