column_value_convertor

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToTimestamp

func ConvertToTimestamp(columnValue any, formats ...TimeFormat) (*time.Time, error)

Types

type DefaultColumnValueConvertor

type DefaultColumnValueConvertor struct {
	// contains filtered or unexported fields
}

func NewDefaultTypeConvertor

func NewDefaultTypeConvertor(clientMeta *schema.ClientMeta, validStringBlackSlice []string) *DefaultColumnValueConvertor

func (*DefaultColumnValueConvertor) Convert

func (x *DefaultColumnValueConvertor) Convert(table *schema.Table, column *schema.Column, columnValue any) (newColumnValue any, diagnostics *schema.Diagnostics)

type TimeFormat

type TimeFormat struct {
	Formatter      string
	TimeFormatType TimeFormatType
}

type TimeFormatType

type TimeFormatType int
const (
	TimeFormatNoTimezone TimeFormatType = iota
	TimeFormatNamedTimezone
	TimeFormatNumericTimezone
	TimeFormatNumericAndNamedTimezone
	TimeFormatTimeOnly
)

Jump to

Keyboard shortcuts

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