Documentation
¶
Index ¶
- func AuthenticationCleartextPassword() []byte
- func AuthenticationOk() []byte
- func CommandComplete(msg []byte) []byte
- func DataRow(rows []*schema.Row, colNumb int, binaryFormat bool) []byte
- func EmptyQueryResponse() []byte
- func ErrorResponse(setters ...Option) *errorResp
- func ParameterStatus(pname, pval []byte) []byte
- func ReadyForQuery() []byte
- func RowDescription(cols []*schema.Column) []byte
- type ErrorResp
- type Option
- func Code(value string) Option
- func ColumnName(value string) Option
- func ConstraintName(value string) Option
- func DataTypeName(value string) Option
- func Detail(value string) Option
- func File(value string) Option
- func Hint(value string) Option
- func InternalPosition(value string) Option
- func InternalQuery(value string) Option
- func Line(value string) Option
- func Message(value string) Option
- func Position(value string) Option
- func Routine(value string) Option
- func SchemaName(value string) Option
- func Severity(value string) Option
- func SeverityNotLoc(value string) Option
- func TableName(value string) Option
- func Where(value string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationCleartextPassword ¶
func AuthenticationCleartextPassword() []byte
func AuthenticationOk ¶
func AuthenticationOk() []byte
func CommandComplete ¶
func EmptyQueryResponse ¶
func EmptyQueryResponse() []byte
func ErrorResponse ¶
func ErrorResponse(setters ...Option) *errorResp
func ParameterStatus ¶
func ReadyForQuery ¶
func ReadyForQuery() []byte
func RowDescription ¶
Types ¶
type Option ¶
type Option func(s *errorResp)
func ColumnName ¶
ColumnName if the error was associated with a specific table column, the name of the column. (Refer to the schema and table name fields to identify the table.)
func ConstraintName ¶
ConstraintName if the error was associated with a specific constraint, the name of the constraint. Refer to fields listed above for the associated table or domain. (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.)
func DataTypeName ¶
DataTypeName if the error was associated with a specific data type, the name of the data type. (Refer to the schema name field for the name of the data type's schema.)
func Detail ¶
Detail an optional secondary error message carrying more detail about the problem. Might run to multiple lines.
func Hint ¶
Hint an optional suggestion what to do about the problem. This is intended to differ from Detail in that it offers advice (potentially inappropriate) rather than hard facts. Might run to multiple lines.
func InternalPosition ¶
InternalPosition this is defined the same as the P field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. The q field will always appear when this field appears.
func InternalQuery ¶
InternalQuery the text of a failed internally-generated command. This could be, for example, a SQL query issued by a PL/pgSQL function.
func Message ¶
Message the primary human-readable error message. This should be accurate but terse (typically one line). Always present.
func Position ¶
Position the field value is a decimal ASCII integer, indicating an error cursor position as an index into the original query string. The first character has index 1, and positions are measured in characters not bytes.
func SchemaName ¶
SchemaName if the error was associated with a specific database object, the name of the schema containing that object, if any.
func Severity ¶
Severity the field contents are ERROR, FATAL, or PANIC (in an error message), or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized translation of one of these. Always present.
func SeverityNotLoc ¶
Severity the field contents are ERROR, FATAL, or PANIC (in an error message), or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message). This is identical to the S field except that the contents are never localized. This is present only in messages generated by PostgreSQL versions 9.6 and later.