package
0.0.0-20220415015457-0c396f5b46d9
Repository: https://github.com/hyperq/jpkg.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
Map converts a struct to a map type for each field of the struct must be built-in type.
No description provided by the author
Scan scans data from rows to target Don't forget to close the rows When the target is not a pointer of slice, ErrEmptyResult may be returned if the query result is empty.
ScanClose is the same as Scan and helps you Close the rows Don't exec the rows.Close after calling this.
ScanMap returns the result in the form of []map[string]interface{} json.Marshal encodes []byte as a base64 string, while in most cases it's expected to be encoded as string or int.
ScanMapClose is the same as ScanMap and close the rows.
ScanMapDecode returns the result in the form of []map[string]interface{} If possible, it will convert []uint8 to int or float64, or it will convert []uint8 to string.
ScanMapDecodeClose returns the result in the form of []map[string]interface{} If possible, it will convert []uint8 to int or float64, or it will convert []uint8 to string.
SetTagName can be set only once.
# Constants
DefaultTagName is the default struct tag name.
# Variables
ErrEmptyResult occurs when target of Scan isn't slice and the result of the query is empty.
ErrNilRows means the first param can't be a nil.
ErrNoneStructTarget as its name says.
ErrSliceToString means only []uint8 can be transmuted into string.
ErrTargetNotSettable means the second param of Bind is not settable.
No description provided by the author
No description provided by the author
# Interfaces
ByteUnmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves.
Rows defines methods that scanner needs, which database/sql.Rows already implements.