Skip to content

Commit

Permalink
Replaced hard-coded quotes with db metadata quote char
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Mar 30, 2007
1 parent b16672b commit 44c5e7c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/net/sourceforge/schemaspy/model/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ private void initColumnAutoUpdate(Database db, boolean forceQuotes) throws SQLEx
sql.append('.');
}

if (forceQuotes)
sql.append("\"" + getName() + "\"");
else
if (forceQuotes) {
String quote = db.getMetaData().getIdentifierQuoteString().trim();
sql.append(quote + getName() + quote);
} else
sql.append(db.getQuotedIdentifier(getName()));

sql.append(" where 0 = 1");
Expand Down Expand Up @@ -597,9 +598,10 @@ protected int fetchNumRows(Database db, String clause, boolean forceQuotes) thro
sql.append('.');
}

if (forceQuotes)
sql.append("\"" + getName() + "\"");
else
if (forceQuotes) {
String quote = db.getMetaData().getIdentifierQuoteString().trim();
sql.append(quote + getName() + quote);
} else
sql.append(db.getQuotedIdentifier(getName()));

try {
Expand Down

0 comments on commit 44c5e7c

Please sign in to comment.