Discussed in #1026
Originally posted by lvca April 10, 2023
Recently asked on Discord, but discussed in many other topics and issues, we'd need a way to create constraints for edges so they can be attached only to specific vertex types.
The most natural way to achieve this is to mimic what OrientDB does: create constraints on out and in properties. While in OrientDB out and in are real properties in the document, with ArcadeDB are managed in binary form (much faster), but then exposed to the users as respectively @out and @in metadata.
To provide constraints on edge we could simply allow the following syntax alter property Friend.@out linkedtype Account;alter property Friend.@in linkedtype Account (in OrientDB was LINKEDCLASS). This would mean Friend edge type can only connect Account to another Account.
Discussed in #1026
Originally posted by lvca April 10, 2023
Recently asked on Discord, but discussed in many other topics and issues, we'd need a way to create constraints for edges so they can be attached only to specific vertex types.
The most natural way to achieve this is to mimic what OrientDB does: create constraints on
outandinproperties. While in OrientDBoutandinare real properties in the document, with ArcadeDB are managed in binary form (much faster), but then exposed to the users as respectively@outand@inmetadata.To provide constraints on edge we could simply allow the following syntax
alter property Friend.@out linkedtype Account;alter property Friend.@in linkedtype Account(in OrientDB wasLINKEDCLASS). This would meanFriendedge type can only connectAccountto anotherAccount.