mirror of
https://github.com/jackc/pgx.git
synced 2025-04-27 21:25:53 +00:00
Methods defined on T are also available on *T. Thought this technically changes the interface, because *T will be automatically dereferenced as needed it shouldn't be a breaking change. See a8802b16cc593842f5c69b0f7cfb0de11d5cd3a8 for similar change.
46 lines
1.0 KiB
Go
46 lines
1.0 KiB
Go
package pgtype
|
|
|
|
import (
|
|
"database/sql/driver"
|
|
)
|
|
|
|
type Bit Varbit
|
|
|
|
func (dst *Bit) Set(src interface{}) error {
|
|
return (*Varbit)(dst).Set(src)
|
|
}
|
|
|
|
func (dst Bit) Get() interface{} {
|
|
return (Varbit)(dst).Get()
|
|
}
|
|
|
|
func (src *Bit) AssignTo(dst interface{}) error {
|
|
return (*Varbit)(src).AssignTo(dst)
|
|
}
|
|
|
|
func (dst *Bit) DecodeBinary(ci *ConnInfo, src []byte) error {
|
|
return (*Varbit)(dst).DecodeBinary(ci, src)
|
|
}
|
|
|
|
func (src Bit) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) {
|
|
return (Varbit)(src).EncodeBinary(ci, buf)
|
|
}
|
|
|
|
func (dst *Bit) DecodeText(ci *ConnInfo, src []byte) error {
|
|
return (*Varbit)(dst).DecodeText(ci, src)
|
|
}
|
|
|
|
func (src Bit) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) {
|
|
return (Varbit)(src).EncodeText(ci, buf)
|
|
}
|
|
|
|
// Scan implements the database/sql Scanner interface.
|
|
func (dst *Bit) Scan(src interface{}) error {
|
|
return (*Varbit)(dst).Scan(src)
|
|
}
|
|
|
|
// Value implements the database/sql/driver Valuer interface.
|
|
func (src Bit) Value() (driver.Value, error) {
|
|
return (Varbit)(src).Value()
|
|
}
|