pgerror

package module
v0.0.0-...-42c66c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 1 Imported by: 6

README

pgerror GoDoc Build Status Go Report Card

pgerror is a collection of helper functions to use with github.com/lib/pq Postgresql Database driver for Go Programming language.


// example use:
_, err = stmt.Exec(SomeInsertStateMent, params...)
if err != nil {
  if e := pgerror.UniqueViolation(err); e != nil {
  // you can use e here to check the fields et al
    return SomeThingAlreadyExists
  }

  return err // other cases.
}

LICENSE

MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveSQLTransaction

func ActiveSQLTransaction(err error) *pq.Error

ActiveSQLTransaction checks if the error is of code 25001

func AdminShutdown

func AdminShutdown(err error) *pq.Error

AdminShutdown checks if the error is of code 57P01

func AmbiguousAlias

func AmbiguousAlias(err error) *pq.Error

AmbiguousAlias checks if the error is of code 42P09

func AmbiguousColumn

func AmbiguousColumn(err error) *pq.Error

AmbiguousColumn checks if the error is of code 42702

func AmbiguousFunction

func AmbiguousFunction(err error) *pq.Error

AmbiguousFunction checks if the error is of code 42725

func AmbiguousParameter

func AmbiguousParameter(err error) *pq.Error

AmbiguousParameter checks if the error is of code 42P08

func ArraySubscriptError

func ArraySubscriptError(err error) *pq.Error

ArraySubscriptError checks if the error is of code 2202E

func BadCopyFileFormat

func BadCopyFileFormat(err error) *pq.Error

BadCopyFileFormat checks if the error is of code 22P04

func BranchTransactionAlreadyActive

func BranchTransactionAlreadyActive(err error) *pq.Error

BranchTransactionAlreadyActive checks if the error is of code 25002

func CannotCoerce

func CannotCoerce(err error) *pq.Error

CannotCoerce checks if the error is of code 42846

func CannotConnectNow

func CannotConnectNow(err error) *pq.Error

CannotConnectNow checks if the error is of code 57P03

func CantChangeRuntimeParam

func CantChangeRuntimeParam(err error) *pq.Error

CantChangeRuntimeParam checks if the error is of code 55P02

func CardinalityViolation

func CardinalityViolation(err error) *pq.Error

CardinalityViolation checks if the error is of code 21000

func CaseNotFound

func CaseNotFound(err error) *pq.Error

CaseNotFound checks if the error is of code 20000

func CharacterNotInRepertoire

func CharacterNotInRepertoire(err error) *pq.Error

CharacterNotInRepertoire checks if the error is of code 22021

func CheckViolation

func CheckViolation(err error) *pq.Error

CheckViolation checks if the error is of code 23514

func CollationMismatch

func CollationMismatch(err error) *pq.Error

CollationMismatch checks if the error is of code 42P21

func ConfigFileError

func ConfigFileError(err error) *pq.Error

ConfigFileError checks if the error is of code F0000

func ConfigurationLimitExceeded

func ConfigurationLimitExceeded(err error) *pq.Error

ConfigurationLimitExceeded checks if the error is of code 53400

func ConnectionDoesNotExist

func ConnectionDoesNotExist(err error) *pq.Error

ConnectionDoesNotExist checks if the error is of code 08003

func ConnectionException

func ConnectionException(err error) *pq.Error

ConnectionException checks if the error is of code 08000

func ConnectionFailure

func ConnectionFailure(err error) *pq.Error

ConnectionFailure checks if the error is of code 08006

func ContainingSQLNotPermitted

func ContainingSQLNotPermitted(err error) *pq.Error

ContainingSQLNotPermitted checks if the error is of code 38001

func CrashShutdown

func CrashShutdown(err error) *pq.Error

CrashShutdown checks if the error is of code 57P02

func DataCorrupted

func DataCorrupted(err error) *pq.Error

DataCorrupted checks if the error is of code XX001

func DataException

func DataException(err error) *pq.Error

DataException checks if the error is of code 22000

func DatabaseDropped

func DatabaseDropped(err error) *pq.Error

DatabaseDropped checks if the error is of code 57P04

func DatatypeMismatch

func DatatypeMismatch(err error) *pq.Error

