Documentation
¶
Index ¶
- func BoolToPgtype(b bool) pgtype.Bool
- func Float64ToPgtype(f float64) pgtype.Float8
- func FromBoolPointer(b *bool) bool
- func FromFloat64Pointer(f *float64) float64
- func FromInt64Pointer(i *int64) int64
- func FromIntPointer(i *int) int
- func FromStringPointer(s *string) string
- func Int32ToPgtype(i int32) pgtype.Int4
- func Int64ToPgtype(i int64) pgtype.Int8
- func Int64ToStringPointer(i int64) *string
- func PgtypeTimestamptzToTime(t pgtype.Timestamptz) time.Time
- func PgtypeTimestamptzToTimeOrNull(t pgtype.Timestamptz) *time.Time
- func PgtypeToBool(b pgtype.Bool) bool
- func PgtypeToFloat64(f pgtype.Float8) float64
- func PgtypeToInt32(i pgtype.Int4) int32
- func PgtypeToInt64(i pgtype.Int8) int64
- func PgtypeToString(t pgtype.Text) string
- func PgtypeToStringOrNull(t pgtype.Text) *string
- func PgtypeToTime(t pgtype.Timestamp) time.Time
- func PgtypeToTimeOrNull(t pgtype.Timestamp) *time.Time
- func PgtypeToUUID(id pgtype.UUID) uuid.UUID
- func StringToBool(s string) bool
- func StringToFloat32(s string) float32
- func StringToFloat64(s string) float64
- func StringToInt32(s string) int32
- func StringToInt64(s string) int64
- func StringToPgtype(s string) pgtype.Text
- func StringToPgtypeOrNull(s *string) pgtype.Text
- func StringToTime(s, layout string) time.Time
- func StringToUint32(s string) uint32
- func StringToUint64(s string) uint64
- func TimeToPgtype(t time.Time) pgtype.Timestamp
- func TimeToPgtypeOrNull(t *time.Time) pgtype.Timestamp
- func TimeToPgtypeTimestamptz(t time.Time) pgtype.Timestamptz
- func TimeToPgtypeTimestamptzOrNull(t *time.Time) pgtype.Timestamptz
- func ToBoolPointer(b bool) *bool
- func ToFloat64Pointer(f float64) *float64
- func ToInt64Pointer(i int64) *int64
- func ToIntPointer(i int) *int
- func ToStringPointer(s string) *string
- func UUIDToPgtype(id uuid.UUID) pgtype.UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float64ToPgtype ¶
Float64ToPgtype converts float64 to pgtype.Float8
func FromBoolPointer ¶
FromBoolPointer converts *bool to bool, returns default value if nil
func FromFloat64Pointer ¶
FromFloat64Pointer converts *float64 to float64, returns default value if nil
func FromInt64Pointer ¶
FromInt64Pointer converts *int64 to int64, returns default value if nil
func FromIntPointer ¶
FromIntPointer converts *int to int, returns default value if nil
func FromStringPointer ¶
FromStringPointer converts *string to string, returns default value if nil
func Int32ToPgtype ¶
Int32ToPgtype converts int32 to pgtype.Int4
func Int64ToPgtype ¶
Int64ToPgtype converts int64 to pgtype.Int8
func Int64ToStringPointer ¶
Int64ToStringPointer converts an int64 to *string
func PgtypeTimestamptzToTime ¶
func PgtypeTimestamptzToTime(t pgtype.Timestamptz) time.Time
PgtypeTimestamptzToTime converts pgtype.Timestamptz to time.Time
func PgtypeTimestamptzToTimeOrNull ¶
func PgtypeTimestamptzToTimeOrNull(t pgtype.Timestamptz) *time.Time
PgtypeTimestamptzToTimeOrNull converts pgtype.Timestamptz to *time.Time, handling null values
func PgtypeToFloat64 ¶
PgtypeToFloat64 converts pgtype.Float8 to float64
func PgtypeToInt32 ¶
PgtypeToInt32 converts pgtype.Int4 to int32
func PgtypeToInt64 ¶
PgtypeToInt64 converts pgtype.Int8 to int64
func PgtypeToString ¶
PgtypeToString converts pgtype.Text to string
func PgtypeToStringOrNull ¶
PgtypeToStringOrNull converts pgtype.Text to *string, handling null values.
func PgtypeToTime ¶
PgtypeToTime converts pgtype.Timestamp to time.Time
func PgtypeToTimeOrNull ¶
PgtypeToTimeOrNull converts pgtype.Timestamp to *time.Time, handling null values.
func PgtypeToUUID ¶
PgtypeToUUID converts pgtype.UUID to uuid.UUID
func StringToBool ¶
StringToBool converts a string to a bool, returning false on error
func StringToFloat32 ¶
StringToFloat32 converts a string to float32, returning 0.0 on error
func StringToFloat64 ¶
StringToFloat64 converts a string to float64, returning 0.0 on error
func StringToInt32 ¶
StringToInt32 converts a string to int32, returning 0 on error
func StringToInt64 ¶
StringToInt64 converts a string to int64, returning 0 on error
func StringToPgtype ¶
StringToPgtype converts string to pgtype.Text
func StringToPgtypeOrNull ¶
StringToPgtypeOrNull converts a *string to pgtype.Text, handling null values.
func StringToTime ¶
StringToTime converts a string to time.Time, returning time.Time{} on error
func StringToUint32 ¶
StringToUint32 converts a string to uint32, returning 0 on error
func StringToUint64 ¶
StringToUint64 converts a string to uint64, returning 0 on error
func TimeToPgtype ¶
TimeToPgtype converts time.Time to pgtype.Timestamp
func TimeToPgtypeOrNull ¶
TimeToPgtypeOrNull converts a *time.Time to pgtype.Timestamp, handling null values.
func TimeToPgtypeTimestamptz ¶
func TimeToPgtypeTimestamptz(t time.Time) pgtype.Timestamptz
TimeToPgtypeTimestamptz converts time.Time to pgtype.Timestamptz
func TimeToPgtypeTimestamptzOrNull ¶
func TimeToPgtypeTimestamptzOrNull(t *time.Time) pgtype.Timestamptz
TimeToPgtypeTimestamptzOrNull converts *time.Time to pgtype.Timestamptz, handling null values
func ToFloat64Pointer ¶
ToFloat64Pointer converts a float64 to *float64
func ToInt64Pointer ¶
ToInt64Pointer converts an int64 to *int64
func ToStringPointer ¶
ToStringPointer converts a string to *string
Types ¶
This section is empty.