Documentation
¶
Overview ¶
Package pgxtypefaster provides types for use with the pgx Postgres driver that are faster, but not completely API compatible.
Package pgxtypefaster provides types for use with the pgx Postgres driver that are faster, but not completely API compatible.
Index ¶
- Variables
- func NewText(s string) pgtype.Text
- func RegisterHstore(ctx context.Context, conn *pgx.Conn) error
- func RegisterHstoreCompat(ctx context.Context, conn *pgx.Conn) error
- type Hstore
- type HstoreCodec
- func (c HstoreCodec) DecodeDatabaseSQLValue(m *pgtype.Map, oid uint32, format int16, src []byte) (driver.Value, error)
- func (c HstoreCodec) DecodeValue(m *pgtype.Map, oid uint32, format int16, src []byte) (any, error)
- func (HstoreCodec) FormatSupported(format int16) bool
- func (HstoreCodec) PlanEncode(m *pgtype.Map, oid uint32, format int16, value any) pgtype.EncodePlan
- func (HstoreCodec) PlanScan(m *pgtype.Map, oid uint32, format int16, target any) pgtype.ScanPlan
- func (HstoreCodec) PreferredFormat() int16
- type HstoreCompat
- type HstoreCompatCodec
- func (c HstoreCompatCodec) DecodeDatabaseSQLValue(m *pgtype.Map, oid uint32, format int16, src []byte) (driver.Value, error)
- func (c HstoreCompatCodec) DecodeValue(m *pgtype.Map, oid uint32, format int16, src []byte) (any, error)
- func (HstoreCompatCodec) FormatSupported(format int16) bool
- func (HstoreCompatCodec) PlanEncode(m *pgtype.Map, oid uint32, format int16, value any) pgtype.EncodePlan
- func (HstoreCompatCodec) PlanScan(m *pgtype.Map, oid uint32, format int16, target any) pgtype.ScanPlan
- func (HstoreCompatCodec) PreferredFormat() int16
- type HstoreCompatScanner
- type HstoreCompatValuer
- type HstoreScanner
- type HstoreValuer
Constants ¶
This section is empty.
Variables ¶
var ErrHstoreDoesNotExist = errors.New("postgres type hstore does not exist (the extension may not be loaded)")
Functions ¶
func RegisterHstore ¶
RegisterHstore registers the Hstore type with conn's default type map. It queries the database for the Hstore OID to be able to register it.
func RegisterHstoreCompat ¶
RegisterHstoreCompat registers the HstoreCompat type with conn's default type map. It queries the database for the Hstore OID to be able to register it.
Types ¶
type Hstore ¶
Hstore represents an hstore column that can be null or have null values associated with its keys.
func PGXToFasterHstore ¶
PGXToFasterHstore copies a pgtype.Hstore into a pgxtypefaster.Hstore.
func (Hstore) HstoreValue ¶
func (*Hstore) ScanHstore ¶
type HstoreCodec ¶
type HstoreCodec struct{}
func (HstoreCodec) DecodeDatabaseSQLValue ¶
func (HstoreCodec) DecodeValue ¶
func (HstoreCodec) FormatSupported ¶
func (HstoreCodec) FormatSupported(format int16) bool
func (HstoreCodec) PlanEncode ¶
func (HstoreCodec) PlanEncode(m *pgtype.Map, oid uint32, format int16, value any) pgtype.EncodePlan
func (HstoreCodec) PreferredFormat ¶
func (HstoreCodec) PreferredFormat() int16
type HstoreCompat ¶
HstoreCompat represents an hstore column that can be null or have null values associated with its keys.
func (HstoreCompat) HstoreCompatValue ¶
func (h HstoreCompat) HstoreCompatValue() (HstoreCompat, error)
func (*HstoreCompat) Scan ¶
func (h *HstoreCompat) Scan(src any) error
Scan implements the database/sql Scanner interface.
func (*HstoreCompat) ScanHstoreCompat ¶
func (h *HstoreCompat) ScanHstoreCompat(v HstoreCompat) error
type HstoreCompatCodec ¶
type HstoreCompatCodec struct{}
func (HstoreCompatCodec) DecodeDatabaseSQLValue ¶
func (HstoreCompatCodec) DecodeValue ¶
func (HstoreCompatCodec) FormatSupported ¶
func (HstoreCompatCodec) FormatSupported(format int16) bool
func (HstoreCompatCodec) PlanEncode ¶
func (HstoreCompatCodec) PlanEncode(m *pgtype.Map, oid uint32, format int16, value any) pgtype.EncodePlan
func (HstoreCompatCodec) PreferredFormat ¶
func (HstoreCompatCodec) PreferredFormat() int16
type HstoreCompatScanner ¶
type HstoreCompatScanner interface {
ScanHstoreCompat(v HstoreCompat) error
}
type HstoreCompatValuer ¶
type HstoreCompatValuer interface {
HstoreCompatValue() (HstoreCompat, error)
}