convert

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: PostgreSQL Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Transpiler rewrite.Engine

Functions

func NotImplemented added in v1.0.0

func NotImplemented(src catalog.Catalog, tgt annotater)

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

Custom converter is called *before* generic conversion.

func Rule added in v1.0.0

func Rule(path string) rule

Rule returns a converter configured by TOML

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 TargetIdentifier added in v1.0.0

func TargetIdentifier(path ...string) string

TargetIdentifier returns converted object identifier

Avoids [Identifier] log message. Faster than [Identifier] on object path. Requires object to be converted.

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