use of apoc.result.IndexConstraintNodeInfo in project neo4j-apoc-procedures by neo4j-contrib.
the class Schemas method indexesAndConstraintsForNode.
/**
* Collects indexes and constraints for nodes
*
* @return
*/
private Stream<IndexConstraintNodeInfo> indexesAndConstraintsForNode() {
Schema schema = db.schema();
// Indexes
Stream<IndexConstraintNodeInfo> indexes = StreamSupport.stream(schema.getIndexes().spliterator(), false).filter(indexDefinition -> !indexDefinition.isConstraintIndex()).map(indexDefinition -> this.nodeInfoFromIndexDefinition(indexDefinition, schema));
// Constraints
Stream<IndexConstraintNodeInfo> constraints = StreamSupport.stream(schema.getConstraints().spliterator(), false).filter(constraintDefinition -> !constraintDefinition.isConstraintType(ConstraintType.RELATIONSHIP_PROPERTY_EXISTENCE)).map(this::nodeInfoFromConstraintDefinition);
return Stream.concat(indexes, constraints);
}
Aggregations