Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsStandardNullableType ¶
IsStandardNullableType returns whether t can represent SQL NULL.
func IsStandardSpecialType ¶
IsStandardSpecialType returns whether t requires direct struct scanning.
Types ¶
type Hooks ¶
type Hooks interface {
IsNullableType(t reflect.Type) bool
IsSpecialStruct(t reflect.Type) bool
CreateSpecialScanTarget(fieldValue reflect.Value, fieldType reflect.Type) (any, bool)
AssignSpecialValue(fieldValue reflect.Value, target any) (bool, error)
}
Hooks provides dialect-specific nullable and special-value behavior.
type StandardHooks ¶
type StandardHooks struct{}
StandardHooks implements Hooks for dialects that only need the standard nullable and special value tables.
func (StandardHooks) AssignSpecialValue ¶
AssignSpecialValue returns that no dialect-specific assignment exists.
func (StandardHooks) CreateSpecialScanTarget ¶
CreateSpecialScanTarget returns that no dialect-specific scan target exists.
func (StandardHooks) IsNullableType ¶
func (StandardHooks) IsNullableType(t reflect.Type) bool
IsNullableType retursn whether t can represent SQL NULL.
func (StandardHooks) IsSpecialStruct ¶
func (StandardHooks) IsSpecialStruct(t reflect.Type) bool
IsSpecialStruct returns whether t requires direct struct scanning.
Click to show internal directories.
Click to hide internal directories.