DatatypeMismatch checks if the error is of code 42804

func DatetimeFieldOverflow

func DatetimeFieldOverflow(err error) *pq.Error

DatetimeFieldOverflow checks if the error is of code 22008

func DeadlockDetected

func DeadlockDetected(err error) *pq.Error

DeadlockDetected checks if the error is of code 40P01

func DependentObjectsStillExist

func DependentObjectsStillExist(err error) *pq.Error

DependentObjectsStillExist checks if the error is of code 2BP01

func DependentPrivilegeDescriptorsStillExist

func DependentPrivilegeDescriptorsStillExist(err error) *pq.Error

DependentPrivilegeDescriptorsStillExist checks if the error is of code 2B000

func DeprecatedFeature

func DeprecatedFeature(err error) *pq.Error

DeprecatedFeature checks if the error is of code 01P01

func DiagnosticsException

func DiagnosticsException(err error) *pq.Error

DiagnosticsException checks if the error is of code 0Z000

func DiskFull

func DiskFull(err error) *pq.Error

DiskFull checks if the error is of code 53100

func DivisionByZero

func DivisionByZero(err error) *pq.Error

DivisionByZero checks if the error is of code 22012

func DuplicateAlias

func DuplicateAlias(err error) *pq.Error

DuplicateAlias checks if the error is of code 42712

func DuplicateColumn

func DuplicateColumn(err error) *pq.Error

DuplicateColumn checks if the error is of code 42701

func DuplicateCursor

func DuplicateCursor(err error) *pq.Error

DuplicateCursor checks if the error is of code 42P03

func DuplicateDatabase

func DuplicateDatabase(err error) *pq.Error

DuplicateDatabase checks if the error is of code 42P04

func DuplicateFile

func DuplicateFile(err error) *pq.Error

DuplicateFile checks if the error is of code 58P02

func DuplicateFunction

func DuplicateFunction(err error) *pq.Error

DuplicateFunction checks if the error is of code 42723

func DuplicateObject

func DuplicateObject(err error) *pq.Error

DuplicateObject checks if the error is of code 42710

func DuplicatePreparedStatement

func DuplicatePreparedStatement(err error) *pq.Error

DuplicatePreparedStatement checks if the error is of code 42P05

func DuplicateSchema

func DuplicateSchema(err error) *pq.Error

DuplicateSchema checks if the error is of code 42P06

func DuplicateTable

func DuplicateTable(err error) *pq.Error

DuplicateTable checks if the error is of code 42P07

func DynamicResultSetsReturned

func DynamicResultSetsReturned(err error) *pq.Error

DynamicResultSetsReturned checks if the error is of code 0100C

func ErrorInAssignment

func ErrorInAssignment(err error) *pq.Error

ErrorInAssignment checks if the error is of code 22005

func EscapeCharacterConflict

func EscapeCharacterConflict(err error) *pq.Error

EscapeCharacterConflict checks if the error is of code 2200B

func ExclusionViolation

func ExclusionViolation(err error) *pq.Error

ExclusionViolation checks if the error is of code 23P01

func ExternalRoutineException

func ExternalRoutineException(err error) *pq.Error

ExternalRoutineException checks if the error is of code 38000

func ExternalRoutineInvocationException

func ExternalRoutineInvocationException(err error) *pq.Error

ExternalRoutineInvocationException checks if the error is of code 39000

func FdwColumnNameNotFound

func FdwColumnNameNotFound(err error) *pq.Error

FdwColumnNameNotFound checks if the error is of code HV005

func FdwDynamicParameterValueNeeded

func FdwDynamicParameterValueNeeded(err error) *pq.Error

FdwDynamicParameterValueNeeded checks if the error is of code HV002

func FdwError

func FdwError(err error) *pq.Error

FdwError checks if the error is of code HV000

func FdwFunctionSequenceError

func FdwFunctionSequenceError(err error) *pq.Error

FdwFunctionSequenceError checks if the error is of code HV010

func FdwInconsistentDescriptorInformation

func FdwInconsistentDescriptorInformation(err error) *pq.Error

FdwInconsistentDescriptorInformation checks if the error is of code HV021

func FdwInvalidAttributeValue

func FdwInvalidAttributeValue(err error) *pq.Error

