a39f467b93
Query renamed to QueryMany Default Decoders refactored
13 lines
367 B
Go
13 lines
367 B
Go
package advsql
|
|
|
|
import "time"
|
|
|
|
type defaultDecoderType interface {
|
|
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64 | ~string | ~bool | time.Time
|
|
}
|
|
|
|
// Decoder provides default decoders for primitive datatypes
|
|
func Decoder[T defaultDecoderType](value *T, decode DecodeFunc) error {
|
|
return decode(value)
|
|
}
|