From a5f24411433aeb61ad015129354a664820affab0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 12 Dec 2012 11:26:44 +0200 Subject: Add support for SQL name transformations --- odb/options.cli | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 102 insertions(+), 10 deletions(-) (limited to 'odb/options.cli') diff --git a/odb/options.cli b/odb/options.cli index d756494..5b67708 100644 --- a/odb/options.cli +++ b/odb/options.cli @@ -229,16 +229,6 @@ class options \cb{--schema-name} option." }; - database_map --table-prefix - { - "", - "Add to table and index names. The prefix is added to both - names that were specified with the \cb{db table} pragma and those - that were automatically derived from class names. If you require a - separator, such as an underscore, between the prefix and the name, - then you should include it into the prefix value." - }; - // Export control. // database_map --export-symbol @@ -529,6 +519,108 @@ class options option)." }; + // SQL names. + // + database_map --table-prefix + { + "", + "Add to table names and, for databases that have global index + and/or foreign key names, to those names as well. The prefix is added to + both names that were specified with the \cb{db table} and \cb{db index} + pragmas and those that were automatically derived from class and data + member names. If you require a separator, such as an underscore, + between the prefix and the name, then you should include it into the + prefix value." + }; + + database_map --index-suffix + { + "", + "Use instead of the default \cb{_i} to construct index names. + The suffix is only added to names that were automatically derived from + data member names. If you require a separator, such as an underscore, + between the name and the suffix, then you should include it into the + suffix value." + }; + + database_map --fkey-suffix + { + "", + "Use instead of the default \cb{_fk} to construct foreign key + names. If you require a separator, such as an underscore, between the + name and the suffix, then you should include it into the suffix value." + }; + + database_map --sequence-suffix + { + "", + "Use instead of the default \cb{_seq} to construct sequence + names. If you require a separator, such as an underscore, between the + name and the suffix, then you should include it into the suffix value." + }; + + database_map --sql-name-case + { + "", + "Convert all automatically-derived SQL names to upper or lower case. + Valid values for this option are \cb{upper} and \cb{lower}." + }; + + database_map > --table-regex + { + "", + "Add to the list of regular expressions that is used to + transform automatically-derived table names. See the SQL NAME + TRANSFORMATIONS section below for details." + }; + + database_map > --column-regex + { + "", + "Add to the list of regular expressions that is used to + transform automatically-derived column names. See the SQL NAME + TRANSFORMATIONS section below for details." + }; + + database_map > --index-regex + { + "", + "Add to the list of regular expressions that is used to + transform automatically-derived index names. See the SQL NAME + TRANSFORMATIONS section below for details." + }; + + database_map > --fkey-regex + { + "", + "Add to the list of regular expressions that is used to + transform automatically-derived foreign key names. See the SQL NAME + TRANSFORMATIONS section below for details." + }; + + database_map > --sequence-regex + { + "", + "Add to the list of regular expressions that is used to + transform automatically-derived sequence names. See the SQL NAME + TRANSFORMATIONS section below for details." + }; + + database_map > --sql-name-regex + { + "", + "Add to the list of regular expressions that is used to + transform all automatically-derived SQL names. See the SQL NAME + TRANSFORMATIONS section below for details." + }; + + bool --sql-name-regex-trace + { + "Trace the process of applying regular expressions specified with the + SQL name \cb{--*-regex} options. Use this option to find out why your + regular expressions don't do what you expected them to do." + }; + // Accessor/modifier options. // std::vector --accessor-regex -- cgit v1.1