forked from zealdocs/zeal
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better sorting of search results (zealdocs#613, zealdocs#100)
Uses an O(m+n) algorithm based on https://github.com/bevacqua/fuzzysearch - should be faster than the one initially proposed in PR zealdocs#281.
- Loading branch information
Showing
5 changed files
with
206 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef QSQLITELITE_H | ||
#define QSQLITELITE_H | ||
|
||
#include <QString> | ||
#include <QStringList> | ||
|
||
#include <sqlite3.h> | ||
|
||
class QSQLiteLite | ||
{ | ||
public: | ||
explicit QSQLiteLite(const QString &path); | ||
~QSQLiteLite(); | ||
bool isOpen(); | ||
QString lastError(); | ||
QStringList tables(); | ||
bool execute(const QString &queryStr); | ||
bool next(); | ||
void finalize(); | ||
QString stringValue(int index); | ||
sqlite3_int64 intValue(int index); | ||
sqlite3* handle(); | ||
|
||
private: | ||
void updateLastError(); | ||
QString m_lastError; | ||
sqlite3* m_db = nullptr; | ||
sqlite3_stmt *m_stmt = nullptr; | ||
}; | ||
|
||
#endif // QSQLITELITE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters