MySQL Forums
Forum List  »  MySQL Workbench

Re: Template Cutomization
Posted by: Mike Lischke
Date: February 03, 2009 05:07AM

Hey Thomas,

there is no formal documentation yet on what variables are defined. However, I checked with our documentation team, so that entire stuff gets properly documented. That'll take some time, though, so below is a list of variables we support in the DBDoc templates. The actual documentation will likely be a bit different, but for now this list must do it. In order to understand this it is necessary to know that we use a tool to extract these constants from our templates, hence they are separated by files in this list. However in the actual report generator we fill a large structure with all the info we need for the most comprehensive report we have right now (the HTML detailed frames report) where it does not matter in which template a certain variable occurs. The full structure is always applied to all templates so you can use the variable names in any template you like, but only those. If a variable does not appear in a template then no data for it is inserted in the generated report.

// details_list.html.tpl
const char * const kdl_TITLE = "TITLE";
const char * const kdl_STYLE_NAME = "STYLE_NAME";
const char * const kdl_SCHEMATA = "SCHEMATA";
const char * const kdl_SCHEMA_ID = "SCHEMA_ID";
const char * const kdl_SCHEMA_NAME = "SCHEMA_NAME";
const char * const kdl_COLUMN_COUNT = "COLUMN_COUNT";
const char * const kdl_COLUMNS = "COLUMNS";
const char * const kdl_COLUMN_ID = "COLUMN_ID";
const char * const kdl_TABLE_NAME = "TABLE_NAME";
const char * const kdl_COLUMN_NAME = "COLUMN_NAME";
const char * const kdl_INDICES_COUNT = "INDICES_COUNT";
const char * const kdl_INDICES = "INDICES";
const char * const kdl_INDEX_ID = "INDEX_ID";
const char * const kdl_INDEX_NAME = "INDEX_NAME";
const char * const kdl_FOREIGN_KEYS_COUNT = "FOREIGN_KEYS_COUNT";
const char * const kdl_FOREIGN_KEYS = "FOREIGN_KEYS";
const char * const kdl_FOREIGN_KEY_ID = "FOREIGN_KEY_ID";
const char * const kdl_REL_NAME = "REL_NAME";

// table_details.html.tpl
const char * const ktd_TITLE = "TITLE";
const char * const ktd_STYLE_NAME = "STYLE_NAME";
const char * const ktd_SCHEMATA = "SCHEMATA";
const char * const ktd_SCHEMA_ID = "SCHEMA_ID";
const char * const ktd_SCHEMA_NAME = "SCHEMA_NAME";
const char * const ktd_SCHEMA_COUNT = "SCHEMA_COUNT";
const char * const ktd_DDL_LISTING = "DDL_LISTING";
const char * const ktd_DDL_SCRIPT = "DDL_SCRIPT";
const char * const ktd_TABLES = "TABLES";
const char * const ktd_TABLE_ID = "TABLE_ID";
const char * const ktd_TABLE_NAME = "TABLE_NAME";
const char * const ktd_TABLE_COUNT = "TABLE_COUNT";
const char * const ktd_COLUMNS_LISTING = "COLUMNS_LISTING";
const char * const ktd_COLUMNS = "COLUMNS";
const char * const ktd_COLUMN_KEY = "COLUMN_KEY";
const char * const ktd_COLUMN_NAME = "COLUMN_NAME";
const char * const ktd_COLUMN_DATATYPE = "COLUMN_DATATYPE";
const char * const ktd_COLUMN_NOTNULL = "COLUMN_NOTNULL";
const char * const ktd_COLUMN_DEFAULTVALUE = "COLUMN_DEFAULTVALUE";
const char * const ktd_COLUMN_COMMENT = "COLUMN_COMMENT";
const char * const ktd_INDICES_LISTING = "INDICES_LISTING";
const char * const ktd_INDICES = "INDICES";
const char * const ktd_INDEX_NAME = "INDEX_NAME";
const char * const ktd_INDICES_COLUMNS = "INDICES_COLUMNS";
const char * const ktd_INDEX_COLUMN_NAME = "INDEX_COLUMN_NAME";
const char * const ktd_INDEX_COLUMN_ORDER = "INDEX_COLUMN_ORDER";
const char * const ktd_INDEX_COLUMN_COMMENT = "INDEX_COLUMN_COMMENT";
const char * const ktd_INDEX_PRIMARY = "INDEX_PRIMARY";
const char * const ktd_INDEX_UNIQUE = "INDEX_UNIQUE";
const char * const ktd_INDEX_TYPE = "INDEX_TYPE";
const char * const ktd_INDEX_KIND = "INDEX_KIND";
const char * const ktd_INDEX_COMMENT = "INDEX_COMMENT";
const char * const ktd_REL_LISTING = "REL_LISTING";
const char * const ktd_REL = "REL";
const char * const ktd_REL_NAME = "REL_NAME";
const char * const ktd_REL_TYPE = "REL_TYPE";
const char * const ktd_REL_PARENTTABLE = "REL_PARENTTABLE";
const char * const ktd_REL_CHILDTABLE = "REL_CHILDTABLE";
const char * const ktd_REL_CARD = "REL_CARD";
const char * const ktd_TABLE_COMMENT_LISTING = "TABLE_COMMENT_LISTING";
const char * const ktd_TABLE_COMMENT = "TABLE_COMMENT";

