types

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bool       = "bool"
	Boolean    = "boolean"
	Str        = "str"
	Int        = "int"
	Float      = "float"
	Decimal    = "decimal.Decimal"
	Memoryview = "memoryview"
	Any        = "typing.Any"
)

Python type names emitted into generated code. Bool and Boolean double as SQL type spellings in the conversion tables.

View Source
const (
	InformationSchema = "information_schema"
	PgCatalog         = "pg_catalog"
)

SQL system schemas whose objects are never rendered as models or enums.

Variables

This section is empty.

Functions

func MysqlTypeToPython added in v0.9.0

func MysqlTypeToPython(req *plugin.GenerateRequest, config *config.Config, pluginColumn *plugin.Column) string

func PostgresTypeToPython

func PostgresTypeToPython(req *plugin.GenerateRequest, config *config.Config, pluginColumn *plugin.Column) string

func SqliteTypeToPython

func SqliteTypeToPython(_ *plugin.GenerateRequest, _ *config.Config, pluginColumn *plugin.Column) string

Types

type TypeConversionFunc

type TypeConversionFunc func(*plugin.GenerateRequest, *config.Config, *plugin.Column) string

TypeConversionFunc maps one column to its Python type annotation. It receives the whole column, not just the type identifier: MySQL needs Column.Length to tell tinyint(1) (bool) from tinyint (int).

func GetTypeConversionFunc added in v0.5.0

func GetTypeConversionFunc(engine string) (TypeConversionFunc, error)

Jump to

Keyboard shortcuts

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