|
crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
#include "Exception.hpp"#include "Version.hpp"#include "../Data/Data.hpp"#include "../Helper/CommaLocale.hpp"#include "../Helper/Container.hpp"#include "../Helper/FileSystem.hpp"#include "../Helper/Json.hpp"#include "../Helper/Portability/locale.h"#include "../Helper/Portability/mysqlcppconn.h"#include "../Helper/Strings.hpp"#include "../Helper/Utf8.hpp"#include "../Helper/Versions.hpp"#include "../Struct/ConfigProperties.hpp"#include "../Struct/DatabaseSettings.hpp"#include "../Struct/QueryProperties.hpp"#include "../Struct/TableColumn.hpp"#include "../Struct/TableProperties.hpp"#include "../Struct/TargetTableProperties.hpp"#include "../Struct/ThreadDatabaseEntry.hpp"#include "../Struct/ThreadOptions.hpp"#include "../Struct/ThreadStatus.hpp"#include "../Struct/UrlListProperties.hpp"#include "../Struct/WebsiteProperties.hpp"#include "../Timer/Simple.hpp"#include "../Wrapper/DatabaseLock.hpp"#include "../Wrapper/DatabaseTryLock.hpp"#include "../Wrapper/PreparedSqlStatement.hpp"#include "../_extern/rapidjson/include/rapidjson/document.h"#include <cppconn/driver.h>#include <cppconn/exception.h>#include <cppconn/prepared_statement.h>#include <cppconn/resultset.h>#include <cppconn/statement.h>#include <mysql_connection.h>#include <algorithm>#include <cctype>#include <chrono>#include <cmath>#include <cstddef>#include <cstdint>#include <fstream>#include <functional>#include <iostream>#include <memory>#include <mutex>#include <queue>#include <sstream>#include <stdexcept>#include <string>#include <string_view>#include <thread>#include <tuple>#include <utility>#include <vector>

Go to the source code of this file.
Classes | |
| class | crawlservpp::Main::Database |
| Class handling database access for the command-and-control and its threads. More... | |
| class | crawlservpp::Main::Database::Transaction |
| Wrapper class for in-scope transactions. More... | |
| class | crawlservpp::Main::Database::Exception |
| Class for generic database exceptions. More... | |
| class | crawlservpp::Main::Database::ConnectionException |
| Class for database connection exceptions. More... | |
| class | crawlservpp::Main::Database::IncorrectPathException |
| Class for incorrect path exceptions. More... | |
| class | crawlservpp::Main::Database::StorageEngineException |
| Class for storage engine exceptions. More... | |
| class | crawlservpp::Main::Database::PrivilegesException |
| Class for insufficient privileges exceptions. More... | |
| class | crawlservpp::Main::Database::WrongArgumentsException |
| Class for wrong arguments exceptions. More... | |
Namespaces | |
| crawlservpp::Wrapper | |
| Namespace for RAII wrappers and Wrapper::Database. | |
| crawlservpp::Main | |
| Namespace for the main classes of the program. | |
Macros | |
| #define | MAIN_DATABASE_LOG_MOVING |
Constants | |
| constexpr auto | crawlservpp::Main::sqlDir {"sql"sv} |
(Sub-)Directory for .sql files. More... | |
| constexpr auto | crawlservpp::Main::sqlExtension {".sql"sv} |
File extension for .sql files. More... | |
| constexpr auto | crawlservpp::Main::lockTimeOutSec {300} |
| Time-out on table lock in seconds. More... | |
| constexpr auto | crawlservpp::Main::reconnectAfterIdleMs {600000} |
| Idle time in milliseconds after which a re-connect to the database will be enforced. More... | |
| constexpr auto | crawlservpp::Main::sleepOnLockMs {250} |
| Sleep time in milliseconds before re-attempting to add a database lock. More... | |
| constexpr auto | crawlservpp::Main::maxContentSize {1073741824} |
| Maximum size of database content in bytes (= 1 GiB). More... | |
| constexpr auto | crawlservpp::Main::maxContentSizeString {"1 GiB"sv} |
| Maximum size of database content as string. More... | |
| constexpr auto | crawlservpp::Main::wwwPrefix {"www."sv} |
| "www." prefix to be ignored when checking for a domain. More... | |
| constexpr auto | crawlservpp::Main::numUrlListTables {6} |
| The minimum number of tables per URL list. More... | |
| constexpr auto | crawlservpp::Main::sqlConstraint {"CONSTRAINT "sv} |
| The MySQL keyword for a constraint, including the trailing space. More... | |
| constexpr auto | crawlservpp::Main::secToMs {1000} |
| The factor for converting seconds to milliseconds and vice versa. More... | |
| constexpr auto | crawlservpp::Main::sleepOnDeadLockMs {250} |
| Time (in ms) to sleep on SQL deadlock. More... | |
| constexpr auto | crawlservpp::Main::maxColumnsUrlList {6} |
| Maximum number of columns in all associated tables associated with an URL list. More... | |
| constexpr auto | crawlservpp::Main::numArgsAddUrl {4} |
| Number fo arguments needed for adding one URL. More... | |
Constants for MySQL Queries | |
| constexpr auto | crawlservpp::Main::nAtOnce10 {10} |
| Ten at once. More... | |
| constexpr auto | crawlservpp::Main::nAtOnce100 {100} |
| One hundred at once. More... | |
| constexpr auto | crawlservpp::Main::nAtOnce500 {500} |
| Five hundred at once. More... | |
| constexpr auto | crawlservpp::Main::sqlArg1 {1} |
| First argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg2 {2} |
| Second argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg3 {3} |
| Third argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg4 {4} |
| Fourth argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg5 {5} |
| Fifth argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg6 {6} |
| Sixth argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg7 {7} |
| Seventh argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg8 {8} |
| Eighth argument. More... | |
| constexpr auto | crawlservpp::Main::sqlArg9 {9} |
| Ninth argument. More... | |
Constants for Other MySQL Errors | |
| constexpr auto | crawlservpp::Main::sqlStorageEngineError {1030} |
| Storage engine error. More... | |
| constexpr auto | crawlservpp::Main::sqlInsufficientPrivileges {1045} |
| Insufficient privileges. More... | |
| constexpr auto | crawlservpp::Main::sqlWrongArguments {1210} |
| Wrong arguments. More... | |
| constexpr auto | crawlservpp::Main::sqlIncorrectPath {1525} |
| Incorrect path. More... | |
| #define MAIN_DATABASE_LOG_MOVING |