convert

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: PostgreSQL Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SourceMap map[string]string = make(map[string]string)

SourceMap tracks path to source object

View Source
var Transpiler rewrite.Engine

Functions

func Default added in v0.24.0

func Default(path, expr string) string

Default transpile or convert default expression

func Identifier

func Identifier(path, name string) string

func Object added in v0.24.0

func Object[T any](o T) T

Object converts db object for PostgreSQL

func RegisterDataTypes added in v0.25.0

func RegisterDataTypes(m map[string]string) error

RegisterDataTypes validates and save a data type mapping

Map keys are source types, values are target types. Returns one or more validation errors.

func RegisterObjectConverter added in v0.24.0

func RegisterObjectConverter[T any](fn ObjectConverterFunc[T])

RegisterObjectConverter associates convert function to DBObject type

func Schemas added in v0.24.0

func Schemas(srcSchemas []catalog.Schema) []catalog.Schema

Schemas converts Schemas for PostgreSQL

func Sequences added in v0.25.0

func Sequences(seqs []catalog.Sequence) []catalog.Sequence

Sequences converts Sequences for PostgreSQL

Simply apply renaming.

func Tables added in v0.24.0

func Tables(srcTables []catalog.Table) []catalog.Table

Tables converts Tables for PostgreSQL

Applies custom converter before applying renaming and type conversion.

func Type

func Type(path string, src catalog.DataType) catalog.DataType

Type converts a datatype for PostgreSQL

Types

type ObjectConverterFunc added in v0.24.0

type ObjectConverterFunc[T any] func(o T) T

Jump to

Keyboard shortcuts

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