Documentation ¶
Index ¶
- Variables
- func AsBigFloat(src interface{}) (*big.Float, error)
- func AsBool(src interface{}) (bool, error)
- func AsBytes(src interface{}) ([]byte, bool)
- func AsFloat64(src interface{}) (float64, error)
- func AsInt64(src interface{}) (int64, error)
- func AsString(src interface{}) string
- func AsTime(src interface{}, dbLoc *time.Location, uiLoc *time.Location) (*time.Time, error)
- func AsUint64(src interface{}) (uint64, error)
- func Assign(dest, src interface{}, originalLocation *time.Location, ...) error
- func AssignValue(dv reflect.Value, src interface{}) error
- func Interface2Interface(userLocation *time.Location, v interface{}) (interface{}, error)
- func String2Time(s string, originalLocation *time.Location, convertedLocation *time.Location) (*time.Time, error)
- type Conversion
- type EmptyScanner
- type NullUint32
- type NullUint64
Constants ¶
This section is empty.
Variables ¶
var ErrNilPtr = errors.New("destination pointer is nil") // embedded in descriptive error
ErrNilPtr represents an error
Functions ¶
func AsBigFloat ¶
AsBigFloat converts interface as big.Float
func Assign ¶
func Assign(dest, src interface{}, originalLocation *time.Location, convertedLocation *time.Location) error
Assign copies to dest the value in src, converting it if possible. An error is returned if the copy would result in loss of information. dest should be a pointer type.
func AssignValue ¶
AssignValue assign src as dv
func Interface2Interface ¶
Interface2Interface converts interface of pointer as interface of value
Types ¶
type Conversion ¶
Conversion is an interface. A type implements Conversion will according the custom method to fill into database and retrieve from database.
type EmptyScanner ¶
type EmptyScanner struct{}
EmptyScanner represents an empty scanner which will ignore the scan
func (EmptyScanner) Scan ¶
func (EmptyScanner) Scan(value interface{}) error
Scan implements sql.Scanner
type NullUint32 ¶
NullUint32 represents an uint32 that may be null. NullUint32 implements the Scanner interface so it can be used as a scan destination, similar to NullString.
func (*NullUint32) Scan ¶
func (n *NullUint32) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullUint64 ¶
NullUint64 represents an uint64 that may be null. NullUint64 implements the Scanner interface so it can be used as a scan destination, similar to NullString.
func (*NullUint64) Scan ¶
func (n *NullUint64) Scan(value interface{}) error
Scan implements the Scanner interface.