forked from jackc/pgtype
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbit.go
45 lines (34 loc) · 1.01 KB
/
bit.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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()
}