MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / as_cql_query

Method as_cql_query

cassandra/metadata.py:1496–1515  ·  view source on GitHub ↗
(self, formatted=False)

Source from the content-addressed store, hash-verified

1494 """A :class:`.EdgeMetadata` instance, if graph enabled"""
1495
1496 def as_cql_query(self, formatted=False):
1497 ret = super(TableMetadataDSE68, self).as_cql_query(formatted)
1498
1499 if self.vertex:
1500 ret += " AND VERTEX LABEL %s" % protect_name(self.vertex.label_name)
1501
1502 if self.edge:
1503 ret += " AND EDGE LABEL %s" % protect_name(self.edge.label_name)
1504
1505 ret += self._export_edge_as_cql(
1506 self.edge.from_label,
1507 self.edge.from_partition_key_columns,
1508 self.edge.from_clustering_columns, "FROM")
1509
1510 ret += self._export_edge_as_cql(
1511 self.edge.to_label,
1512 self.edge.to_partition_key_columns,
1513 self.edge.to_clustering_columns, "TO")
1514
1515 return ret
1516
1517 @staticmethod
1518 def _export_edge_as_cql(label_name, partition_keys,

Callers

nothing calls this directly

Calls 3

_export_edge_as_cqlMethod · 0.95
protect_nameFunction · 0.85
as_cql_queryMethod · 0.45

Tested by

no test coverage detected