FdwInvalidAttributeValue checks if the error is of code HV024

func FdwInvalidColumnName

func FdwInvalidColumnName(err error) *pq.Error

FdwInvalidColumnName checks if the error is of code HV007

func FdwInvalidColumnNumber

func FdwInvalidColumnNumber(err error) *pq.Error

FdwInvalidColumnNumber checks if the error is of code HV008

func FdwInvalidDataType

func FdwInvalidDataType(err error) *pq.Error

FdwInvalidDataType checks if the error is of code HV004

func FdwInvalidDataTypeDescriptors

func FdwInvalidDataTypeDescriptors(err error) *pq.Error

FdwInvalidDataTypeDescriptors checks if the error is of code HV006

func FdwInvalidDescriptorFieldIdentifier

func FdwInvalidDescriptorFieldIdentifier(err error) *pq.Error

FdwInvalidDescriptorFieldIdentifier checks if the error is of code HV091

func FdwInvalidHandle

func FdwInvalidHandle(err error) *pq.Error

FdwInvalidHandle checks if the error is of code HV00B

func FdwInvalidOptionIndex

func FdwInvalidOptionIndex(err error) *pq.Error

FdwInvalidOptionIndex checks if the error is of code HV00C

func FdwInvalidOptionName

func FdwInvalidOptionName(err error) *pq.Error

FdwInvalidOptionName checks if the error is of code HV00D

func FdwInvalidStringFormat

func FdwInvalidStringFormat(err error) *pq.Error

FdwInvalidStringFormat checks if the error is of code HV00A

func FdwInvalidStringLengthOrBufferLength

func FdwInvalidStringLengthOrBufferLength(err error) *pq.Error

FdwInvalidStringLengthOrBufferLength checks if the error is of code HV090

func FdwInvalidUseOfNullPointer

func FdwInvalidUseOfNullPointer(err error) *pq.Error

FdwInvalidUseOfNullPointer checks if the error is of code HV009

func FdwNoSchemas

func FdwNoSchemas(err error) *pq.Error

FdwNoSchemas checks if the error is of code HV00P

func FdwOptionNameNotFound

func FdwOptionNameNotFound(err error) *pq.Error

FdwOptionNameNotFound checks if the error is of code HV00J

func FdwOutOfMemory

func FdwOutOfMemory(err error) *pq.Error

FdwOutOfMemory checks if the error is of code HV001

func FdwReplyHandle

func FdwReplyHandle(err error) *pq.Error

FdwReplyHandle checks if the error is of code HV00K

func FdwSchemaNotFound

func FdwSchemaNotFound(err error) *pq.Error

FdwSchemaNotFound checks if the error is of code HV00Q

func FdwTableNotFound

func FdwTableNotFound(err error) *pq.Error

FdwTableNotFound checks if the error is of code HV00R

func FdwTooManyHandles

func FdwTooManyHandles(err error) *pq.Error

FdwTooManyHandles checks if the error is of code HV014

func FdwUnableToCreateExecution

func FdwUnableToCreateExecution(err error) *pq.Error

FdwUnableToCreateExecution checks if the error is of code HV00L

func FdwUnableToCreateReply

func FdwUnableToCreateReply(err error) *pq.Error

FdwUnableToCreateReply checks if the error is of code HV00M

func FdwUnableToEstablishConnection

func FdwUnableToEstablishConnection(err error) *pq.Error

FdwUnableToEstablishConnection checks if the error is of code HV00N

func FeatureNotSupported

func FeatureNotSupported(err error) *pq.Error

FeatureNotSupported checks if the error is of code 0A000

func FloatingPointException

func FloatingPointException(err error) *pq.Error

FloatingPointException checks if the error is of code 22P01

func ForeignKeyViolation

func ForeignKeyViolation(err error) *pq.Error

ForeignKeyViolation checks if the error is of code 23503

func FunctionExecutedNoReturnStatement

func FunctionExecutedNoReturnStatement(err error) *pq.Error

FunctionExecutedNoReturnStatement checks if the error is of code 2F005

func GroupingError

func GroupingError(err error) *pq.Error

GroupingError checks if the error is of code 42803

func HeldCursorRequiresSameIsolationLevel

