mxhdev / SQLChecker

GNU General Public License v3.0
1 stars 1 forks source link

Comments cause Exceptions #16

Closed timoei closed 8 years ago

timoei commented 8 years ago

It seems like DBFit can't deal with the comment tags '-- ' and '#'. The use of these comment tags before and within a SQL-Statement causes a Exception.

Possible Solutions:

mxhdev commented 8 years ago

Another possible Solution:

A tuple is a header tuple iff its tag indicates that it is a header token. This is true iff the tag equals some predefined header tag.

For each mapping tuple m_i = (tag,sql) {
    c = getComments(sql)
    // strip the comments
    sql = sql.replace(c, ""); 
    // Store the comments in a separate field
    m_i = (tag, sql, c)
   // pass only the comments along
    DuplicateChecker.setComments(c)
}
timoei commented 8 years ago

Solved by commit 8e272ef17d16cb090e7d1a512ad2ab23b4c144ef