| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hasura.Backends.Postgres.SQL.Error
Description
Postgres SQL Error
Functions and datatypes for interpreting Postgres errors.
Synopsis
- data PGErrorType
- = PGDataException (Maybe (PGErrorCode PGDataException))
- | PGIntegrityConstraintViolation (Maybe (PGErrorCode PGIntegrityConstraintViolation))
- | PGSyntaxErrorOrAccessRuleViolation (Maybe (PGErrorCode PGSyntaxErrorOrAccessRuleViolation))
- | PGTransactionRollback (Maybe (PGErrorCode PGTransactionRollback))
- data PGErrorCode a
- data PGDataException
- data PGIntegrityConstraintViolation
- data PGSyntaxErrorOrAccessRuleViolation
- data PGTransactionRollback = PGSerializationFailure
- _PGTransactionRollback :: Prism' PGErrorType (Maybe (PGErrorCode PGTransactionRollback))
- _PGSyntaxErrorOrAccessRuleViolation :: Prism' PGErrorType (Maybe (PGErrorCode PGSyntaxErrorOrAccessRuleViolation))
- _PGIntegrityConstraintViolation :: Prism' PGErrorType (Maybe (PGErrorCode PGIntegrityConstraintViolation))
- _PGDataException :: Prism' PGErrorType (Maybe (PGErrorCode PGDataException))
- _PGErrorSpecific :: forall a a. Prism (PGErrorCode a) (PGErrorCode a) a a
- _PGErrorGeneric :: forall a. Prism' (PGErrorCode a) ()
- pgErrorType :: PGStmtErrDetail -> Maybe PGErrorType
Documentation
data PGErrorType Source #
The top-level error code type. Errors in Postgres are divided into different classes, which are further subdivided into individual error codes. Even if a particular status code is not known to the application, it’s possible to determine its class and handle it appropriately.
Constructors
Instances
| Eq PGErrorType Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error | |
| Show PGErrorType Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods showsPrec :: Int -> PGErrorType -> ShowS # show :: PGErrorType -> String # showList :: [PGErrorType] -> ShowS # | |
data PGErrorCode a Source #
Constructors
| PGErrorGeneric | represents errors that have the non-specific |
| PGErrorSpecific a | represents errors with a known, more specific status code |
Instances
| Functor PGErrorCode Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods fmap :: (a -> b) -> PGErrorCode a -> PGErrorCode b # (<$) :: a -> PGErrorCode b -> PGErrorCode a # | |
| Eq a => Eq (PGErrorCode a) Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods (==) :: PGErrorCode a -> PGErrorCode a -> Bool # (/=) :: PGErrorCode a -> PGErrorCode a -> Bool # | |
| Show a => Show (PGErrorCode a) Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods showsPrec :: Int -> PGErrorCode a -> ShowS # show :: PGErrorCode a -> String # showList :: [PGErrorCode a] -> ShowS # | |
data PGDataException Source #
Constructors
| PGInvalidDatetimeFormat | |
| PGInvalidParameterValue | |
| PGInvalidEscapeSequence | |
| PGInvalidTextRepresentation |
Instances
| Eq PGDataException Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods (==) :: PGDataException -> PGDataException -> Bool # (/=) :: PGDataException -> PGDataException -> Bool # | |
| Show PGDataException Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods showsPrec :: Int -> PGDataException -> ShowS # show :: PGDataException -> String # showList :: [PGDataException] -> ShowS # | |
data PGIntegrityConstraintViolation Source #
Constructors
| PGRestrictViolation | |
| PGNotNullViolation | |
| PGForeignKeyViolation | |
| PGUniqueViolation | |
| PGCheckViolation | |
| PGExclusionViolation |
Instances
| Eq PGIntegrityConstraintViolation Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error | |
| Show PGIntegrityConstraintViolation Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods showsPrec :: Int -> PGIntegrityConstraintViolation -> ShowS # show :: PGIntegrityConstraintViolation -> String # showList :: [PGIntegrityConstraintViolation] -> ShowS # | |
data PGSyntaxErrorOrAccessRuleViolation Source #
Constructors
| PGUndefinedObject | |
| PGInvalidColumnReference |
Instances
data PGTransactionRollback Source #
Constructors
| PGSerializationFailure |
Instances
| Eq PGTransactionRollback Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods (==) :: PGTransactionRollback -> PGTransactionRollback -> Bool # (/=) :: PGTransactionRollback -> PGTransactionRollback -> Bool # | |
| Show PGTransactionRollback Source # | |
Defined in Hasura.Backends.Postgres.SQL.Error Methods showsPrec :: Int -> PGTransactionRollback -> ShowS # show :: PGTransactionRollback -> String # showList :: [PGTransactionRollback] -> ShowS # | |
_PGTransactionRollback :: Prism' PGErrorType (Maybe (PGErrorCode PGTransactionRollback)) Source #
_PGSyntaxErrorOrAccessRuleViolation :: Prism' PGErrorType (Maybe (PGErrorCode PGSyntaxErrorOrAccessRuleViolation)) Source #
_PGIntegrityConstraintViolation :: Prism' PGErrorType (Maybe (PGErrorCode PGIntegrityConstraintViolation)) Source #
_PGDataException :: Prism' PGErrorType (Maybe (PGErrorCode PGDataException)) Source #
_PGErrorSpecific :: forall a a. Prism (PGErrorCode a) (PGErrorCode a) a a Source #
_PGErrorGeneric :: forall a. Prism' (PGErrorCode a) () Source #
pgErrorType :: PGStmtErrDetail -> Maybe PGErrorType Source #