API: Schema

class py2neo.schema.SchemaResource[source]

The schema resource attached to a Graph instance.

create_index(label, property_key)[source]

Create a schema index for a label and property key combination.

create_uniqueness_constraint(label, property_key)[source]

Create a uniqueness constraint for a label.

drop_index(label, property_key)[source]

Remove label index for a given property key.

drop_uniqueness_constraint(label, property_key)[source]

Remove the uniqueness constraint for a given property key.

get_indexes(label)[source]

Fetch a list of indexed property keys for a label.

get_uniqueness_constraints(label)[source]

Fetch a list of unique constraints for a label.