Skip to content

Commit

Permalink
Added -notablecomments option (note that some of these comitted files…
Browse files Browse the repository at this point in the history
… might not have changes...CVS probs)
  • Loading branch information
johncurrier committed Oct 4, 2006
1 parent 4eb4ff8 commit 96ea578
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
30 changes: 29 additions & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,46 @@ <h3><a name="Running_SchemaSpy">Running SchemaSpy </a></h3>
<td class="param"><code>-nohtml</code></td>
<td class="param">Only generate files needed for insertion/deletion of data (e.g. for scripts)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="param"><code>-desc "Schema description"</code></td>
<td class="param">Displays the specified textual description on summary pages.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="param"><code>-i tableNamesRegex</code></td>
<td class="param">Only include matching tables/views.
This is a regular expression that's used to determine which
tables/views to include. <br>For example: <code>-i -i "(.*book.*)|(library.*)"</code>
includes only those tables/views with 'book' in their names or that start with 'library'.<br>
You might want to use -desc with this option to describe the subset of tables.
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="param"><code>-x columnNamesRegex</code></td>
<td class="param">Exclude matching columns from relationship analysis to
simplify the generated graphs.
This is a regular expression that's used to determine which
columns to exclude. It must match table name, followed by a dot, followed by
column name.<br>For example: <code>-x "(book.isbn)|(borrower.address)"</code><br/>
column name.<br/>For example: <code>-x "(book.isbn)|(borrower.address)"</code><br/>
Note that each column name regular expression must be surround by <code>()</code>'s and
separated from other column names by a <code>|</code>.
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="param"><code>-ahic</code></td>
<td class="param"><em>A</em>llow <em>H</em>TML <em>I</em>n <em>C</em>omments.<br/>
Any HTML embedded in comments normally gets encoded so that it's rendered as text.
This option allows it to be rendered as HTML.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="param"><code>-cid</code></td>
<td class="param"><em>C</em>omments <em>I</em>nitially <em>D</em>isplayed.<br/>
Column comments are normally hidden by default. This option displays them by default.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="param"><code>-noimplied</code></td>
Expand Down
9 changes: 7 additions & 2 deletions dist/releaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ <h3><a href='http://schemaspy.sourceforge.net'>SchemaSpy</a> Release Notes</h3>
on the non-detail pages. Thanks to Amihay Gonen for the suggestion.
<br>Implementation of <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1479956&group_id=137197&atid=737990">
feature request 1479956</a>.</li>
<li>Resolution of <a href="">
<li>Added -notablecomments option for databases like MySQL that stuff unrelated data where comments belong.
<br>Implementation of <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1570467&group_id=137197&atid=737990">
feature request 1570467</a>.</li>
<li>Resolution of <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1484462&group_id=137197&atid=737987">
bug 1484462</a> - SchemaSpy_3.0.0 and Oracle 10g problems.
<br>Now ignores tables associated with Oracle's recycle bin.</li>
<li>Resolution of <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1530945&group_id=137197&atid=737987">
Expand All @@ -38,7 +41,9 @@ <h3><a href='http://schemaspy.sourceforge.net'>SchemaSpy</a> Release Notes</h3>
<li>Resolution of <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1530965&group_id=137197&atid=737987">
bug 1530965</a> - columns.html table output issues with DB2.</li>
<li>Resolution of <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1487385&group_id=137197&atid=737987">
bug 1487385</a> - XML file is not a valid UTF8.</li>
bug 1487385</a> - XML file is not valid UTF8.</li>
<li>Resolution of an OutOfMemoryError on Linux while trying to determine insertion order with
recursive constraints. Thanks to Remke Rutgers for his solution.
</ul>
</li>

Expand Down
4 changes: 3 additions & 1 deletion src/net/sourceforge/schemaspy/view/HtmlFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@

public class HtmlFormatter {
protected final boolean encodeComments;
protected final boolean displayTableComments;

protected HtmlFormatter() {
encodeComments = Boolean.getBoolean("encodeComments");
displayTableComments = Boolean.getBoolean("displayTableComments");
}

protected void writeHeader(Database db, Table table, String text, boolean showOrphans, LineWriter out) throws IOException {
Expand Down Expand Up @@ -42,7 +44,7 @@ protected void writeHeader(Database db, Table table, String text, boolean showOr
out.write("</span>");
if (table == null && db.getDescription() != null)
out.write("<span class='description'>" + db.getDescription() + "</span>");
String comments = table != null ? table.getComments() : null;
String comments = displayTableComments && table != null ? table.getComments() : null;
if (comments != null) {
out.write("<div style='padding: 0px 4px;'>");
if (encodeComments)
Expand Down
11 changes: 4 additions & 7 deletions src/net/sourceforge/schemaspy/view/HtmlMainIndexPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,8 @@ private void writeHeader(Database db, int numberOfTables, int numberOfViews, boo
}
html.writeln(":</b>");
html.writeln("<TABLE class='dataTable' border='1' rules='groups'>");
html.writeln("<colgroup>");
html.writeln("<colgroup>");
html.writeln("<colgroup>");
html.writeln("<colgroup>");
html.writeln("<colgroup>");
if (showIds)
int numGroups = 4 + (showIds ? 1 : 0) + (displayTableComments ? 1 : 0);
for (int i = 0; i < numGroups; ++i)
html.writeln("<colgroup>");
html.writeln("<thead align='left'>");
html.writeln("<tr>");
Expand All @@ -107,7 +103,8 @@ private void writeHeader(Database db, int numberOfTables, int numberOfViews, boo
html.writeln(" <th align='right' valign='bottom'>Children</th>");
html.writeln(" <th align='right' valign='bottom'>Parents</th>");
html.writeln(" <th align='right' valign='bottom'>Rows</th>");
html.writeln(" <th align='left' valign='bottom'>Comments</th>");
if (displayTableComments)
html.writeln(" <th align='left' valign='bottom'>Comments</th>");
html.writeln("</tr>");
html.writeln("</thead>");
html.writeln("<tbody>");
Expand Down

0 comments on commit 96ea578

Please sign in to comment.