Source code for py2neo.cypher.error.schema

#!/usr/bin/env python
# -*- encoding: utf-8 -*-

# Copyright 2011-2014, Nigel Small
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.

from py2neo.cypher.error.core import ClientError, DatabaseError

[docs]class ConstraintAlreadyExists(ClientError): """ Unable to perform operation because it would clash with a pre-existing constraint. """
[docs]class ConstraintVerificationFailure(ClientError): """ Unable to create constraint because data that exists in the database violates it. """
[docs]class ConstraintViolation(ClientError): """ A constraint imposed by the database was violated. """
[docs]class IllegalTokenName(ClientError): """ A token name, such as a label, relationship type or property key, used is not valid. Tokens cannot be empty strings and cannot be null. """
[docs]class IndexAlreadyExists(ClientError): """ Unable to perform operation because it would clash with a pre-existing index. """
[docs]class IndexBelongsToConstraint(ClientError): """ A requested operation can not be performed on the specified index because the index is part of a constraint. If you want to drop the index, for instance, you must drop the constraint. """
[docs]class LabelLimitReached(ClientError): """ The maximum number of labels supported has been reached, no more labels can be created. """
[docs]class NoSuchConstraint(ClientError): """ The request (directly or indirectly) referred to a constraint that does not exist. """
[docs]class NoSuchIndex(ClientError): """ The request (directly or indirectly) referred to an index that does not exist. """
[docs]class ConstraintCreationFailure(DatabaseError): """ Creating a requested constraint failed. """
[docs]class ConstraintDropFailure(DatabaseError): """ The database failed to drop a requested constraint. """
[docs]class IndexCreationFailure(DatabaseError): """ Failed to create an index. """
[docs]class IndexDropFailure(DatabaseError): """ The database failed to drop a requested index. """
[docs]class NoSuchLabel(DatabaseError): """ The request accessed a label that did not exist. """
[docs]class NoSuchPropertyKey(DatabaseError): """ The request accessed a property that does not exist. """
[docs]class NoSuchRelationshipType(DatabaseError): """ The request accessed a relationship type that does not exist. """
[docs]class NoSuchSchemaRule(DatabaseError): """ The request referred to a schema rule that does not exist. """