func HeldCursorRequiresSameIsolationLevel(err error) *pq.Error

HeldCursorRequiresSameIsolationLevel checks if the error is of code 25008

func ImplicitZeroBitPadding

func ImplicitZeroBitPadding(err error) *pq.Error

ImplicitZeroBitPadding checks if the error is of code 01008

func InFailedSQLTransaction

func InFailedSQLTransaction(err error) *pq.Error

InFailedSQLTransaction checks if the error is of code 25P02

func InappropriateAccessModeForBranchTransaction

func InappropriateAccessModeForBranchTransaction(err error) *pq.Error

InappropriateAccessModeForBranchTransaction checks if the error is of code 25003

func InappropriateIsolationLevelForBranchTransaction

func InappropriateIsolationLevelForBranchTransaction(err error) *pq.Error

InappropriateIsolationLevelForBranchTransaction checks if the error is of code 25004

func IndeterminateCollation

func IndeterminateCollation(err error) *pq.Error

IndeterminateCollation checks if the error is of code 42P22

func IndeterminateDatatype

func IndeterminateDatatype(err error) *pq.Error

IndeterminateDatatype checks if the error is of code 42P18

func IndexCorrupted

func IndexCorrupted(err error) *pq.Error

IndexCorrupted checks if the error is of code XX002

func IndicatorOverflow

func IndicatorOverflow(err error) *pq.Error

IndicatorOverflow checks if the error is of code 22022

func InsufficientPrivilege

func InsufficientPrivilege(err error) *pq.Error

InsufficientPrivilege checks if the error is of code 42501

func InsufficientResources

func InsufficientResources(err error) *pq.Error

InsufficientResources checks if the error is of code 53000

func IntegrityConstraintViolation

func IntegrityConstraintViolation(err error) *pq.Error

IntegrityConstraintViolation checks if the error is of code 23000

func InternalError

func InternalError(err error) *pq.Error

InternalError checks if the error is of code XX000

func IntervalFieldOverflow

func IntervalFieldOverflow(err error) *pq.Error

IntervalFieldOverflow checks if the error is of code 22015

func InvalidArgumentForLogarithm

func InvalidArgumentForLogarithm(err error) *pq.Error

InvalidArgumentForLogarithm checks if the error is of code 2201E

func InvalidArgumentForNthValueFunction

func InvalidArgumentForNthValueFunction(err error) *pq.Error

InvalidArgumentForNthValueFunction checks if the error is of code 22016

func InvalidArgumentForNtileFunction

func InvalidArgumentForNtileFunction(err error) *pq.Error

InvalidArgumentForNtileFunction checks if the error is of code 22014

func InvalidArgumentForPowerFunction

func InvalidArgumentForPowerFunction(err error) *pq.Error

InvalidArgumentForPowerFunction checks if the error is of code 2201F

func InvalidArgumentForWidthBucketFunction

func InvalidArgumentForWidthBucketFunction(err error) *pq.Error

InvalidArgumentForWidthBucketFunction checks if the error is of code 2201G

func InvalidAuthorizationSpecification

func InvalidAuthorizationSpecification(err error) *pq.Error

InvalidAuthorizationSpecification checks if the error is of code 28000

func InvalidBinaryRepresentation

func InvalidBinaryRepresentation(err error) *pq.Error

InvalidBinaryRepresentation checks if the error is of code 22P03

func InvalidCatalogName

func InvalidCatalogName(err error) *pq.Error

InvalidCatalogName checks if the error is of code 3D000

func InvalidCharacterValueForCast

func InvalidCharacterValueForCast(err error) *pq.Error

InvalidCharacterValueForCast checks if the error is of code 22018

func InvalidColumnDefinition

func InvalidColumnDefinition(err error) *pq.Error

InvalidColumnDefinition checks if the error is of code 42611

func InvalidColumnReference

func InvalidColumnReference(err error) *pq.Error

InvalidColumnReference checks if the error is of code 42P10

func InvalidCursorDefinition

func InvalidCursorDefinition(err error) *pq.Error

InvalidCursorDefinition checks if the error is of code 42P11

func InvalidCursorName

func InvalidCursorName(err error) *pq.Error

