Documentation
¶
Index ¶
- Constants
- func MysqlTypeToPython(req *plugin.GenerateRequest, config *config.Config, ...) string
- func PostgresTypeToPython(req *plugin.GenerateRequest, config *config.Config, ...) string
- func SqliteTypeToPython(_ *plugin.GenerateRequest, _ *config.Config, pluginColumn *plugin.Column) string
- type TypeConversionFunc
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 PostgresTypeToPython ¶
func SqliteTypeToPython ¶
Types ¶
type TypeConversionFunc ¶
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)
Click to show internal directories.
Click to hide internal directories.