Greetings,
I’ve been looking through the documentation for ways to enforce a uniqueness constraint on a vertex-centric index.
Use case : edges store various sensor data between two vertices, each edge stores values at a specific timestamp that must be unique. On some not-so-rare occasions, duplicate sensor data (same values, same timestamp) can be sent more than once for insertion to the graph and we need to make sure that a duplicate edge is not created (by only checking the timestamp).
We could do it easily at the application level but we’re wondering if there’s a way to enforce such uniqueness constraint at the database level.
I was thinking that we could chain .unique() to the vertex-centric index definition just as we do when defining regular, graph-wide indexes. To the best of my knowledge, I don’t think such feature exists. If not, is this something doable and that may be added in a future version of Titan?
Thanks. Cheers,
Jean-Baptiste