connection

Synopsis

connection('outV', 'inV')

Description

An adjacency between two vertices is created using an edge label and the vertex labels of the outgoing and incoming vertices. This step is used in conjunction with edgeLabel().

Examples

Create an edge label isA specifying that the outgoing vertex label is ingredient and the incoming vertex label is FridgeItem.

schema.edgeLabel('isA').connection('ingredient', 'FridgeItem).create()

An adjacency between the vertexLabel author and author specifying the edgeLabel knows.

schema.edgeLabel('knows').connection('author', 'author').add()

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com