Add unit test for regex parsing comments in SQL query (#826)

This commit is contained in:
Vlad
2016-10-14 14:23:27 +03:00
committed by Martin Kleusberg
parent 1592b7d2c3
commit c25119ed4e
5 changed files with 129 additions and 1 deletions

View File

@@ -11,6 +11,11 @@ namespace sqlb { class ForeignKeyClause; }
class SqliteTableModel : public QAbstractTableModel
{
Q_OBJECT
#ifdef REGEX_UNIT_TEST
friend class TestRegex;
#endif
public:
explicit SqliteTableModel(QObject *parent = 0, DBBrowserDB* db = 0, size_t chunkSize = 50000, const QString& encoding = QString());
void reset();
@@ -62,6 +67,7 @@ private:
void clearCache();
void buildQuery();
void removeCommentsFromQuery(QString& query);
QStringList getColumns(const QString& sQuery, QVector<int>& fieldsTypes);
int getQueryRowCount();