InvalidCursorName checks if the error is of code 34000

func InvalidCursorState

func InvalidCursorState(err error) *pq.Error

InvalidCursorState checks if the error is of code 24000

func InvalidDatabaseDefinition

func InvalidDatabaseDefinition(err error) *pq.Error

InvalidDatabaseDefinition checks if the error is of code 42P12

func InvalidDatetimeFormat

func InvalidDatetimeFormat(err error) *pq.Error

InvalidDatetimeFormat checks if the error is of code 22007

func InvalidEscapeCharacter

func InvalidEscapeCharacter(err error) *pq.Error

InvalidEscapeCharacter checks if the error is of code 22019

func InvalidEscapeOctet

func InvalidEscapeOctet(err error) *pq.Error

InvalidEscapeOctet checks if the error is of code 2200D

func InvalidEscapeSequence

func InvalidEscapeSequence(err error) *pq.Error

InvalidEscapeSequence checks if the error is of code 22025

func InvalidForeignKey

func InvalidForeignKey(err error) *pq.Error

InvalidForeignKey checks if the error is of code 42830

func InvalidFunctionDefinition

func InvalidFunctionDefinition(err error) *pq.Error

InvalidFunctionDefinition checks if the error is of code 42P13

func InvalidGrantOperation

func InvalidGrantOperation(err error) *pq.Error

InvalidGrantOperation checks if the error is of code 0LP01

func InvalidGrantor

func InvalidGrantor(err error) *pq.Error

InvalidGrantor checks if the error is of code 0L000

func InvalidIndicatorParameterValue

func InvalidIndicatorParameterValue(err error) *pq.Error

InvalidIndicatorParameterValue checks if the error is of code 22010

func InvalidLocatorSpecification

func InvalidLocatorSpecification(err error) *pq.Error

InvalidLocatorSpecification checks if the error is of code 0F001

func InvalidName

func InvalidName(err error) *pq.Error

InvalidName checks if the error is of code 42602

func InvalidObjectDefinition

func InvalidObjectDefinition(err error) *pq.Error

InvalidObjectDefinition checks if the error is of code 42P17

func InvalidParameterValue

func InvalidParameterValue(err error) *pq.Error

InvalidParameterValue checks if the error is of code 22023

func InvalidPassword

func InvalidPassword(err error) *pq.Error

InvalidPassword checks if the error is of code 28P01

func InvalidPreparedStatementDefinition

func InvalidPreparedStatementDefinition(err error) *pq.Error

InvalidPreparedStatementDefinition checks if the error is of code 42P14

func InvalidRecursion

func InvalidRecursion(err error) *pq.Error

InvalidRecursion checks if the error is of code 42P19

func InvalidRegularExpression

func InvalidRegularExpression(err error) *pq.Error

InvalidRegularExpression checks if the error is of code 2201B

func InvalidRoleSpecification

func InvalidRoleSpecification(err error) *pq.Error

InvalidRoleSpecification checks if the error is of code 0P000

func InvalidRowCountInLimitClause

func InvalidRowCountInLimitClause(err error) *pq.Error

InvalidRowCountInLimitClause checks if the error is of code 2201W

func InvalidRowCountInResultOffsetClause

func InvalidRowCountInResultOffsetClause(err error) *pq.Error

InvalidRowCountInResultOffsetClause checks if the error is of code 2201X

func InvalidSQLStatementName

func InvalidSQLStatementName(err error) *pq.Error

InvalidSQLStatementName checks if the error is of code 26000

func InvalidSQLstateReturned

func InvalidSQLstateReturned(err error) *pq.Error

InvalidSQLstateReturned checks if the error is of code 39001

func InvalidSavepointSpecification

func InvalidSavepointSpecification(err error) *pq.Error

InvalidSavepointSpecification checks if the error is of code 3B001

func InvalidSchemaDefinition

func InvalidSchemaDefinition(err error) *pq.Error

InvalidSchemaDefinition checks if the error is of code 42P15

func InvalidSchemaName

func InvalidSchemaName(err error) *pq.Error

InvalidSchemaName checks if the error is of code 3F000

func InvalidTableDefinition

func InvalidTableDefinition(err error) *pq.Error

InvalidTableDefinition checks if the error is of code 42P16