// overview.html.tpl
const char * const ko_TITLE = "TITLE";
const char * const ko_STYLE_NAME = "STYLE_NAME";
const char * const ko_PROJECT_TITLE = "PROJECT_TITLE";
const char * const ko_PROJECT_NAME = "PROJECT_NAME";
const char * const ko_PROJECT_AUTHOR = "PROJECT_AUTHOR";
const char * const ko_PROJECT_VERSION = "PROJECT_VERSION";
const char * const ko_PROJECT_DESCRIPTION = "PROJECT_DESCRIPTION";
const char * const ko_PROJECT_CREATED = "PROJECT_CREATED";
const char * const ko_PROJECT_CHANGED = "PROJECT_CHANGED";
const char * const ko_SCHEMA_COUNT = "SCHEMA_COUNT";
const char * const ko_TOTAL_TABLE_COUNT = "TOTAL_TABLE_COUNT";
const char * const ko_TOTAL_COLUMN_COUNT = "TOTAL_COLUMN_COUNT";
const char * const ko_TOTAL_INDEX_COUNT = "TOTAL_INDEX_COUNT";
const char * const ko_TOTAL_FK_COUNT = "TOTAL_FK_COUNT";
const char * const ko_GENERATED = "GENERATED";

// full_list.html.tpl
const char * const kfl_STYLE_NAME = "STYLE_NAME";
const char * const kfl_SCHEMATA = "SCHEMATA";
const char * const kfl_COLUMNS = "COLUMNS";
const char * const kfl_SCHEMA_ID = "SCHEMA_ID";
const char * const kfl_COLUMN_ID = "COLUMN_ID";
const char * const kfl_COLUMN_NAME = "COLUMN_NAME";
const char * const kfl_SCHEMA_NAME = "SCHEMA_NAME";
const char * const kfl_TABLE_NAME = "TABLE_NAME";
const char * const kfl_COLUMN_KEY_PART = "COLUMN_KEY_PART";
const char * const kfl_COLUMN_NULLABLE = "COLUMN_NULLABLE";
const char * const kfl_COLUMN_DEFAULTVALUE = "COLUMN_DEFAULTVALUE";
const char * const kfl_COLUMN_AUTO_INC = "COLUMN_AUTO_INC";
const char * const kfl_COLUMN_CHARSET = "COLUMN_CHARSET";
const char * const kfl_COLUMN_COLLATION = "COLUMN_COLLATION";
const char * const kfl_COLUMN_COMMENT = "COLUMN_COMMENT";
const char * const kfl_COLUMN_DATATYPE = "COLUMN_DATATYPE";
const char * const kfl_COLUMN_IS_USERTYPE = "COLUMN_IS_USERTYPE";
const char * const kfl_INDICES = "INDICES";
const char * const kfl_INDEX_ID = "INDEX_ID";
const char * const kfl_INDEX_NAME = "INDEX_NAME";
const char * const kfl_INDEX_PRIMARY = "INDEX_PRIMARY";
const char * const kfl_INDEX_UNIQUE = "INDEX_UNIQUE";
const char * const kfl_INDEX_TYPE = "INDEX_TYPE";
const char * const kfl_INDEX_KIND = "INDEX_KIND";
const char * const kfl_INDEX_KEY_BLOCK_SIZE = "INDEX_KEY_BLOCK_SIZE";
const char * const kfl_INDEX_COMMENT = "INDEX_COMMENT";
const char * const kfl_INDEX_COLUMNS = "INDEX_COLUMNS";
const char * const kfl_INDEX_COLUMN_NAME = "INDEX_COLUMN_NAME";
const char * const kfl_INDEX_COLUMN_ORDER = "INDEX_COLUMN_ORDER";
const char * const kfl_INDEX_COLUMN_COMMENT = "INDEX_COLUMN_COMMENT";
const char * const kfl_FOREIGN_KEYS = "FOREIGN_KEYS";
const char * const kfl_FOREIGN_KEY_ID = "FOREIGN_KEY_ID";
const char * const kfl_REL_NAME = "REL_NAME";
const char * const kfl_REL_PARENTTABLE = "REL_PARENTTABLE";
const char * const kfl_REL_CHILDTABLE = "REL_CHILDTABLE";
const char * const kfl_REL_CARD = "REL_CARD";
const char * const kfl_FK_DELETE_RULE = "FK_DELETE_RULE";
const char * const kfl_FK_UPDATE_RULE = "FK_UPDATE_RULE";
const char * const kfl_FK_MANDATORY = "FK_MANDATORY";

// overview_list.html.tpl
const char * const kol_TITLE = "TITLE";
const char * const kol_STYLE_NAME = "STYLE_NAME";
const char * const kol_SCHEMATA = "SCHEMATA";
const char * const kol_SCHEMA_ID = "SCHEMA_ID";
const char * const kol_SCHEMA_NAME = "SCHEMA_NAME";
const char * const kol_TABLE_COUNT = "TABLE_COUNT";
const char * const kol_TABLES = "TABLES";
const char * const kol_TABLE_ID = "TABLE_ID";
const char * const kol_TABLE_NAME = "TABLE_NAME";

Some of the template variable names are duplicated, as we (of course) use some of them in more than one file. For you only the template variable names are important, not the C constants.

HTH

Mike

Mike Lischke, MySQL Developer Tools
Oracle Corporation

MySQL Workbench on Github: https://github.com/mysql/mysql-workbench
On Twitter: https://twitter.com/MySQLWorkbench
On Slack: mysqlcommunity.slack.com (#workbench)
Report bugs to http://bugs.mysql.com
MySQL documentation can be found here: http://dev.mysql.com/doc/refman/8.0/en/



Edited 1 time(s). Last edit at 02/03/2009 05:09AM by Mike Lischke.

Options: ReplyQuote


Subject
Views
Written By
Posted
8295
October 01, 2008 05:22AM
3718
October 01, 2008 02:23PM
3711
October 02, 2008 09:32AM
3568
October 21, 2008 07:03AM
Re: Template Cutomization
3494
February 03, 2009 05:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.