Documentation
¶
Overview ¶
Package lysgen contains experimental functions to generate code from Postgres database tables.
Index ¶
- func GetGoDataTypeFromPg(pgType string) (goType string, err error)
- func InputModel(ctx context.Context, db *pgxpool.Pool, schema, table string) (res string, stmt string, err error)
- func View(ctx context.Context, db *pgxpool.Pool, schema, table string) (res string, stmt 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 InputModel ¶
func InputModel(ctx context.Context, db *pgxpool.Pool, schema, table string) (res string, stmt 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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.