Skip to content
Snippets Groups Projects
Commit 735b05ab authored by Lukáš Paukert's avatar Lukáš Paukert
Browse files

Clean up

parent b11ba78d
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,6 @@ set(SOURCES
src/database/Database.cpp src/database/Database.h
src/database/Document.cpp src/database/Document.h
src/enum/EInvertedIndex.h
src/exceptions/Exceptions.h
src/ui/Page.cpp src/ui/Page.h
src/util/ArgumentParser.cpp src/util/ArgumentParser.h
src/util/InvertedIndexJSONParser.cpp src/util/InvertedIndexJSONParser.h
......
......@@ -6,7 +6,6 @@
 
#include "Computor.h"
#include "../enum/EInvertedIndex.h"
#include "../exceptions/Exceptions.h"
 
using namespace std;
 
......
#include "InvertedIndex.h"
 
#include "../enum/EInvertedIndex.h"
#include "../exceptions/Exceptions.h"
 
using namespace std;
 
......
......@@ -6,7 +6,7 @@ Database::Database(const string &path)
: db(path) {}
 
vector<Document> Database::getDocumentsCollection() {
SQLite::Statement query(db, "SELECT id, filename FROM Document");
SQLite::Statement query(db, "SELECT id, filename FROM Document ORDER BY filename ASC");
 
vector<Document> result;
 
......
#ifndef QUERYING_EXCEPTIONS_H
#define QUERYING_EXCEPTIONS_H
#include <exception>
#include <string>
/**
* An exception that is thrown when the end of an inverted index list is reached (list is exhausted)
*/
class EndOfIndexException : public std::exception {
};
/**
* An exception that is thrown when a document ID cannot be found
*/
class IDNotFoundException : public std::exception {
};
#endif //QUERYING_EXCEPTIONS_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment