MySQL generator

The MySQL code generator is a plug-out directly written in C++.

The generated sources follows the definition made in BOUML at the artifact / class / relation / attribute levels.

When the code generation is applied on a artifact associated to several tables, the code generation is made for all these tables, more the possible definition of the database. Nevertheless the the MySQL code generator produce first the code in memory and update the appropriate files only when it is necessary, to not change the last write date of the files for nothing. Depending on the toggle verbose code generation of the global menu Languages the code generator is verbose or not.

The MySQL code generator plug-out may be called on :

When the MySQL code generator is ask through the Tools menu, it is applied on the project, then on all the artifacts.

The name of the generated files depend on the artifact name, the extension depend on the language and is fixed for each by the generations settings (see below), the directory where the files are generated may be set in each package containing directly or indirectly the artifact (see generation directory).

artifact

The MySQL definition of a artifact is set through the Php source tabs of the artifact dialog.

The MySQL code generation is only done when the stereotype of the artifact is database

The generated file name is the artifact's name with the extension specified in the MySQL of the generations settings :



In BOUML the generated code is obtained by the substitution of macros in a text, the macros known by the Php code generator are :

Class

The MySQL definition of a class produce a table, it is set through the Uml, and MySQL tabs of the class dialog.

In BOUML the generated code is obtained by the substitution of macros in a text, the macros known by the Php code generator are :

Attribute

The MySQL definition of an attribute is set through the Uml and MySQL tabs of the attribute dialog.

An attribute may be a column or a non foreign key.

Column

In BOUML the generated code is obtained by the substitution of macros in a text, the macros known by the MySQL code generator are :

Key

In BOUML the generated code is obtained by the substitution of macros in a text, the macros known by the MySQL code generator are :

Relation

The MySQL definition of a relation is set through the Uml and MySQL tabs of the relation dialog. A relation represents a foreign key.

In BOUML the generated code is obtained by the substitution of macros in a text, the macros known by the MySQL code generator are :

Previous : Idl generator

Next : MySQL reverse