func InvalidTextRepresentation

func InvalidTextRepresentation(err error) *pq.Error

InvalidTextRepresentation checks if the error is of code 22P02

func InvalidTimeZoneDisplacementValue

func InvalidTimeZoneDisplacementValue(err error) *pq.Error

InvalidTimeZoneDisplacementValue checks if the error is of code 22009

func InvalidTransactionInitiation

func InvalidTransactionInitiation(err error) *pq.Error

InvalidTransactionInitiation checks if the error is of code 0B000

func InvalidTransactionState

func InvalidTransactionState(err error) *pq.Error

InvalidTransactionState checks if the error is of code 25000

func InvalidTransactionTermination

func InvalidTransactionTermination(err error) *pq.Error

InvalidTransactionTermination checks if the error is of code 2D000

func InvalidUseOfEscapeCharacter

func InvalidUseOfEscapeCharacter(err error) *pq.Error

InvalidUseOfEscapeCharacter checks if the error is of code 2200C

func InvalidXMLComment

func InvalidXMLComment(err error) *pq.Error

InvalidXMLComment checks if the error is of code 2200S

func InvalidXMLContent

func InvalidXMLContent(err error) *pq.Error

InvalidXMLContent checks if the error is of code 2200N

func InvalidXMLDocument

func InvalidXMLDocument(err error) *pq.Error

InvalidXMLDocument checks if the error is of code 2200M

func InvalidXMLProcessingInstruction

func InvalidXMLProcessingInstruction(err error) *pq.Error

InvalidXMLProcessingInstruction checks if the error is of code 2200T

func IoError

func IoError(err error) *pq.Error

IoError checks if the error is of code 58030

func LocatorException

func LocatorException(err error) *pq.Error

LocatorException checks if the error is of code 0F000

func LockFileExists

func LockFileExists(err error) *pq.Error

LockFileExists checks if the error is of code F0001

func LockNotAvailable

func LockNotAvailable(err error) *pq.Error

LockNotAvailable checks if the error is of code 55P03

func ModifyingSQLDataNotPermitted

func ModifyingSQLDataNotPermitted(err error) *pq.Error

ModifyingSQLDataNotPermitted checks if the error is of code 2F002

func MostSpecificTypeMismatch

func MostSpecificTypeMismatch(err error) *pq.Error

MostSpecificTypeMismatch checks if the error is of code 2200G

func NameTooLong

func NameTooLong(err error) *pq.Error

NameTooLong checks if the error is of code 42622

func NoActiveSQLTransaction

func NoActiveSQLTransaction(err error) *pq.Error

NoActiveSQLTransaction checks if the error is of code 25P01

func NoActiveSQLTransactionForBranchTransaction

func NoActiveSQLTransactionForBranchTransaction(err error) *pq.Error

NoActiveSQLTransactionForBranchTransaction checks if the error is of code 25005

func NoAdditionalDynamicResultSetsReturned

func NoAdditionalDynamicResultSetsReturned(err error) *pq.Error

NoAdditionalDynamicResultSetsReturned checks if the error is of code 02001

func NoData

func NoData(err error) *pq.Error

NoData checks if the error is of code 02000

func NoDataFound

func NoDataFound(err error) *pq.Error

NoDataFound checks if the error is of code P0002

func NonstandardUseOfEscapeCharacter

func NonstandardUseOfEscapeCharacter(err error) *pq.Error

NonstandardUseOfEscapeCharacter checks if the error is of code 22P06

func NotAnXMLDocument

func NotAnXMLDocument(err error) *pq.Error

NotAnXMLDocument checks if the error is of code 2200L

func NotNullViolation

func NotNullViolation(err error) *pq.Error

NotNullViolation checks if the error is of code 23502

func NullValueEliminatedInSetFunction

func NullValueEliminatedInSetFunction(err error) *pq.Error

NullValueEliminatedInSetFunction checks if the error is of code 01003

func NullValueNoIndicatorParameter

func NullValueNoIndicatorParameter(err error) *pq.Error

NullValueNoIndicatorParameter checks if the error is of code 22002

func NullValueNotAllowed

func NullValueNotAllowed(err error) *pq.Error

NullValueNotAllowed checks if the error is of code 22004

