typeutil

package
v0.0.0-rc17 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64ToNumeric

func Base64ToNumeric(based64buf string, scale int) (string, error)

func BitParametersExtractor

func BitParametersExtractor(colSchema *abstract.ColSchema, _, _ bool, _ map[string]string) (string, string, map[string]interface{})

func BufToChangeItemsBits

func BufToChangeItemsBits(in []byte) string

func ChangeItemsBitsToDebeziumHonest

func ChangeItemsBitsToDebeziumHonest(bits string) string

func DateToInt32

func DateToInt32(v time.Time) int32

func DatetimeToMicrosecs

func DatetimeToMicrosecs(vv time.Time) int64

func DatetimeToSecs

func DatetimeToSecs(vv time.Time) int64

func DecimalGetPrecisionAndScale

func DecimalGetPrecisionAndScale(dataTypeVerbose string) (bool, int, int, error)

func DecimalToDebezium

func DecimalToDebezium(decimal, decimalWithoutProvider string, connectorParameters map[string]string) (interface{}, error)

func DecimalToDebeziumHandlingModePrecise

func DecimalToDebeziumHandlingModePrecise(decimal, decimalWithoutProvider string) (interface{}, error)

func DecimalToDebeziumPrimitives

func DecimalToDebeziumPrimitives(decimal string, connectorParameters map[string]string) (interface{}, error)

func DecimalToDebeziumPrimitivesImpl

func DecimalToDebeziumPrimitivesImpl(decimal string) (string, int, error)

func EmitPostgresInterval

func EmitPostgresInterval(val int64) string

func ExponentialFloatFormToNumeric

func ExponentialFloatFormToNumeric(in string) (string, error)

func ExtractParameter

func ExtractParameter(originalType string) (int, error)

func ExtractPostgresIntervalArray

func ExtractPostgresIntervalArray(interval string) ([]string, error)

func FieldDescrDecimal

func FieldDescrDecimal(precision, scale int) (string, string, map[string]interface{})

func FormatTime

func FormatTime(inputTime time.Time, precision int) string

func GetBitLength

func GetBitLength(pgType string) (string, error)

func GetTimeDivider

func GetTimeDivider(originalTypeWithoutProvider string) (int, error)

func GetTimePrecision

func GetTimePrecision(colTypeStr string) int

func IsPgNumeric

func IsPgNumeric(originalType string) bool

func LSNToFileAndPos

func LSNToFileAndPos(lsn uint64) (string, uint64)

func MakeFractionSecondSuffix

func MakeFractionSecondSuffix(fraction int64, precision int) string

func MysqlDecimalFieldDescr

func MysqlDecimalFieldDescr(colSchema *abstract.ColSchema, _, _ bool, connectorParameters map[string]string) (string, string, map[string]interface{})

func MysqlDecimalFloatToValue

func MysqlDecimalFloatToValue(val float64, colType string) (string, error)

func MysqlFitBinaryLength

func MysqlFitBinaryLength(colType string, colVal interface{}) (interface{}, error)

MysqlFitBinaryLength - used for types: "mysql:binary", "mysql:varbinary", "mysql:longblob", "mysql:mediumblob", "mysql:blob", "mysql:tinyblob"

func NumRangeFromDebezium

func NumRangeFromDebezium(in string) (string, error)

func NumRangeToDebezium

func NumRangeToDebezium(in string) (string, error)

func NumericToExponentialFloatForm

func NumericToExponentialFloatForm(in string) (string, error)

func OriginalTypeWithoutProvider

func OriginalTypeWithoutProvider(originalType string) string

func ParseBytea

func ParseBytea(colVal interface{}, binaryHandlingMode string) (interface{}, error)

func ParseMysqlBit

func ParseMysqlBit(colVal interface{}, _ string) (interface{}, error)

func ParsePgDateTimeWithTimezone

func ParsePgDateTimeWithTimezone(in string) (time.Time, error)

func ParsePgDateTimeWithTimezone2

func ParsePgDateTimeWithTimezone2(l, r string) (time.Time, time.Time, error)

func ParsePostgresInterval

func ParsePostgresInterval(interval, intervalHandlingMode string) (interface{}, error)

func ParseTimeWithoutTZ

func ParseTimeWithoutTZ(timeStr string) (time.Time, error)

func ParseTimestamp

func ParseTimestamp(timeStr string) (time.Time, error)

func PgTimeWithoutTimeZonePrecision

func PgTimeWithoutTimeZonePrecision(originalType string) int

func PointToDebezium

func PointToDebezium(in string) (map[string]interface{}, error)

func ReverseBytesArr

func ReverseBytesArr(buf []byte) []byte

func ShrinkMysqlBit

func ShrinkMysqlBit(colVal interface{}, colType string) ([]uint8, error)

func SprintfDebeziumTime

func SprintfDebeziumTime(in time.Time) string

func TSRangeUnquote

func TSRangeUnquote(colStr string) (string, error)

func TimeFromDate

func TimeFromDate(in int64) time.Time

func TimeFromDatetime

func TimeFromDatetime(in int64) time.Time

func TimeFromTimestamp

func TimeFromTimestamp(in int64) time.Time

func TimePgWithoutTZParamsToKafkaType

func TimePgWithoutTZParamsToKafkaType(colSchema *abstract.ColSchema, intoArr, _ bool, _ map[string]string) (string, string, map[string]interface{})

func TimestampMysqlParamsTypeToKafkaType

func TimestampMysqlParamsTypeToKafkaType(colSchema *abstract.ColSchema, intoArr, _ bool, _ map[string]string) (string, string, map[string]interface{})

func TimestampPgParamsTypeToKafkaType

func TimestampPgParamsTypeToKafkaType(colSchema *abstract.ColSchema, intoArr, _ bool, _ map[string]string) (string, string, map[string]interface{})

func TstZRangeQuote

func TstZRangeQuote(colStr string) (string, error)

func TstZRangeUnquote

func TstZRangeUnquote(colStr string) (string, error)

func UnescapeUnicode

func UnescapeUnicode(in string) string

func UnknownTypeToString

func UnknownTypeToString(in interface{}) (string, error)

func UnquoteIfQuoted

func UnquoteIfQuoted(in string) string

func UnwrapMysqlEnumsAndSets

func UnwrapMysqlEnumsAndSets(in string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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