Documentation
¶
Index ¶
- Variables
- func NewErrColumnNotExist(v any) error
- func NewErrColumnValueNotExist(v any) error
- func NewErrColumnsNotEqual(v1, v2 int) error
- func NewErrDatabaseExist(v string) error
- func NewErrDatabaseNotExist(v string) error
- func NewErrExist(name string) error
- func NewErrGroupByColumnValueNotFound(v any) error
- func NewErrMultiplePreparedStatementNotSupported(query string) error
- func NewErrMultipleTableNotSupported(query string) error
- func NewErrNotExist(name string) error
- func NewErrNotImplemented(s string) error
- func NewErrNotSupported(name string) error
- func NewErrPreparedPortalNotExist(name string) error
- func NewErrPreparedStatementNotExist(name string) error
- func NewErrTableExist(v string) error
- func NewErrTableNotExist(v string) error
- type Class
- type Code
Constants ¶
This section is empty.
Variables ¶
var ErrExist = errors.New("exist")
ErrExist is returned when the specified object is exist.
var ErrInvalid = errors.New("invalid")
ErrInvalid is returned when the specified object is invalid.
var ErrNoRows = errors.New("no rows")
ErrNoRows is returned when no rows are found.
var ErrNotEqual = errors.New("not equal")
ErrNotEqual is returned when the specified object is not equal.
var ErrNotExist = errors.New("not exist")
ErrNotExist is returned when the specified object is not exist.
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when the specified object is not found.
var ErrNotImplemented = errors.New("not implemented")
ErrNotImplemented is returned when the operation is not implemented.
var ErrNotSupported = errors.New("not supported")
ErrNotSupported is returned when the operation is not supported.
Functions ¶
func NewErrColumnNotExist ¶ added in v1.4.0
NewErrColumnNotExist returns a new column not exist error.
func NewErrColumnValueNotExist ¶ added in v1.4.0
NewErrColumnValueNotExist returns a new column value not exist error.
func NewErrColumnsNotEqual ¶ added in v1.4.0
NewErrColumnsNotEqual returns a new columns not equal error.
func NewErrDatabaseExist ¶ added in v1.4.0
NewErrDatabaseExist returns a new database exist error.
func NewErrDatabaseNotExist ¶ added in v1.4.0
NewErrDatabaseNotExist returns a new database not exist error.
func NewErrExist ¶ added in v1.4.2
NewErrExist returns an error for a exist.
func NewErrGroupByColumnValueNotFound ¶ added in v1.4.0
NewErrGroupByColumnValueNotFound returns a new group by column not found error.
func NewErrMultiplePreparedStatementNotSupported ¶ added in v1.4.0
NewErrPreparedStatementMultiStatement returns a new prepared statement multi statement error.
func NewErrMultipleTableNotSupported ¶ added in v1.4.0
NewErrMultipleTableNotSupported returns a new prepared statement multi table error.
func NewErrNotExist ¶ added in v1.4.2
NewErrNotExist returns an error for a not exist.
func NewErrNotImplemented ¶ added in v1.4.0
NewErrNotImplemented returns an error for a not implemented.
func NewErrNotSupported ¶ added in v1.4.2
NewErrNotSupported returns an error for a not supported.
func NewErrPreparedPortalNotExist ¶ added in v1.4.0
NewErrPreparedPortalNotExist returns a new prepared portal not exist error.
func NewErrPreparedStatementNotExist ¶ added in v1.4.0
NewErrPreparedStatementNotExist returns a new prepared statement not exist error.
func NewErrTableExist ¶ added in v1.4.0
NewErrTableExist returns a new table exist error.
func NewErrTableNotExist ¶ added in v1.4.0
NewErrTableNotExist returns a new table not exist error.
Types ¶
type Class ¶
type Class string
Class represents a SQL error class.
const ( // Class 00 — Successful Completion. Class00 Class = "00" // Class 01 — Warning. Class01 Class = "01" // Class 02 — No Data. Class02 Class = "02" // Class 03 — SQL Statement Not Yet Complete. Class03 Class = "03" // Class 08 — Connection Exception. Class08 Class = "08" // Class 09 — Triggered Action Exception. Class09 Class = "09" // Class 0A — Feature Not Supported. Class0A Class = "0A" // Class 0B — Invalid Transaction Initiation. Class0B Class = "0B" // Class 0F — Locator Exception. Class0F Class = "0F" // Class 0L — Invalid Grantor. Class0L Class = "0L" // Class 0P — Invalid Role Specification. Class0P Class = "0P" // Class 0Z — Diagnostics Exception. Class0Z Class = "0Z" // Class 20 — Case Not Found. Class20 Class = "20" // Class 21 — Cardinality Violation. Class21 Class = "21" // Class 22 — Data Exception. Class22 Class = "22" // Class 23 — Integrity Constraint Violation. Class23 Class = "23" // Class 24 — Invalid Cursor State. Class24 Class = "24" // Class 25 — Invalid Transaction State. Class25 Class = "25" // Class 26 — Invalid SQL Statement Name. Class26 Class = "26" // Class 27 — Triggered Data Change Violation. Class27 Class = "27" // Class 28 — Invalid Authorization Specification. Class28 Class = "28" // Class 2B — Dependent Privilege Descriptors Still Exist. Class2B Class = "2B" // Class 2D — Invalid Transaction Termination. Class2D Class = "2D" // Class 2F — SQL Routine Exception. Class2F Class = "2F" // Class 34 — Invalid Cursor Name. Class34 Class = "34" // Class 38 — External Routine Exception. Class38 Class = "38" // Class 39 — External Routine Invocation Exception. Class39 Class = "39" // Class 3B — Savepoint Exception. Class3B Class = "3B" // Class 3D — Invalid Catalog Name. Class3D Class = "3D" // Class 3F — Invalid Schema Name. Class3F Class = "3F" // Class 40 — Transaction Rollback. Class40 Class = "40" // Class 42 — Syntax Error or Access Rule Violation. Class42 Class = "42" // Class 44 — WITH CHECK OPTION Violation. Class44 Class = "44" // Class 53 — Insufficient Resources. Class53 Class = "53" // Class 54 — Program Limit Exceeded. Class54 Class = "54" // Class 55 — Object Not In Prerequisite State. Class55 Class = "55" // Class 57 — Operator Intervention. Class57 Class = "57" // Class 58 — System Error. Class58 Class = "58" // Class F0 — Configuration File Error. ClassF0 Class = "F0" // Class HV — Foreign Data Wrapper Error (SQL/MED). ClassHV Class = "HV" // Class P0 — PL/pgSQL Error. ClassP0 Class = "P0" // Class XX — Internal Error. ClassXX Class = "XX" )
type Code ¶
type Code string
Code represents a SQL error code.
const ( SuccessfulCompletion Code = "00000" Warning Code = "01000" DynamicResultSetsReturned Code = "0100C" ImplicitZeroBitPadding Code = "01008" NullValueEliminatedInSetFunction Code = "01003" PrivilegeNotGranted Code = "01007" PrivilegeNotRevoked Code = "01006" StringDataRightTruncationWarning Code = "01004" DeprecatedFeature Code = "01P01" NoData Code = "02000" NoAdditionalDynamicResultSetsReturned Code = "02001" SQLStatementNotYetComplete Code = "03000" ConnectionException Code = "08000" ConnectionDoesNotExist Code = "08003" ConnectionFailure Code = "08006" SQLClientUnableToEstablishSQLConnection Code = "08001" SQLServerRejectedEstablishmentOfSQLConnection Code = "08004" TransactionResolutionUnknown Code = "08007" ProtocolViolation Code = "08P01" TriggeredActionException Code = "09000" FeatureNotSupported Code = "0A000" InvalidTransactionInitiation Code = "0B000" LocatorException Code = "0F000" InvalidLocatorSpecification Code = "0F001" InvalidGrantor Code = "0L000" InvalidGrantOperation Code = "0LP01" InvalidRoleSpecification Code = "0P000" DiagnosticsException Code = "0Z000" StackedDiagnosticsAccessedWithoutActiveHandler Code = "0Z002" CaseNotFound Code = "20000" CardinalityViolation Code = "21000" DataException Code = "22000" ArraySubscriptError Code = "2202E" CharacterNotInRepertoire Code = "22021" DatetimeFieldOverflow Code = "22008" DivisionByZero Code = "22012" ErrorInAssignment Code = "22005" EscapeCharacterConflict Code = "2200B" IndicatorOverflow Code = "22022" IntervalFieldOverflow Code = "22015" InvalidArgumentForLogarithm Code = "2201E" InvalidArgumentForNtileFunction Code = "22014" InvalidArgumentForNthValueFunction Code = "22016" InvalidArgumentForPowerFunction Code = "2201F" InvalidArgumentForWidthBucketFunction Code = "2201G" InvalidCharacterValueForCast Code = "22018" InvalidDatetimeFormat Code = "22007" InvalidEscapeCharacter Code = "22019" InvalidEscapeOctet Code = "2200D" InvalidEscapeSequence Code = "22025" NonstandardUseOfEscapeCharacter Code = "22P06" InvalidIndicatorParameterValue Code = "22010" InvalidParameterValue Code = "22023" InvalidPrecedingOrFollowingSize Code = "22013" InvalidRegularExpression Code = "2201B" InvalidRowCountInLimitClause Code = "2201W" InvalidRowCountInResultOffsetClause Code = "2201X" InvalidTablesampleArgument Code = "2202H" InvalidTablesampleRepeat Code = "2202G" InvalidTimeZoneDisplacementValue Code = "22009" InvalidUseOfEscapeCharacter Code = "2200C" MostSpecificTypeMismatch Code = "2200G" NullDataValueNotAllowed Code = "22004" NullDataValueNoIndicatorParameter Code = "22002" NumericValueOutOfRange Code = "22003" SequenceGeneratorLimitExceeded Code = "2200H" StringDataLengthMismatch Code = "22026" StringDataRightTruncation Code = "22001" SubstringError Code = "22011" TrimError Code = "22027" UnterminatedCString Code = "22024" ZeroLengthCharacterString Code = "2200F" FloatingPointException Code = "22P01" InvalidTextRepresentation Code = "22P02" InvalidBinaryRepresentation Code = "22P03" BadCopyFileFormat Code = "22P04" UntranslatableCharacter Code = "22P05" NotAnXMLDocument Code = "2200L" InvalidXMLDocument Code = "2200M" InvalidXMLContent Code = "2200N" InvalidXMLComment Code = "2200S" InvalidXMLProcessingInstruction Code = "2200T" DuplicateJSONObjectKeyValue Code = "22030" InvalidArgumentForSQLJSONDatetimeFunction Code = "22031" InvalidJSONText Code = "22032" InvalidSQLJSONSubscript Code = "22033" MoreThanOneSQLJSONItem Code = "22034" NoSQLJSONItem Code = "22035" NonNumericSQLJSONItem Code = "22036" NonUniqueKeysInAJSONObject Code = "22037" SingletonSQLJSONItemRequired Code = "22038" SQLJSONArrayNotFound Code = "22039" SQLJSONMemberNotFound Code = "2203A" SQLJSONNumberNotFound Code = "2203B" SQLJSONObjectNotFound Code = "2203C" TooManyJSONArrayElements Code = "2203D" TooManyJSONObjectMembers Code = "2203E" SQLJSONScalarRequired Code = "2203F" SQLJSONItemCannotBeCastToTargetType Code = "2203G" IntegrityConstraintViolation Code = "23000" RestrictViolation Code = "23001" NotNullViolation Code = "23502" ForeignKeyViolation Code = "23503" UniqueViolation Code = "23505" CheckViolation Code = "23514" ExclusionViolation Code = "23P01" InvalidCursorState Code = "24000" InvalidTransactionState Code = "25000" ActiveSQLTransaction Code = "25001" BranchTransactionAlreadyActive Code = "25002" HeldCursorRequiresSameIsolationLevel Code = "25008" InappropriateAccessModeForBranchTransaction Code = "25003" InappropriateIsolationLevelForBranchTransaction Code = "25004" NoActiveSQLTransactionForBranchTransaction Code = "25005" ReadOnlySQLTransaction Code = "25006" SchemaAndDataStatementMixingNotSupported Code = "25007" NoActiveSQLTransaction Code = "25P01" InFailedSQLTransaction Code = "25P02" IdleInTransactionSessionTimeout Code = "25P03" TransactionTimeout Code = "25P04" InvalidSQLStatementName Code = "26000" TriggeredDataChangeViolation Code = "27000" InvalidAuthorizationSpecification Code = "28000" InvalidPassword Code = "28P01" DependentPrivilegeDescriptorsStillExist Code = "2B000" DependentObjectsStillExist Code = "2BP01" InvalidTransactionTermination Code = "2D000" SQLRoutineException Code = "2F000" FunctionExecutedNoReturnStatement Code = "2F005" SQLRoutineModifyingSQLDataNotPermitted Code = "2F002" SQLRoutineProhibitedSQLStatementAttempted Code = "2F003" SQLRoutineReadingSQLDataNotPermitted Code = "2F004" InvalidCursorName Code = "34000" ExternalRoutineException Code = "38000" ContainingSQLNotPermitted Code = "38001" ExternalRoutineModifyingSQLDataNotPermitted Code = "38002" ExternalRoutineProhibitedSQLStatementAttempted Code = "38003" ExternalRoutineReadingSQLDataNotPermitted Code = "38004" ExternalRoutineInvocationException Code = "39000" InvalidSQLStateReturned Code = "39001" NullValueNotAllowed Code = "39004" TriggerProtocolViolated Code = "39P01" SRFProtocolViolated Code = "39P02" EventTriggerProtocolViolated Code = "39P03" SavepointException Code = "3B000" InvalidSavepointSpecification Code = "3B001" InvalidCatalogName Code = "3D000" InvalidSchemaName Code = "3F000" TransactionRollback Code = "40000" TransactionIntegrityConstraintViolation Code = "40002" SerializationFailure Code = "40001" StatementCompletionUnknown Code = "40003" DeadlockDetected Code = "40P01" SyntaxErrorOrAccessRuleViolation Code = "42000" SyntaxError Code = "42601" InsufficientPrivilege Code = "42501" CannotCoerce Code = "42846" GroupingError Code = "42803" WindowingError Code = "42P20" InvalidRecursion Code = "42P19" InvalidForeignKey Code = "42830" InvalidName Code = "42602" NameTooLong Code = "42622" ReservedName Code = "42939" DatatypeMismatch Code = "42804" IndeterminateDatatype Code = "42P18" CollationMismatch Code = "42P21" IndeterminateCollation Code = "42P22" WrongObjectType Code = "42809" GeneratedAlways Code = "428C9" UndefinedColumn Code = "42703" UndefinedFunction Code = "42883" UndefinedTable Code = "42P01" UndefinedParameter Code = "42P02" UndefinedObject Code = "42704" DuplicateColumn Code = "42701" DuplicateCursor Code = "42P03" DuplicateDatabase Code = "42P04" DuplicateFunction Code = "42723" DuplicatePreparedStatement Code = "42P05" DuplicateSchema Code = "42P06" DuplicateTable Code = "42P07" DuplicateAlias Code = "42712" DuplicateObject Code = "42710" AmbiguousColumn Code = "42702" AmbiguousFunction Code = "42725" AmbiguousParameter Code = "42P08" AmbiguousAlias Code = "42P09" InvalidColumnReference Code = "42P10" InvalidColumnDefinition Code = "42611" InvalidCursorDefinition Code = "42P11" InvalidDatabaseDefinition Code = "42P12" InvalidFunctionDefinition Code = "42P13" InvalidPreparedStatementDefinition Code = "42P14" InvalidSchemaDefinition Code = "42P15" InvalidTableDefinition Code = "42P16" InvalidObjectDefinition Code = "42P17" WithCheckOptionViolation Code = "44000" InsufficientResources Code = "53000" DiskFull Code = "53100" OutOfMemory Code = "53200" TooManyConnections Code = "53300" ConfigurationLimitExceeded Code = "53400" ProgramLimitExceeded Code = "54000" StatementTooComplex Code = "54001" TooManyColumns Code = "54011" TooManyArguments Code = "54023" ObjectNotInPrerequisiteState Code = "55000" ObjectInUse Code = "55006" CantChangeRuntimeParam Code = "55P02" LockNotAvailable Code = "55P03" UnsafeNewEnumValueUsage Code = "55P04" OperatorIntervention Code = "57000" QueryCanceled Code = "57014" AdminShutdown Code = "57P01" CrashShutdown Code = "57P02" CannotConnectNow Code = "57P03" DatabaseDropped Code = "57P04" IdleSessionTimeout Code = "57P05" SystemError Code = "58000" IOError Code = "58030" UndefinedFile Code = "58P01" DuplicateFile Code = "58P02" ConfigFileError Code = "F0000" LockFileExists Code = "F0001" FDWError Code = "HV000" FDWColumnNameNotFound Code = "HV005" FDWDynamicParameterValueNeeded Code = "HV002" FDWFunctionSequenceError Code = "HV010" FDWInconsistentDescriptorInformation Code = "HV021" FDWInvalidAttributeValue Code = "HV024" FDWInvalidColumnName Code = "HV007" FDWInvalidColumnNumber Code = "HV008" FDWInvalidDataType Code = "HV004" FDWInvalidDataTypeDescriptors Code = "HV006" FDWInvalidDescriptorFieldIdentifier Code = "HV091" FDWInvalidHandle Code = "HV00B" FDWInvalidOptionIndex Code = "HV00C" FDWInvalidOptionName Code = "HV00D" FDWInvalidStringLength Code = "HV090" FDWInvalidStringFormat Code = "HV00A" FDWInvalidUseOfNullPointer Code = "HV009" FDWTooManyHandles Code = "HV014" FDWOutOfMemory Code = "HV001" FDWNoSchemas Code = "HV00P" FDWOptionNameNotFound Code = "HV00J" FDWReplyHandle Code = "HV00K" FDWSchemaNotFound Code = "HV00Q" FDWTableNotFound Code = "HV00R" FDWUnableToCreateExecution Code = "HV00L" FDWUnableToCreateReply Code = "HV00M" FDWUnableToEstablishConnection Code = "HV00N" PLPGSQLError Code = "P0000" RaiseException Code = "P0001" NoDataFound Code = "P0002" TooManyRows Code = "P0003" AssertFailure Code = "P0004" InternalError Code = "XX000" DataCorrupted Code = "XX001" IndexCorrupted Code = "XX002" )