github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/pkg/persistence/const.go (about) 1 package persistence 2 3 import "github.com/lib/pq" 4 5 type persistenceCtxKey string 6 7 const ( 8 // PersistenceCtxKey is a key used in context to store the persistence object 9 PersistenceCtxKey persistenceCtxKey = "PersistenceCtx" 10 // NotNullViolation is an error code that happens when the required data is not provided 11 NotNullViolation pq.ErrorCode = "23502" 12 // UniqueViolation is an error code that happens when the Unique Key is violated 13 UniqueViolation pq.ErrorCode = "23505" 14 // ForeignKeyViolation is an error code that happens when try to delete a row from the referenced/parent table when referencing/child table reference that row in the parent table 15 // or when create/update a row in the child table with reference to the parent that does not exists 16 ForeignKeyViolation pq.ErrorCode = "23503" 17 // CheckViolation is an error code that happens when the values in a column do not meet a specific requirement defined by CHECK conditions 18 CheckViolation pq.ErrorCode = "23514" 19 // ConstraintViolation is the class of errors that happens when any constraint is violated 20 ConstraintViolation pq.ErrorClass = "23" 21 // NoData missing godoc 22 NoData pq.ErrorClass = "02" 23 )