sqlpb_v1

package
v0.0.0-...-fc562fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnumFromName

func EnumFromName[E EnumType](n string) E

func EnumFromNullName

func EnumFromNullName[E EnumType](v sql.NullString) E

func EnumFromNullValue

func EnumFromNullValue[E EnumType](v sql.NullInt32) E

func EnumFromValue

func EnumFromValue[E EnumType](v int32) E

func EnumNamePrefix

func EnumNamePrefix[E EnumType](e E) string

func EnumToName

func EnumToName[E EnumType](e E) string

func EnumToNullName

func EnumToNullName[E EnumType](e E) sql.NullString

func EnumToNullValue

func EnumToNullValue[E EnumType](e E) sql.NullInt32

func EnumToValue

func EnumToValue[E EnumType](e E) int32

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL