Documentation ¶
Overview ¶
Package lysgen contains experimental functions to generate code from Postgres database tables.
Index ¶
- func GetGoDataTypeFromPg(pgType string) (goType string, err error)
- func GetTsDataTypeFromPg(pgType string) (tsType string, err error)
- func InputModel(ctx context.Context, db *pgxpool.Pool, schema, table string, ...) (res string, err error)
- func TsDefinition(ctx context.Context, db *pgxpool.Pool, schema, table string) (res string, err error)
- func View(ctx context.Context, db *pgxpool.Pool, schema, table string) (res string, err error)
- func WriteToClipboard(s string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGoDataTypeFromPg ¶
GetGoDataTypeFromPg returns a Go data type from a PostgreSQL data type
func GetTsDataTypeFromPg ¶ added in v0.1.29
GetTsDataTypeFromPg returns a Typescript data type from a PostgreSQL data type
func InputModel ¶
func InputModel(ctx context.Context, db *pgxpool.Pool, schema, table string, withValidation bool) (res string, err error)
InputModel generates the store Input and Model structs from the supplied db table only handles 1 level of join, and does not coalesce nulls
func TsDefinition ¶ added in v0.1.29
func TsDefinition(ctx context.Context, db *pgxpool.Pool, schema, table string) (res string, err error)
TsDefinition generates the TS type definition from the supplied db table only handles 1 level of join
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.