You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/11/30 04:57:20 UTC

[GitHub] [incubator-age] JoshInnis commented on issue #45: unique properties / indexing

JoshInnis commented on issue #45:
URL: https://github.com/apache/incubator-age/issues/45#issuecomment-982285644


   Hello,
   
   A schema is a graph name and a label is a table name. Id and properties field are columns in vertices and id, start_id, end_id, and properties are columns in the edges. Use the agtype_access_operator(properties, key) to get to get a property value. 
   
   Know all that you can use Postges' standard DDL language to implement constraints and unique values.
   
   ```
   ALTER TABLE graph_name.label_name 
   ADD CONSTRAINT constraint_name
   CHECK(agtype_access_operator(properties, "name_of_property") != '"Check against here"'::agtype);
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org