func NumericValueOutOfRange

func NumericValueOutOfRange(err error) *pq.Error

NumericValueOutOfRange checks if the error is of code 22003

func ObjectInUse

func ObjectInUse(err error) *pq.Error

ObjectInUse checks if the error is of code 55006

func ObjectNotInPrerequisiteState

func ObjectNotInPrerequisiteState(err error) *pq.Error

ObjectNotInPrerequisiteState checks if the error is of code 55000

func OperatorIntervention

func OperatorIntervention(err error) *pq.Error

OperatorIntervention checks if the error is of code 57000

func OutOfMemory

func OutOfMemory(err error) *pq.Error

OutOfMemory checks if the error is of code 53200

func PlpgsqlError

func PlpgsqlError(err error) *pq.Error

PlpgsqlError checks if the error is of code P0000

func PrivilegeNotGranted

func PrivilegeNotGranted(err error) *pq.Error

PrivilegeNotGranted checks if the error is of code 01007

func PrivilegeNotRevoked

func PrivilegeNotRevoked(err error) *pq.Error

PrivilegeNotRevoked checks if the error is of code 01006

func ProgramLimitExceeded

func ProgramLimitExceeded(err error) *pq.Error

ProgramLimitExceeded checks if the error is of code 54000

func ProhibitedSQLStatementAttempted

func ProhibitedSQLStatementAttempted(err error) *pq.Error

ProhibitedSQLStatementAttempted checks if the error is of code 2F003

func ProtocolViolation

func ProtocolViolation(err error) *pq.Error

ProtocolViolation checks if the error is of code 08P01

func QueryCanceled

func QueryCanceled(err error) *pq.Error

QueryCanceled checks if the error is of code 57014

func RaiseException

func RaiseException(err error) *pq.Error

RaiseException checks if the error is of code P0001

func ReadOnlySQLTransaction

func ReadOnlySQLTransaction(err error) *pq.Error

ReadOnlySQLTransaction checks if the error is of code 25006

func ReadingSQLDataNotPermitted

func ReadingSQLDataNotPermitted(err error) *pq.Error

ReadingSQLDataNotPermitted checks if the error is of code 2F004

func ReservedName

func ReservedName(err error) *pq.Error

ReservedName checks if the error is of code 42939

func RestrictViolation

func RestrictViolation(err error) *pq.Error

RestrictViolation checks if the error is of code 23001

func SQLRoutineException

func SQLRoutineException(err error) *pq.Error

SQLRoutineException checks if the error is of code 2F000

func SQLStatementNotYetComplete

func SQLStatementNotYetComplete(err error) *pq.Error

SQLStatementNotYetComplete checks if the error is of code 03000

func SQLclientUnableToEstablishSQLconnection

func SQLclientUnableToEstablishSQLconnection(err error) *pq.Error

SQLclientUnableToEstablishSQLconnection checks if the error is of code 08001

func SQLserverRejectedEstablishmentOfSQLconnection

func SQLserverRejectedEstablishmentOfSQLconnection(err error) *pq.Error

SQLserverRejectedEstablishmentOfSQLconnection checks if the error is of code 08004

func SavepointException

func SavepointException(err error) *pq.Error

SavepointException checks if the error is of code 3B000

func SchemaAndDataStatementMixingNotSupported

func SchemaAndDataStatementMixingNotSupported(err error) *pq.Error

SchemaAndDataStatementMixingNotSupported checks if the error is of code 25007

func SerializationFailure

func SerializationFailure(err error) *pq.Error

SerializationFailure checks if the error is of code 40001

func SrfProtocolViolated

func SrfProtocolViolated(err error) *pq.Error

SrfProtocolViolated checks if the error is of code 39P02

func StackedDiagnosticsAccessedWithoutActiveHandler

func StackedDiagnosticsAccessedWithoutActiveHandler(err error) *pq.Error

StackedDiagnosticsAccessedWithoutActiveHandler checks if the error is of code 0Z002

func StatementCompletionUnknown

func StatementCompletionUnknown(err error) *pq.Error

StatementCompletionUnknown checks if the error is of code 40003

func StatementTooComplex

func StatementTooComplex(err error) *pq.Error

