Documentation ¶
Index ¶
- func EnumFromName[E EnumType](n string) E
- func EnumFromNullName[E EnumType](v sql.NullString) E
- func EnumFromNullValue[E EnumType](v sql.NullInt32) E
- func EnumFromValue[E EnumType](v int32) E
- func EnumNamePrefix[E EnumType](e E) string
- func EnumToName[E EnumType](e E) string
- func EnumToNullName[E EnumType](e E) sql.NullString
- func EnumToNullValue[E EnumType](e E) sql.NullInt32
- func EnumToValue[E EnumType](e E) int32
- func FromNullBool(v sql.NullBool) *wrapperspb.BoolValue
- func FromNullFloat64(v sql.NullFloat64) *wrapperspb.DoubleValue
- func FromNullInt32(v sql.NullInt32) *wrapperspb.Int32Value
- func FromNullInt64(v sql.NullInt64) *wrapperspb.Int64Value
- func FromNullString(v sql.NullString) *wrapperspb.StringValue
- func FromNullTime(v sql.NullTime) *timestamppb.Timestamp
- func FromNullTimestamp(v sql.NullTime) *timestamppb.Timestamp
- func FromNullType[V interface{}, T interface{}](valid bool, value V, parse func(V) *T) *T
- func ToNullBool(v *wrapperspb.BoolValue) sql.NullBool
- func ToNullFloat64(v *wrapperspb.DoubleValue) sql.NullFloat64
- func ToNullInt32(v *wrapperspb.Int32Value) sql.NullInt32
- func ToNullInt64(v *wrapperspb.Int64Value) sql.NullInt64
- func ToNullString(v *wrapperspb.StringValue) sql.NullString
- func ToNullTime(v *timestamppb.Timestamp) sql.NullTime
- func ToNullTimestamp(v *timestamppb.Timestamp) sql.NullTime
- type EnumType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnumFromName ¶
func EnumFromNullName ¶
func EnumFromNullName[E EnumType](v sql.NullString) E
func EnumFromNullValue ¶
func EnumFromValue ¶
func EnumNamePrefix ¶
func EnumToName ¶
func EnumToNullName ¶
func EnumToNullName[E EnumType](e E) sql.NullString
func EnumToNullValue ¶
func EnumToValue ¶
func FromNullBool ¶
func FromNullBool(v sql.NullBool) *wrapperspb.BoolValue
func FromNullFloat64 ¶
func FromNullFloat64(v sql.NullFloat64) *wrapperspb.DoubleValue
func FromNullInt32 ¶
func FromNullInt32(v sql.NullInt32) *wrapperspb.Int32Value
func FromNullInt64 ¶
func FromNullInt64(v sql.NullInt64) *wrapperspb.Int64Value
func FromNullString ¶
func FromNullString(v sql.NullString) *wrapperspb.StringValue
func FromNullTime ¶
func FromNullTime(v sql.NullTime) *timestamppb.Timestamp
func FromNullTimestamp ¶
func FromNullTimestamp(v sql.NullTime) *timestamppb.Timestamp
func FromNullType ¶
func FromNullType[V interface{}, T interface{}](valid bool, value V, parse func(V) *T) *T
func ToNullBool ¶
func ToNullBool(v *wrapperspb.BoolValue) sql.NullBool
func ToNullFloat64 ¶
func ToNullFloat64(v *wrapperspb.DoubleValue) sql.NullFloat64
func ToNullInt32 ¶
func ToNullInt32(v *wrapperspb.Int32Value) sql.NullInt32
func ToNullInt64 ¶
func ToNullInt64(v *wrapperspb.Int64Value) sql.NullInt64
func ToNullString ¶
func ToNullString(v *wrapperspb.StringValue) sql.NullString
func ToNullTime ¶
func ToNullTime(v *timestamppb.Timestamp) sql.NullTime
func ToNullTimestamp ¶
func ToNullTimestamp(v *timestamppb.Timestamp) sql.NullTime
Types ¶
type EnumType ¶
type EnumType interface { ~int32 Type() protoreflect.EnumType String() string Number() protoreflect.EnumNumber }
Click to show internal directories.
Click to hide internal directories.