RISE to Bloome Software
Log In    
Home
RISE
Collapse RISERISE
Overview
Product feature list
Expand RISE Visual ModelingRISE Visual Modeling
How to get started
Expand Information ModelingInformation Modeling
Expand Interface ModelingInterface Modeling
Collapse Code generatorsCode generators
Expand Application DevelopmentApplication Development
Expand CustomizationCustomization
Philosophy of RISE
Expand User CommunityUser Community
Marshal
Download
 
 
r2bsoftware.se r2bsoftware.se
 
 
 
Click to hide navigation tree

MySQL code generator

The MySQL code generator for RISE generates a native MySQL script. The script incrementally updates the tables, columns, indexes and constraints in the database to match the RISE model. Once the database model is updated, the views defined in the RISE model are created, or replaced, in the database and possible default data, entered in the model, is inserted. If you are new to RISE, please read more in the RISE Resource Center and if you haven't done so yet, download RISE it's Free!
 

All database objects handled by the script are named in accordance with the selected RISE model naming convention. The default convention supports having multiple models in the same MySQL schema. 

¨
RISE attribute types are mapped to columns according to:
Identifier BIGINT/INT¹ NOT NULL AUTO_INCREMENT
Int BIGINT/INT¹
String(n) VARCHAR(n)
Bool TINYINT(1)
DateTime DATETIME
Float FLOAT
Blob LONGBLOB
Text TEXT
Decimal(p,s)DECIMAL(p,s)
¹ It's a model property whether to use 64- or 32-bit integers.

Notes on compliance

There are some issues and discrepancies related to MySQL and the RISE MySQL code generator.
  1. MySQL (currently) accepts column constraints only to ignore them in run-time. This means that when using MySQL all constraints must be implemented in your code.
  2. MySQL DATETIME columns doesn't accept TIMESTAMP default values. You can't assign NOW(), CURRENT_TIMESTAMP or something similar as a default value. Constants are ok, though. The work-around is to generate code with the code generator property IgnoreColumnDefaults set to TRUE and, instead, allow the application code generator, or otherwise your own code, to apply the defaults value when inserting a row.
  3. The generated script is intended for the MySQL Command Line Client and, of course, the RISE Editor. Thus, it introduces commands, such as DELIMITER, that may need to be removed in other scripting environments. 

Code generator settings

You may change the settings prior to generating code. It's also possible to store the settings as your default settings. The default settings are automatically used when generating code inside the RISE Editor or from a command-line

The MySQL code generator has the following properties:
IgnoreColumnDefaults If this flag is set (TRUE) column default values will not be part of the script. See compliance section above for further details.
OmitCarriageReturn If set the code generator will use <lf> instead of Windows style <cr><lf> at end of lines.