StatementTooComplex checks if the error is of code 54001

func StringDataLengthMismatch

func StringDataLengthMismatch(err error) *pq.Error

StringDataLengthMismatch checks if the error is of code 22026

func StringDataRightTruncation

func StringDataRightTruncation(err error) *pq.Error

StringDataRightTruncation checks if the error is of code 01004

func SubstringError

func SubstringError(err error) *pq.Error

SubstringError checks if the error is of code 22011

func SuccessfulCompletion

func SuccessfulCompletion(err error) *pq.Error

SuccessfulCompletion checks if the error is of code 00000

func SyntaxError

func SyntaxError(err error) *pq.Error

SyntaxError checks if the error is of code 42601

func SyntaxErrorOrAccessRuleViolation

func SyntaxErrorOrAccessRuleViolation(err error) *pq.Error

SyntaxErrorOrAccessRuleViolation checks if the error is of code 42000

func SystemError

func SystemError(err error) *pq.Error

SystemError checks if the error is of code 58000

func TooManyArguments

func TooManyArguments(err error) *pq.Error

TooManyArguments checks if the error is of code 54023

func TooManyColumns

func TooManyColumns(err error) *pq.Error

TooManyColumns checks if the error is of code 54011

func TooManyConnections

func TooManyConnections(err error) *pq.Error

TooManyConnections checks if the error is of code 53300

func TooManyRows

func TooManyRows(err error) *pq.Error

TooManyRows checks if the error is of code P0003

func TransactionIntegrityConstraintViolation

func TransactionIntegrityConstraintViolation(err error) *pq.Error

TransactionIntegrityConstraintViolation checks if the error is of code 40002

func TransactionResolutionUnknown

func TransactionResolutionUnknown(err error) *pq.Error

TransactionResolutionUnknown checks if the error is of code 08007

func TransactionRollback

func TransactionRollback(err error) *pq.Error

TransactionRollback checks if the error is of code 40000

func TriggerProtocolViolated

func TriggerProtocolViolated(err error) *pq.Error

TriggerProtocolViolated checks if the error is of code 39P01

func TriggeredActionException

func TriggeredActionException(err error) *pq.Error

TriggeredActionException checks if the error is of code 09000

func TriggeredDataChangeViolation

func TriggeredDataChangeViolation(err error) *pq.Error

TriggeredDataChangeViolation checks if the error is of code 27000

func TrimError

func TrimError(err error) *pq.Error

TrimError checks if the error is of code 22027

func UndefinedColumn

func UndefinedColumn(err error) *pq.Error

UndefinedColumn checks if the error is of code 42703

func UndefinedFile

func UndefinedFile(err error) *pq.Error

UndefinedFile checks if the error is of code 58P01

func UndefinedFunction

func UndefinedFunction(err error) *pq.Error

UndefinedFunction checks if the error is of code 42883

func UndefinedObject

func UndefinedObject(err error) *pq.Error

UndefinedObject checks if the error is of code 42704

func UndefinedParameter

func UndefinedParameter(err error) *pq.Error

UndefinedParameter checks if the error is of code 42P02

func UndefinedTable

func UndefinedTable(err error) *pq.Error

UndefinedTable checks if the error is of code 42P01

func UniqueViolation

func UniqueViolation(err error) *pq.Error

UniqueViolation checks if the error is of code 23505

func UnterminatedCString

func UnterminatedCString(err error) *pq.Error

UnterminatedCString checks if the error is of code 22024

func UntranslatableCharacter

func UntranslatableCharacter(err error) *pq.Error

UntranslatableCharacter checks if the error is of code 22P05

func Warning

func Warning(err error) *pq.Error

Warning checks if the error is of code 01000

func WindowingError

func WindowingError(err error) *pq.Error

WindowingError checks if the error is of code 42P20

func WithCheckOptionViolation

func WithCheckOptionViolation(err error) *pq.Error

WithCheckOptionViolation checks if the error is of code 44000

func WrongObjectType

func WrongObjectType(err error) *pq.Error

WrongObjectType checks if the error is of code 42809

func ZeroLengthCharacterString

func ZeroLengthCharacterString(err error) *pq.Error

ZeroLengthCharacterString checks if the error is of code 2200F

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL