types

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Numeric = NumericFormatter{}
	Time    = TimeFormatter{}
)
View Source
var WithBuiltinPlugin = true

Functions

func Format

func Format(v any) (any, error)

Types

type NumericFormatter

type NumericFormatter struct{}

func (NumericFormatter) Format

func (NumericFormatter) Format(num pgtype.Numeric) (any, error)

Format coerces `pgtype.Numeric` to int or double depending on the exponent. Returns error when value is invalid.

type TimeFormatter

type TimeFormatter struct{}

func (TimeFormatter) Format

func (n TimeFormatter) Format(t time.Time) (any, error)

Format returns: * string format of Time when connectorn is not builtin * time type in UTC when connector is builtin

Jump to

Keyboard shortcuts

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