Documentation
¶
Overview ¶
Package assist makes the starting XML from the database schema, as the XML assistants of the Java plug-in do (SdmUtils.get_crud_sdm_xml, create_crud_xml_jaxb_dao_class, add_fk_access), with the defaults of their dialog: no schema, views included, English plural to singular for DTO class names, FK access, classes already in use skipped; <crud> is the short one, without inner elements (the "crud-auto" choice of the dialog: default method names). Method and parameter names follow the language: lower camel case for Go, snake_case for Python, as is for C++.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DaoClassName ¶
DaoClassName: the title-cased table name, plural kept, and "Dao": tasks -> TasksDao.
func DaoClasses ¶
func DaoClasses(cat meta.Catalog, model string, mode cg.FieldNamesMode, dtoInUse, daoInUse map[string]bool) (string, error)
DaoClasses returns a <dao-class> for each table and view: its <crud>, then <query-dto-list> FK access, the DTO classes with the model as in DtoClasses. Skipped are the tables whose DTO class has a <crud> already (dtoInUse, names without the model) and those whose DAO class name is taken (daoInUse). mode is the naming of the FK access: cg.LowerCamelCase (Go, getTasksByGroup(gID)), cg.SnakeCase (Python, get_tasks_by_group(g_id)), cg.AsIs (C++, getTasksByGroup(g_id)).
func DtoClassName ¶
DtoClassName is table_name_to_dto_class_name: the title-cased table name, with the last word made singular if singular.
func DtoClasses ¶
DtoClasses returns a <dto-class> for each table and view, except the classes of inUse (names without the model: Task, not sqlx-Task). model is the class model of the names: "" for database/sql, "sqlx" or "gorm" (sqlx-Task).
Types ¶
This section is empty.