|
crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
Class providing database functionality for analyzer threads by implementing Wrapper::Database. More...
#include <Database.hpp>


Classes | |
| class | Exception |
| Class for analyzer-specific database exceptions. More... | |
Construction | |
| Database (Module::Database &dbThread) | |
| Constructor setting the database connection for the thread. More... | |
Analyzer-specific Setters | |
| void | setTargetTable (const std::string &table) |
| Sets the name of the target table. More... | |
| void | setTargetFields (const std::vector< StringString > &fields) |
| Sets the fields of the target table and their types. More... | |
| void | setCorpusSlicing (std::uint8_t percentageOfMaxAllowedPackageSize) |
| Sets the size of corpus chunks, in percentage of the maximum package size allowed by the MySQL server. More... | |
| void | setIsRunningCallback (const IsRunningCallback &isRunningCallback) |
| Sets the callback function for checking whether the thread is still running. More... | |
Target Table Initialization and Update | |
| void | initTargetTable (bool isCompressed, bool isDelete) |
| Creates the target table, or adds the field columns, if they do not exist already. More... | |
| void | updateTargetTable () |
| Updates the target table. More... | |
| std::string | getTargetTableUpdated () |
| Gets the date/time when the target table has been updated last. More... | |
Additional Tables | |
| std::size_t | addAdditionalTable (const std::string &name, const std::vector< StringString > &fields, bool isCompressed, bool isDelete) |
| Creates an additional table, or adds its field columns, if they do not exist already. More... | |
| const std::string & | getAdditionalTableName (std::size_t id) const |
| Gets the full name of an additional table. More... | |
| void | updateAdditionalTable (std::size_t id) |
| Updates an additional table. More... | |
Prepared SQL Statements | |
| void | prepare () |
| Prepares the SQL statements for the analyzer. More... | |
Text Corpus | |
| bool | getCorpus (const CorpusProperties &corpusProperties, const std::string &filterDateFrom, const std::string &filterDateTo, Data::Corpus &corpusTo, std::size_t &sourcesTo, StatusSetter &statusSetter) |
| Gets the text corpus after creating it if it is out-of-date or does not yet exist. More... | |
| std::string | getCorporaLastUpdated () const |
| Gets the last update date/time over the sources of all corpora. More... | |
Analyzer-specific Helpers | |
| std::string | getSourceTableName (std::uint16_t type, const std::string &name) const |
| Public helper function getting the full name of a source table. More... | |
| void | checkSources (std::vector< std::uint8_t > &types, std::vector< std::string > &tables, std::vector< std::string > &columns) |
| Public helper function checking the given data sources. More... | |
| static std::string | getSourceColumnName (std::uint16_t type, const std::string &name) |
| Public helper function getting the full name of a source column. More... | |
Analyzer Properties | |
| std::string | tablePrefix |
| The prefix used for tables in the MySQL database. More... | |
| std::string | targetTableName |
| The name of the target table to be written to. More... | |
| std::uint64_t | targetTableId {} |
| The ID of the target table to be written to. More... | |
| std::string | targetTableFull |
| The full name of the target table to be written to, including prefixes. More... | |
| std::vector< StringString > | targetFields |
| The names and types of the target fields, i.e. the columns in the target table to be written to. More... | |
| std::uint8_t | corpusSlicing {defaultCorpusSlicing} |
| The maximum size of the text corpus chunks, in percentage of the maximum package size allowed by the MySQL server. More... | |
| std::unordered_map< std::size_t, std::string > | additionalTables |
| The IDs and full names of additional tables to write data to. More... | |
Setters | |
| void | setLogging (std::uint8_t level, std::uint8_t min, std::uint8_t verbose) |
| Sets the current, minimal, and verbose logging levels. More... | |
| void | setSleepOnError (std::uint64_t seconds) |
| Sets the number of seconds to sleep before trying to reconnect after connection loss. More... | |
| void | setTimeOut (std::uint64_t milliseconds) |
| Sets the maximum execution time for MySQL queries, in milliseconds. More... | |
Logging | |
| void | log (std::uint8_t level, const std::string &logEntry) |
| Writes a thread-specific log entry to the database. More... | |
| void | log (std::uint8_t level, std::queue< std::string > &logEntries) |
| Writes multiple thread-specific log entries to the database. More... | |
Websites | |
| std::string | getWebsiteDomain (std::uint64_t websiteId) |
| Gets the domain of a website from the database. More... | |
Queries | |
| void | getQueryProperties (std::uint64_t queryId, QueryProperties &queryPropertiesTo) |
| Gets the properties of a query from the database. More... | |
Configurations | |
| std::string | getConfiguration (std::uint64_t configId) |
| Gets a configuration from the database. More... | |
Target Tables | |
| std::uint64_t | addOrUpdateTargetTable (const TargetTableProperties &properties) |
| Adds a new target table or updates an existing target table in the database. More... | |
| std::queue< IdString > | getTargetTables (const std::string &type, std::uint64_t listId) |
| Gets the target tables of the specified type for a URL list from the database. More... | |
| std::uint64_t | getTargetTableId (const std::string &type, std::uint64_t listId, const std::string &tableName) |
| Gets the ID of a target table from the database. More... | |
| std::string | getTargetTableName (const std::string &type, std::uint64_t tableId) |
| Gets the name of a target table from the database. More... | |
| void | addTargetColumn (const std::string &tableName, const TableColumn &column) |
| Adds a column to the target table, if it does not exist already. More... | |
| void | deleteTargetTable (const std::string &type, std::uint64_t tableId) |
| Deletes a target table from the database. More... | |
Locking | |
| void | beginNoLock () |
| Disables database locking by starting a new SQL transaction. More... | |
| void | endNoLock () |
| Re-enables database locking by ending the previous SQL transaction. More... | |
Tables | |
| bool | isTableEmpty (const std::string &tableName) |
| Checks whether a table in the database is empty. More... | |
| bool | isTableExists (const std::string &tableName) |
| Checks whether a table exists in the database. More... | |
| bool | isColumnExists (const std::string &tableName, const std::string &columnName) |
| Checks whether a table in the database contains a specific column. More... | |
| std::string | getColumnType (const std::string &tableName, const std::string &columnName) |
| Gets the type of a specific table column from the database. More... | |
Custom Data | |
| void | getCustomData (Data::GetValue &data) |
| Gets a custom value from one column from a table row in the database. More... | |
| void | getCustomData (Data::GetFields &data) |
| Gets custom values from multiple columns of the same type from a table row. More... | |
| void | getCustomData (Data::GetFieldsMixed &data) |
| Gets custom values from multiple columns of different types from a table row. More... | |
| void | getCustomData (Data::GetColumn &data) |
| Gets custom values from a table column in the database. More... | |
| void | getCustomData (Data::GetColumns &data) |
| Gets custom values from multiple table columns of the same type. More... | |
| void | getCustomData (Data::GetColumnsMixed &data) |
| Gets custom values from multiple table columns of different types. More... | |
| void | insertCustomData (const Data::InsertValue &data) |
| Inserts a custom value into a table row in the database. More... | |
| void | insertCustomData (const Data::InsertFields &data) |
| Inserts custom values into multiple table columns of the same type. More... | |
| void | insertCustomData (const Data::InsertFieldsMixed &data) |
| Inserts custom values into multiple table columns of different types. More... | |
| void | updateCustomData (const Data::UpdateValue &data) |
| Updates a custom value in a table row. More... | |
| void | updateCustomData (const Data::UpdateFields &data) |
| Updates custom values in multiple table columns of the same type. More... | |
| void | updateCustomData (const Data::UpdateFieldsMixed &data) |
| Updates custom values in multiple table columns of different types. More... | |
Request Counter | |
| static std::uint64_t | getRequestCounter () |
| Gets the number of SQL requests performed since the start of the application. More... | |
Database Connection | |
| Module::Database & | database |
| Reference to the database connection for the thread. More... | |
Getters | |
| const ModuleOptions & | getOptions () const |
| Gets the options of the module. More... | |
| const std::string & | getWebsiteIdString () const |
| Gets the ID of the website used by the thread as string. More... | |
| const std::string & | getUrlListIdString () const |
| Gets the ID of the URL list used by the thread as string. More... | |
| std::uint8_t | getLoggingMin () const |
| Gets the minimal logging level. More... | |
| std::uint8_t | getLoggingVerbose () const |
| Gets the level for verbose logging. More... | |
| std::uint64_t | getMaxAllowedPacketSize () const |
| Gets the maximum allowed packet size for communicating with the MySQL server. More... | |
Validation | |
| void | checkConnection () |
| Checks whether the connection to the database is still valid and tries to reconnect if necessary. More... | |
Helper Functions for Prepared SQL Statements | |
| void | reserveForPreparedStatements (std::size_t n) |
| Reserves memory for a specific number of additional prepared SQL statements. More... | |
| void | addPreparedStatement (const std::string &sqlQuery, std::size_t &id) |
| Prepares an additional SQL statement and sets its ID. More... | |
| void | clearPreparedStatement (std::size_t &id) |
| Clears a prepared SQL statement. More... | |
| sql::PreparedStatement & | getPreparedStatement (std::size_t id) |
| Gets a reference to a prepared SQL statement. More... | |
Database Helper Functions | |
| std::uint64_t | getLastInsertedId () |
| Gets the last inserted ID from the database. More... | |
| void | createTable (const TableProperties &properties) |
| Adds a table to the database. More... | |
| void | addColumn (const std::string &tableName, const TableColumn &column) |
| Adds a column to a table in the database. More... | |
| void | dropTable (const std::string &tableName) |
| Deletes a table from the database. More... | |
| void | compressTable (const std::string &tableName) |
| Compresses a table in the database. More... | |
| static void | addDatabaseLock (const std::string &name, const IsRunningCallback &isRunningCallback) |
| Adds a lock to the database class, blocking execution. More... | |
| static bool | tryDatabaseLock (const std::string &name) |
| Tries to add a lock to the database class, not blocking execution. More... | |
| static void | removeDatabaseLock (const std::string &name) |
| Removes a lock from the database class. More... | |
URL List Helper Function | |
| void | setUrlListCaseSensitive (std::uint64_t listId, bool isCaseSensitive) |
| Sets whether the specified URL list is case-sensitive. More... | |
Exception Helper Function | |
| static void | sqlException (const std::string &function, const sql::SQLException &e) |
| Catches a SQL exception and re-throws it as a specific or a generic Database::Exception. More... | |
Helper Functions for Executing SQL Queries | |
| static bool | sqlExecute (sql::PreparedStatement &sqlPreparedStatement) |
| Executes a prepared SQL statement. More... | |
| static sql::ResultSet * | sqlExecuteQuery (sql::PreparedStatement &sqlPreparedStatement) |
| Executes a prepared SQL statement and returns the resulting set. More... | |
| static int | sqlExecuteUpdate (sql::PreparedStatement &sqlPreparedStatement) |
| Executes a prepared SQL statement and returns the number of affected rows. More... | |
Class providing database functionality for analyzer threads by implementing Wrapper::Database.
|
explicit |
Constructor setting the database connection for the thread.
| dbThread | Reference to the database connection used by the analyzer thread. |
| std::size_t crawlservpp::Module::Analyzer::Database::addAdditionalTable | ( | const std::string & | name, |
| const std::vector< StringString > & | fields, | ||
| bool | isCompressed, | ||
| bool | isDelete | ||
| ) |
Creates an additional table, or adds its field columns, if they do not exist already.
| name | The name of the additional table. |
| fields | Constant reference to a vector of pairs of string containing both the names and the SQL data types of the fields in the target table. |
| isCompressed | Set whether to compress the data in the table. |
| isDelete | Set whether to delete a previously existing table. |
| Analyzer::Database::Exception | if no website or URL list has been previously specified, the name of the additional table is empty, no target fields have been specified, or the data type for a target field is missing. |
References additionalTables, crawlservpp::Wrapper::Database::addOrUpdateTargetTable(), crawlservpp::Struct::TargetTableProperties::columns, crawlservpp::Wrapper::Database::dropTable(), crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Wrapper::Database::getOptions(), crawlservpp::Wrapper::Database::log(), crawlservpp::Struct::ModuleOptions::urlListNamespace, and crawlservpp::Struct::ModuleOptions::websiteNamespace.
Referenced by crawlservpp::Module::Analyzer::Algo::AllTokens::resetAlgo(), and crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo().
|
inlineprotectedinherited |
Adds a column to a table in the database.
| tableName | Constant reference to a string containing the name of the table to which the column will be added. |
| column | Constant reference to a structure containing the properties of the column to be added to the table. |
| Main::Database::Exception | if no table, column, or column type has been specified, i.e. if one of the strings containing the name of the table, the name of the column, and the type of the column is empty, or if a column reference is incomplete. |
| Main::Database::Exception | if a MySQL error occured while adding the column to the given table in the database. |
References crawlservpp::Main::Database::addColumn(), and crawlservpp::Wrapper::Database::database.
Referenced by crawlservpp::Wrapper::Database::addTargetColumn().
|
inlinestaticprotectedinherited |
Adds a lock to the database class, blocking execution.
If a lock with the same name already exists, the function will block execution until this lock has been released, or the specified callback function returns false.
| name | Constant reference to a string containing the name of the lock to be waited for and added to the database class. |
| isRunningCallback | Constant reference to a function that will be regularly called during a block, to enquire whether the thread (or application) is still running. As soon as this function returns false, execution will no longer be blocked, even if the lock could not be added. |
References crawlservpp::Main::Database::addDatabaseLock().
|
inlineinherited |
Adds a new target table or updates an existing target table in the database.
| properties | Constant reference to the properties of the new target table, or the existing target table to be updated. |
| Main::Database::Exception | if no type, website, URL list, name, or columns have been specfied in the given properties of the new target table, or if a column of the already existing target table cannot be overwritten due to incompatibilities between the respective data types. |
| Main::Database::Exception | if a MySQL error occured while adding the new target table, or updating the existing target table in the database. |
References crawlservpp::Main::Database::addOrUpdateTargetTable(), and crawlservpp::Wrapper::Database::database.
Referenced by addAdditionalTable(), crawlservpp::Module::Parser::Database::initTargetTable(), initTargetTable(), and crawlservpp::Module::Extractor::Database::initTargetTables().
|
inlineprotectedinherited |
Prepares an additional SQL statement and sets its ID.
If the current ID is not zero, the old prepared statement will be removed.
| sqlQuery | Constant reference to a string containing the SQL query for the prepared SQL statement. |
| id | Reference to the current ID or zero, which will be set to the new unique ID identifying the prepared SQL query in-class. |
| Main::Database::Exception | if a MySQL error occured while preparing and adding the SQL statement. |
| std::out_of_range | if id contains an neither zero nor a valid ID. |
References crawlservpp::Main::Database::addPreparedStatement(), and crawlservpp::Wrapper::Database::database.
Referenced by crawlservpp::Module::Crawler::Database::prepare(), crawlservpp::Module::Parser::Database::prepare(), crawlservpp::Module::Extractor::Database::prepare(), prepare(), crawlservpp::Module::Parser::Database::unLockUrlsIfOk(), and crawlservpp::Module::Extractor::Database::unLockUrlsIfOk().
|
inlineinherited |
Adds a column to the target table, if it does not exist already.
Does nothing if the column already exists.
| tableName | Constant reference to a string containing the name of the target table to which to add the specified column. |
| column | Constant reference to a structure containing the properties of the column to be added to the table. |
References crawlservpp::Wrapper::Database::addColumn(), crawlservpp::Wrapper::Database::isColumnExists(), and crawlservpp::Struct::TableColumn::name.
Referenced by crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo().
|
inlineinherited |
Disables database locking by starting a new SQL transaction.
| Main::Database::Exception | if a MySQL error occured while starting a new SQL transaction in the database. |
References crawlservpp::Main::Database::beginNoLock(), and crawlservpp::Wrapper::Database::database.
Referenced by crawlservpp::Module::Crawler::Database::getNumberOfUrls(), and crawlservpp::Module::Crawler::Database::getUrlPosition().
|
inlineprotectedinherited |
Checks whether the connection to the database is still valid and tries to reconnect if necessary.
| Main::Database::Exception | if the MySQL driver is not initialized. |
| Main::Database::Exception | if a MySQL error occured while attempting to reconnect to the database. |
References crawlservpp::Main::Database::checkConnection(), and crawlservpp::Wrapper::Database::database.
Referenced by crawlservpp::Module::Crawler::Database::addUrlIfNotExists(), crawlservpp::Module::Crawler::Database::addUrlsIfNotExist(), crawlservpp::Module::Extractor::Database::checkExtractingTable(), crawlservpp::Module::Parser::Database::checkParsingTable(), checkSources(), crawlservpp::Module::Parser::Database::fetchUrls(), crawlservpp::Module::Extractor::Database::fetchUrls(), crawlservpp::Module::Parser::Database::getAllContents(), crawlservpp::Module::Extractor::Database::getContent(), crawlservpp::Module::Parser::Database::getContentIdFromParsedId(), crawlservpp::Module::Parser::Database::getLatestContent(), crawlservpp::Module::Extractor::Database::getLatestParsedData(), crawlservpp::Module::Parser::Database::getLockTime(), crawlservpp::Module::Extractor::Database::getLockTime(), crawlservpp::Module::Crawler::Database::getNextUrl(), crawlservpp::Module::Parser::Database::getNumberOfContents(), crawlservpp::Module::Crawler::Database::getNumberOfUrls(), crawlservpp::Module::Parser::Database::getNumberOfUrls(), crawlservpp::Module::Extractor::Database::getNumberOfUrls(), getTargetTableUpdated(), crawlservpp::Module::Crawler::Database::getUrlId(), crawlservpp::Module::Crawler::Database::getUrlLockTime(), crawlservpp::Module::Parser::Database::getUrlLockTime(), crawlservpp::Module::Extractor::Database::getUrlLockTime(), crawlservpp::Module::Crawler::Database::getUrlPosition(), crawlservpp::Module::Parser::Database::getUrlPosition(), crawlservpp::Module::Extractor::Database::getUrlPosition(), crawlservpp::Module::Crawler::Database::isArchivedContentExists(), crawlservpp::Module::Crawler::Database::isUrlCrawled(), crawlservpp::Module::Crawler::Database::lockUrlIfOk(), crawlservpp::Module::Crawler::Database::prepare(), crawlservpp::Module::Parser::Database::prepare(), crawlservpp::Module::Extractor::Database::prepare(), prepare(), crawlservpp::Module::Parser::Database::renewUrlLockIfOk(), crawlservpp::Module::Extractor::Database::renewUrlLockIfOk(), crawlservpp::Module::Crawler::Database::saveArchivedContent(), crawlservpp::Module::Crawler::Database::saveContent(), crawlservpp::Module::Crawler::Database::setUrlFinishedIfOk(), crawlservpp::Module::Parser::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Extractor::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Crawler::Database::unLockUrlIfOk(), crawlservpp::Module::Parser::Database::unLockUrlIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlIfOk(), crawlservpp::Module::Parser::Database::unLockUrlsIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlsIfOk(), updateAdditionalTable(), crawlservpp::Module::Parser::Database::updateOrAddEntries(), crawlservpp::Module::Extractor::Database::updateOrAddEntries(), crawlservpp::Module::Extractor::Database::updateOrAddLinked(), crawlservpp::Module::Parser::Database::updateTargetTable(), updateTargetTable(), crawlservpp::Module::Extractor::Database::updateTargetTable(), crawlservpp::Module::Crawler::Database::urlDuplicationCheck(), crawlservpp::Module::Crawler::Database::urlEmptyCheck(), and crawlservpp::Module::Crawler::Database::urlHashCheck().
| void crawlservpp::Module::Analyzer::Database::checkSources | ( | std::vector< std::uint8_t > & | types, |
| std::vector< std::string > & | tables, | ||
| std::vector< std::string > & | columns | ||
| ) |
Public helper function checking the given data sources.
Removes all invalid sources.
The types, table names, and column names of the sources need to correspond to each other via the indices of their respective vectors.
| types | Constant reference to a vector containing the types of the sources to be checked. |
| tables | Constant reference to a vector of strings containing the names of the source tables to be checked. |
| columns | Constant reference to a vector of strings containing the names of the source columns to be checked. |
| Analyzer::Database::Exception | if no sources have been specified. |
References crawlservpp::Data::_string, crawlservpp::Helper::Container::append(), crawlservpp::Struct::StatusSetter::change(), crawlservpp::Wrapper::Database::checkConnection(), crawlservpp::Data::Corpus::clear(), crawlservpp::Module::Analyzer::column1, crawlservpp::Module::Analyzer::column2, crawlservpp::Module::Analyzer::column3, crawlservpp::Data::GetColumns::columns, crawlservpp::Data::Corpus::combineContinuous(), crawlservpp::Data::Corpus::combineTokenized(), crawlservpp::Data::Corpus::copyChunksContinuous(), crawlservpp::Data::Corpus::copyChunksTokenized(), corpusSlicing, crawlservpp::Module::Analyzer::corpusSlicingFactor, crawlservpp::Data::Corpus::create(), crawlservpp::Wrapper::Database::database, crawlservpp::Struct::CorpusProperties::dictionaries, crawlservpp::Helper::Container::eraseFirst(), crawlservpp::Struct::StatusSetter::finish(), crawlservpp::Helper::Memory::free(), crawlservpp::Helper::Memory::freeIf(), crawlservpp::Struct::CorpusProperties::freeMemoryEvery, crawlservpp::Module::Analyzer::generalInputSourcesAnalyzing, crawlservpp::Module::Analyzer::generalInputSourcesCrawling, crawlservpp::Module::Analyzer::generalInputSourcesExtracting, crawlservpp::Module::Analyzer::generalInputSourcesParsing, crawlservpp::Wrapper::Database::getCustomData(), crawlservpp::Wrapper::Database::getLastInsertedId(), crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Wrapper::Database::getMaxAllowedPacketSize(), crawlservpp::Wrapper::Database::getPreparedStatement(), getSourceColumnName(), getSourceTableName(), crawlservpp::Main::Database::isColumnExists(), crawlservpp::Struct::StatusSetter::isRunning(), crawlservpp::Main::Database::isTableExists(), crawlservpp::Data::Corpus::isTokenized(), crawlservpp::Struct::CorpusProperties::languages, crawlservpp::Helper::CommaLocale::locale(), crawlservpp::Wrapper::Database::log(), crawlservpp::Struct::CorpusProperties::manipulators, crawlservpp::Module::Analyzer::maxNumCorpusColumns, crawlservpp::Struct::CorpusProperties::models, crawlservpp::Module::Analyzer::numColumns1, crawlservpp::Module::Analyzer::numColumns2, crawlservpp::Data::GetColumns::order, crawlservpp::Helper::Json::parsePosLenPairsJson(), crawlservpp::Helper::Json::parseTextMapJson(), crawlservpp::Module::Analyzer::progressAddingCorpus, crawlservpp::Module::Analyzer::progressCreatedCorpus, crawlservpp::Module::Analyzer::progressDeletedCorpus, crawlservpp::Module::Analyzer::progressGeneratedSavePoint, crawlservpp::Module::Analyzer::progressMovedData, crawlservpp::Module::Analyzer::progressReceivedCorpus, crawlservpp::Module::Analyzer::progressReceivedSources, crawlservpp::Module::Analyzer::progressSavingSavePoint, crawlservpp::Module::Analyzer::progressSlicedCorpus, crawlservpp::Struct::CorpusProperties::savePoints, crawlservpp::Data::Corpus::size(), crawlservpp::Struct::CorpusProperties::sourceColumn, crawlservpp::Struct::CorpusProperties::sourceTable, crawlservpp::Struct::CorpusProperties::sourceType, crawlservpp::Module::Analyzer::sqlArg1, crawlservpp::Module::Analyzer::sqlArg10, crawlservpp::Module::Analyzer::sqlArg11, crawlservpp::Module::Analyzer::sqlArg12, crawlservpp::Module::Analyzer::sqlArg2, crawlservpp::Module::Analyzer::sqlArg3, crawlservpp::Module::Analyzer::sqlArg4, crawlservpp::Module::Analyzer::sqlArg5, crawlservpp::Module::Analyzer::sqlArg6, crawlservpp::Module::Analyzer::sqlArg7, crawlservpp::Module::Analyzer::sqlArg8, crawlservpp::Module::Analyzer::sqlArg9, crawlservpp::Wrapper::Database::sqlException(), crawlservpp::Wrapper::Database::sqlExecute(), crawlservpp::Wrapper::Database::sqlExecuteQuery(), crawlservpp::Helper::Json::stringify(), crawlservpp::Data::GetColumns::table, crawlservpp::Timer::Simple::tickStr(), crawlservpp::Data::Corpus::tokenize(), crawlservpp::Data::Corpus::tokenizeCustom(), crawlservpp::Data::GetColumns::type, crawlservpp::Struct::StatusSetter::update(), crawlservpp::Data::GetColumns::values, and crawlservpp::Main::Exception::view().
Referenced by crawlservpp::Module::Analyzer::Thread::checkCorpusSources().
|
inlineprotectedinherited |
Clears a prepared SQL statement.
| id | Reference to the current ID, which will be set to zero after the corresponding prepared SQL statement has been cleared. |
| Main::Database::Exception | if a MySQL error occured while clearing the prepared SQL statement. |
| std::out_of_range | if id contains zero or an invalid ID. |
References crawlservpp::Main::Database::clearPreparedStatement(), and crawlservpp::Wrapper::Database::database.
Referenced by crawlservpp::Module::Crawler::Database::prepare(), crawlservpp::Module::Extractor::Database::prepare(), crawlservpp::Module::Parser::Database::unLockUrlsIfOk(), and crawlservpp::Module::Extractor::Database::unLockUrlsIfOk().
|
inlineprotectedinherited |
Compresses a table in the database.
The function will have no effect om the table, if the table is already compressed.
| tableName | Constant reference to a string containing the name of the table to be compressed. |
| Main::Database::Exception | if no table is specified, i.e. if the string containing the name of the table is empty, or if a row format could not be determined. |
| Main::Database::Exception | if a MySQL error occured while compressing the table in the database. |
References crawlservpp::Main::Database::compressTable(), and crawlservpp::Wrapper::Database::database.
|
inlineprotectedinherited |
Adds a table to the database.
id will be created automatically.| properties | Constant reference to a structure containing the properties of the table to be created. |
| Main::Database::Exception | if no name or columns are specified in the given properties structure, if one of the columns defined there is missing its name or data type, or if a column reference is incomplete. |
| Main::Database::Exception | if a MySQL error occured while adding the table to the database. |
References crawlservpp::Main::Database::createTable(), and crawlservpp::Wrapper::Database::database.
|
inlineinherited |
Deletes a target table from the database.
| type | Constant reference to a string containing the type of the target table to be deleted |
| tableId | The ID of the target table to be deleted. |
| Main::Database::Exception | if no target table has been specified, i.e. the string containing the type is empty or the target table ID is zero. |
| Main::Database::Exception | if a MySQL error occured while deleting the target table from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::deleteTargetTable().
|
inlineprotectedinherited |
Deletes a table from the database.
If the table does not exist in the database, the database will not be changed.
| tableName | Constant reference to a string containing the name of the table to be deleted, if it exists. |
| Main::Database::Exception | if no table has been specified, i.e. if the string containing the name of the table is empty. |
| Main::Database::Exception | if a MySQL error occured while removing the table from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::dropTable().
Referenced by addAdditionalTable(), and initTargetTable().
|
inlineinherited |
Re-enables database locking by ending the previous SQL transaction.
| Main::Database::Exception | if a MySQL error occured while ending the previous SQL transaction by committing the changes to the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::endNoLock().
Referenced by crawlservpp::Module::Crawler::Database::getNumberOfUrls(), and crawlservpp::Module::Crawler::Database::getUrlPosition().
| const std::string & crawlservpp::Module::Analyzer::Database::getAdditionalTableName | ( | std::size_t | id | ) | const |
Gets the full name of an additional table.
| id | The ID of the additional table. |
| Main::Database::Exception | if the given ID does not identify an additional table. |
References additionalTables.
Referenced by crawlservpp::Module::Analyzer::Algo::AllTokens::resetAlgo(), and crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo().
|
inlineinherited |
Gets the type of a specific table column from the database.
| tableName | Constant reference to a string containing the name of the table in the database from which the type of the column will be retrieved. |
| columnName | Constant reference to a string containing the name of the column whose type will be retrieved. |
| Main::Database::Exception | if no table or column has been specified, i.e. one of the strings containing the name and the column is empty. |
| Main::Database::Exception | if a MySQL error occured while retrieving the type of the given column, e.g. if the specified table does not exist. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getColumnType().
Referenced by crawlservpp::Module::Analyzer::Thread::uploadResult().
|
inlineinherited |
Gets a configuration from the database.
| configId | The ID of the configuration to be retrieved from the database. |
| Main::Database::Exception | if no configuration has been specified, i.e. the configuration ID is zero. |
| Main::Database::Exception | if a MySQL error occured while retrieving the configuration from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getConfiguration().
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries(), crawlservpp::Module::Parser::Thread::onReset(), crawlservpp::Module::Extractor::Thread::onReset(), and crawlservpp::Module::Crawler::Thread::onReset().
| std::string crawlservpp::Module::Analyzer::Database::getCorporaLastUpdated | ( | ) | const |
Gets the last update date/time over the sources of all corpora.
Referenced by crawlservpp::Module::Analyzer::Thread::uploadResult().
| bool crawlservpp::Module::Analyzer::Database::getCorpus | ( | const CorpusProperties & | corpusProperties, |
| const std::string & | filterDateFrom, | ||
| const std::string & | filterDateTo, | ||
| Data::Corpus & | corpusTo, | ||
| std::size_t & | sourcesTo, | ||
| StatusSetter & | statusSetter | ||
| ) |
Gets the text corpus after creating it if it is out-of-date or does not yet exist.
| corpusProperties | Constant reference to structure containing the properties of the text corpus. |
| filterDateFrom | Constant reference to a string contaning the starting date from which on the text corpus should be created, or to an empty string if the source of the corpus should not be filtered by a starting date. Can only be used if the source of the corpus is parsed data. |
| filterDateTo | Constant reference to a string contaning the ending date until which the text corpus should be created, or to an empty string if the source of the corpus should not be filtered by an ending date. Can only be used if the source of the corpus is parsed data. |
| corpusTo | Reference to which the resulting text corpus should be written. |
| sourcesTo | Reference to which the number of sources used when creating the text corpus should be written. |
| statusSetter | Data needed to keep the status of the thread updated. |
| Module::Analyzer::Exception | if a prepared SQL statement is missing, or an article or date map could not be parsed. |
| Main::Database::Exception | if a MySQL error occured while getting or creating the text corpus. |
References crawlservpp::Data::Corpus::clear(), crawlservpp::Data::Corpus::filterByDate(), crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Struct::StatusSetter::isRunning(), crawlservpp::Helper::CommaLocale::locale(), crawlservpp::Wrapper::Database::log(), crawlservpp::Data::Corpus::size(), crawlservpp::Struct::CorpusProperties::sourceColumn, crawlservpp::Struct::CorpusProperties::sourceTable, crawlservpp::Struct::CorpusProperties::sourceType, and crawlservpp::Timer::Simple::tickStr().
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries().
|
inlineinherited |
Gets a custom value from one column from a table row in the database.
| data | Reference to the data structure that identifies the column, and to which the result will be written. |
| Main::Database::Exception | if no column name or no column type is specified in the given data structure, or if an invalid data type has been encountered. |
| Main::Database::Exception | if a MySQL error occured while retrieving the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getCustomData().
Referenced by checkSources(), and crawlservpp::Module::Analyzer::Thread::uploadResult().
|
inlineinherited |
Gets custom values from multiple columns of the same type from a table row.
| data | Reference to the data structure that identifies the columns, and to which the result will be written. |
| Main::Database::Exception | if no column names or no column type are specified in the given data structure, or if an invalid data type has been encountered. |
| Main::Database::Exception | if a MySQL error occured while retrieving the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getCustomData().
|
inlineinherited |
Gets custom values from multiple columns of different types from a table row.
| data | Reference to the data structure that identifies the columns and their types, and to which the result will be written. |
| Main::Database::Exception | if no columns are specified in the given data structure, or if an invalid data type has been encountered. |
| Main::Database::Exception | if a MySQL error occured while retrieving the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getCustomData().
|
inlineinherited |
Gets custom values from a table column in the database.
| data | Reference to the data structure that identifies the column, and to which the result will be written. |
| Main::Database::Exception | if no column or column type is specified in the given data structure, or if an invalid data type has been encountered. |
| Main::Database::Exception | if a MySQL error occured while retrieving the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getCustomData().
|
inlineinherited |
Gets custom values from multiple table columns of the same type.
| data | Reference to the data structure that identifies the columns, and to which the result will be written. |
| Main::Database::Exception | if no column or column type is specified in the given data structure, or if an invalid data type has been encountered. |
| Main::Database::Exception | if a MySQL error occured while retrieving the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getCustomData().
|
inlineinherited |
Gets custom values from multiple table columns of different types.
| data | Reference to the data structure that identifies the columns and their types, and to which the result will be written. |
| Main::Database::Exception | if no columns have been specified in the given data structure, or if an invalid data type has been encountered. |
| Main::Database::Exception | if a MySQL error occured while retrieving the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getCustomData().
|
inlineprotectedinherited |
Gets the last inserted ID from the database.
| Main::Database::Exception | if the prepared SQL statement for retrieving the last inserted ID from the database is missing. |
| Main::Database::Exception | if a MySQL error occured while retrieving the last inserted ID from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getLastInsertedId().
Referenced by checkSources().
|
inlineprotectedinherited |
Gets the minimal logging level.
References crawlservpp::Wrapper::Database::database.
Referenced by addAdditionalTable(), checkSources(), getCorpus(), initTargetTable(), crawlservpp::Module::Crawler::Database::saveArchivedContent(), crawlservpp::Module::Crawler::Database::saveContent(), crawlservpp::Module::Parser::Database::setTargetTable(), crawlservpp::Module::Extractor::Database::setTargetTable(), setTargetTable(), updateAdditionalTable(), crawlservpp::Module::Parser::Database::updateTargetTable(), updateTargetTable(), crawlservpp::Module::Extractor::Database::updateTargetTable(), and crawlservpp::Module::Crawler::Database::urlHashCheck().
|
inlineprotectedinherited |
Gets the level for verbose logging.
References crawlservpp::Wrapper::Database::database.
Referenced by crawlservpp::Module::Crawler::Database::prepare(), crawlservpp::Module::Parser::Database::prepare(), crawlservpp::Module::Extractor::Database::prepare(), and prepare().
|
inlineprotectedinherited |
Gets the maximum allowed packet size for communicating with the MySQL server.
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getMaxAllowedPacketSize().
Referenced by checkSources(), crawlservpp::Module::Crawler::Database::saveArchivedContent(), crawlservpp::Module::Crawler::Database::saveContent(), crawlservpp::Module::Parser::Database::updateTargetTable(), and crawlservpp::Module::Extractor::Database::updateTargetTable().
|
inlineprotectedinherited |
Gets the options of the module.
References crawlservpp::Wrapper::Database::database.
Referenced by addAdditionalTable(), crawlservpp::Module::Parser::Database::initTargetTable(), initTargetTable(), crawlservpp::Module::Extractor::Database::initTargetTables(), crawlservpp::Module::Crawler::Database::prepare(), prepare(), and crawlservpp::Module::Crawler::Database::setUrlCaseSensitive().
|
inlineprotectedinherited |
Gets a reference to a prepared SQL statement.
| id | The ID of the prepared SQL statement to retrieve. |
| Main::Database::Exception | if a MySQL error occured while retrieving the prepared SQL statement. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getPreparedStatement().
Referenced by crawlservpp::Module::Crawler::Database::addUrlIfNotExists(), crawlservpp::Module::Crawler::Database::addUrlsIfNotExist(), crawlservpp::Module::Extractor::Database::checkExtractingTable(), crawlservpp::Module::Parser::Database::checkParsingTable(), checkSources(), crawlservpp::Module::Parser::Database::fetchUrls(), crawlservpp::Module::Extractor::Database::fetchUrls(), crawlservpp::Module::Parser::Database::getAllContents(), crawlservpp::Module::Extractor::Database::getContent(), crawlservpp::Module::Parser::Database::getContentIdFromParsedId(), crawlservpp::Module::Parser::Database::getLatestContent(), crawlservpp::Module::Extractor::Database::getLatestParsedData(), crawlservpp::Module::Parser::Database::getLockTime(), crawlservpp::Module::Extractor::Database::getLockTime(), crawlservpp::Module::Crawler::Database::getNextUrl(), crawlservpp::Module::Parser::Database::getNumberOfContents(), crawlservpp::Module::Crawler::Database::getNumberOfUrls(), crawlservpp::Module::Parser::Database::getNumberOfUrls(), crawlservpp::Module::Extractor::Database::getNumberOfUrls(), getTargetTableUpdated(), crawlservpp::Module::Crawler::Database::getUrlId(), crawlservpp::Module::Crawler::Database::getUrlLockTime(), crawlservpp::Module::Parser::Database::getUrlLockTime(), crawlservpp::Module::Extractor::Database::getUrlLockTime(), crawlservpp::Module::Crawler::Database::getUrlPosition(), crawlservpp::Module::Parser::Database::getUrlPosition(), crawlservpp::Module::Extractor::Database::getUrlPosition(), crawlservpp::Module::Crawler::Database::isArchivedContentExists(), crawlservpp::Module::Crawler::Database::isUrlCrawled(), crawlservpp::Module::Crawler::Database::lockUrlIfOk(), crawlservpp::Module::Parser::Database::renewUrlLockIfOk(), crawlservpp::Module::Extractor::Database::renewUrlLockIfOk(), crawlservpp::Module::Crawler::Database::saveArchivedContent(), crawlservpp::Module::Crawler::Database::saveContent(), crawlservpp::Module::Crawler::Database::setUrlFinishedIfOk(), crawlservpp::Module::Parser::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Extractor::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Crawler::Database::unLockUrlIfOk(), crawlservpp::Module::Parser::Database::unLockUrlIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlIfOk(), crawlservpp::Module::Parser::Database::unLockUrlsIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlsIfOk(), updateAdditionalTable(), crawlservpp::Module::Parser::Database::updateOrAddEntries(), crawlservpp::Module::Extractor::Database::updateOrAddEntries(), crawlservpp::Module::Extractor::Database::updateOrAddLinked(), crawlservpp::Module::Parser::Database::updateTargetTable(), updateTargetTable(), crawlservpp::Module::Extractor::Database::updateTargetTable(), crawlservpp::Module::Crawler::Database::urlDuplicationCheck(), crawlservpp::Module::Crawler::Database::urlEmptyCheck(), and crawlservpp::Module::Crawler::Database::urlHashCheck().
|
inlineinherited |
Gets the properties of a query from the database.
| queryId | The ID of the query for which the properties will be retrieved from the database. |
| queryPropertiesTo | Reference to the structure to which the retrieved properties of the query will be written. |
| Main::Database::Exception | if no query ID has been specfied, i.e. the query ID is zero. |
| Main::Database::Exception | if a MySQL error occured while retrieving the properties of the given query from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getQueryProperties().
Referenced by crawlservpp::Module::Analyzer::Thread::addOptionalQuery(), crawlservpp::Module::Analyzer::Thread::addQueries(), crawlservpp::Module::Parser::Thread::onReset(), crawlservpp::Module::Extractor::Thread::onReset(), and crawlservpp::Module::Crawler::Thread::onReset().
|
inlinestaticinherited |
Gets the number of SQL requests performed since the start of the application.
References crawlservpp::Main::Database::getRequestCounter().
Referenced by crawlservpp::Main::Database::sqlExecute(), crawlservpp::Main::Database::sqlExecuteQuery(), and crawlservpp::Main::Database::sqlExecuteUpdate().
|
static |
Public helper function getting the full name of a source column.
| type | The type of the source for which the full name of a column will be retrieved. |
| name | Constant reference to a string containing the name of the source column whose full name will be retrieved. |
| Analyzer::Database::Exception | if the given source type is invalid. |
References crawlservpp::Module::Analyzer::generalInputSourcesAnalyzing, crawlservpp::Module::Analyzer::generalInputSourcesCrawling, crawlservpp::Module::Analyzer::generalInputSourcesExtracting, and crawlservpp::Module::Analyzer::generalInputSourcesParsing.
Referenced by checkSources().
| std::string crawlservpp::Module::Analyzer::Database::getSourceTableName | ( | std::uint16_t | type, |
| const std::string & | name | ||
| ) | const |
Public helper function getting the full name of a source table.
| type | The type of the source for which the full name of its table will be retrieved. |
| name | Constant reference to a string containing the name of the source table whose full name will be retrieved. |
| Analyzer::Database::Exception | if the given source type is invalid. |
References crawlservpp::Module::Analyzer::generalInputSourcesAnalyzing, crawlservpp::Module::Analyzer::generalInputSourcesCrawling, crawlservpp::Module::Analyzer::generalInputSourcesExtracting, crawlservpp::Module::Analyzer::generalInputSourcesParsing, and tablePrefix.
Referenced by checkSources().
|
inlineinherited |
Gets the ID of a target table from the database.
| type | Constant reference to a string containing the type of the target table for which to retrieve its ID. |
| listId | The ID of the URL list associated with the target table for which to retrieve its ID. |
| tableName | Const reference to a string containing the name of the target table for which to retrieve its ID. |
| Main::Database::Exception | if no target table or URL list has been specified, i.e. if the string containing the type is empty, or the target table or the URL list ID is zero. |
| Main::Database::Exception | if a MySQL error occured while retrieving the ID of the target table from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getTargetTableId().
|
inlineinherited |
Gets the name of a target table from the database.
| type | String view containing the type of the target table for which to retrieve its name. |
| tableId | The ID of the target table for which to retrieve its name. |
| Main::Database::Exception | if no target table has been specified, i.e. the string containing the type is empty or the target table ID is zero. |
| Main::Database::Exception | if a MySQL error occured while retrieving the name of the target table from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getTargetTableName().
|
inlineinherited |
Gets the target tables of the specified type for a URL list from the database.
| type | Constant reference to a string containing the type of the target tables to retrieve. |
| listId | The ID of the URL list for which to retrieve the target tables. |
| Main::Database::Exception | if no target table has been specified, i.e. the string containing the type is empty or the target table ID is zero. |
| Main::Database::Exception | if a MySQL error occured while retrieving the target tables from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getTargetTables().
| std::string crawlservpp::Module::Analyzer::Database::getTargetTableUpdated | ( | ) |
Gets the date/time when the target table has been updated last.
References crawlservpp::Wrapper::Database::checkConnection(), crawlservpp::Wrapper::Database::getPreparedStatement(), crawlservpp::Wrapper::Database::sqlException(), and crawlservpp::Wrapper::Database::sqlExecuteQuery().
Referenced by crawlservpp::Module::Analyzer::Thread::uploadResult().
|
inlineprotectedinherited |
Gets the ID of the URL list used by the thread as string.
References crawlservpp::Wrapper::Database::database.
Referenced by prepare().
|
inlineinherited |
Gets the domain of a website from the database.
| websiteId | The ID of the website for which the domain will be retrieved from the database. |
| Main::Database::Exception | if no website has been specified, i.e. the website ID is zero. |
| Main::Database::Exception | if a MySQL error occured while retrieving the domain name of the given website from the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::getWebsiteDomain().
Referenced by crawlservpp::Module::Crawler::Thread::onReset().
|
inlineprotectedinherited |
Gets the ID of the website used by the thread as string.
References crawlservpp::Wrapper::Database::database.
Referenced by prepare().
| void crawlservpp::Module::Analyzer::Database::initTargetTable | ( | bool | isCompressed, |
| bool | isDelete | ||
| ) |
Creates the target table, or adds the field columns, if they do not exist already.
| isCompressed | Set whether to compress the data in the target table. |
| isDelete | Set whether to delete a previously existing target table. |
| Analyzer::Database::Exception | if no website or URL list has been previously specified, the name of the target table is empty, no target fields have been specified, or the data type for a target field is missing. |
References crawlservpp::Wrapper::Database::addOrUpdateTargetTable(), crawlservpp::Struct::TargetTableProperties::columns, crawlservpp::Wrapper::Database::dropTable(), crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Wrapper::Database::getOptions(), crawlservpp::Wrapper::Database::log(), targetFields, targetTableFull, targetTableId, targetTableName, crawlservpp::Struct::ModuleOptions::urlListNamespace, and crawlservpp::Struct::ModuleOptions::websiteNamespace.
Referenced by crawlservpp::Module::Analyzer::Algo::ExtractIds::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::CorpusGenerator::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::WordsOverTime::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::Assoc::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::AssocOverTime::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::AllTokens::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::SentimentOverTime::onAlgoInitTarget(), and crawlservpp::Module::Analyzer::Algo::TopicModelling::onAlgoInitTarget().
|
inlineinherited |
Inserts a custom value into a table row in the database.
| data | Constant reference to a structure containing the data to be inserted. |
| Main::Database::Exception | if no table, columns, or column type have been specified in the given data structure, if the given data is too large, or if an invalid data has been encountered. |
| Main::Database::Exception | if a MySQL error occured while inserting the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::insertCustomData().
Referenced by crawlservpp::Module::Analyzer::Algo::CorpusGenerator::onAlgoInit(), crawlservpp::Module::Analyzer::Algo::ExtractIds::resetAlgo(), crawlservpp::Module::Analyzer::Algo::WordsOverTime::resetAlgo(), crawlservpp::Module::Analyzer::Algo::Assoc::resetAlgo(), crawlservpp::Module::Analyzer::Algo::AssocOverTime::resetAlgo(), crawlservpp::Module::Analyzer::Algo::AllTokens::resetAlgo(), crawlservpp::Module::Analyzer::Algo::SentimentOverTime::resetAlgo(), and crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo().
|
inlineinherited |
Inserts custom values into multiple table columns of the same type.
| data | Constant reference to a structure containing the data to be inserted. |
| Main::Database::Exception | if no table, columns, or column type have been specified in the given data structure, if the given data is too large, or if an invalid data has been encountered. |
| Main::Database::Exception | if a MySQL error occured while inserting the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::insertCustomData().
|
inlineinherited |
Inserts custom values into multiple table columns of different types.
| data | Constant reference to a structure containing the data to be inserted. |
| Main::Database::Exception | if no table or columns have been specified in the given data structure, if the given data is too large, or if an invalid data has been encountered. |
| Main::Database::Exception | if a MySQL error occured while inserting the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::insertCustomData().
|
inlineinherited |
Checks whether a table in the database contains a specific column.
| tableName | Constant reference to a string containing the name of the table in the database in which the existence of the column will be checked. |
| columnName | Constant reference to a string containing the name of the column to be checked for in the given table. |
| Main::Database::Exception | if no table or columns have been specified, i.e. one of the strings containing the name and the column is empty. |
| Main::Database::Exception | if a MySQL error occured while checking the existence of the given column, e.g. if the specified table does not exist. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::isColumnExists().
Referenced by crawlservpp::Wrapper::Database::addTargetColumn(), and crawlservpp::Module::Analyzer::Thread::uploadResult().
|
inlineinherited |
Checks whether a table in the database is empty.
| tableName | Constant reference to a string containing the name of the table whose contents will be checked in the database. |
| Main::Database::Exception | if no table has been specified, i.e. the string containing the name is empty. |
| Main::Database::Exception | if a MySQL error occured while checking the content of the given table in the database, e.g. if the table does not exist. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::isTableEmpty().
|
inlineinherited |
Checks whether a table exists in the database.
| tableName | Constant reference to a string containing the name of the table whose existence in the database will be checked. |
| Main::Database::Exception | if no table has been specified, i.e. the string containing the name is empty. |
| Main::Database::Exception | if a MySQL error occured while checking the existence of the given table in the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::isTableExists().
|
inlineinherited |
Writes a thread-specific log entry to the database.
Removes invalid UTF-8 characters if necessary.
If debug logging is active, the entry will be written to the logging file as well.
The log entry will not be written to the database, if the current logging level is lower than the specified logging level. The logging level does not affect the writing of logging entries being to the logging file when debug logging is active.
| level | The logging level for the entry. The entry will only be written to the database, if the current logging level is at least the logging level for the entry. |
| logEntry | Constant reference to a string containing the log entry. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Module::Database::log().
Referenced by addAdditionalTable(), checkSources(), getCorpus(), initTargetTable(), crawlservpp::Module::Crawler::Database::prepare(), crawlservpp::Module::Parser::Database::prepare(), crawlservpp::Module::Extractor::Database::prepare(), prepare(), crawlservpp::Module::Crawler::Database::saveArchivedContent(), crawlservpp::Module::Crawler::Database::saveContent(), crawlservpp::Module::Parser::Database::setTargetTable(), crawlservpp::Module::Extractor::Database::setTargetTable(), setTargetTable(), updateAdditionalTable(), crawlservpp::Module::Parser::Database::updateTargetTable(), updateTargetTable(), crawlservpp::Module::Extractor::Database::updateTargetTable(), and crawlservpp::Module::Crawler::Database::urlHashCheck().
|
inlineinherited |
Writes multiple thread-specific log entries to the database.
Removes invalid UTF-8 characters if necessary.
If debug logging is active, the entries will be written to the logging file as well.
The log entries will not be written to the database, if the current logging level is lower than the specified logging level. The logging level does not affect the writing of logging entries being to the logging file when debug logging is active.
| level | The logging level for the entries. The entries will only be written to the database, if the current logging level is at least the logging level for the entry. |
| logEntries | Reference to a queue of strings containing the log entries to be written. It will be emptied regardless whether the log entries will be written to the database. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Module::Database::log().
| void crawlservpp::Module::Analyzer::Database::prepare | ( | ) |
Prepares the SQL statements for the analyzer.
| Main::Database::Exception | if a MySQL error occurs during the preparation of the SQL statements. |
References crawlservpp::Wrapper::Database::addPreparedStatement(), crawlservpp::Wrapper::Database::checkConnection(), crawlservpp::Wrapper::Database::getLoggingVerbose(), crawlservpp::Wrapper::Database::getOptions(), crawlservpp::Wrapper::Database::getUrlListIdString(), crawlservpp::Wrapper::Database::getWebsiteIdString(), crawlservpp::Wrapper::Database::log(), crawlservpp::Wrapper::Database::reserveForPreparedStatements(), crawlservpp::Wrapper::Database::sqlException(), tablePrefix, targetTableId, crawlservpp::Struct::ModuleOptions::urlListNamespace, and crawlservpp::Struct::ModuleOptions::websiteNamespace.
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries().
|
inlinestaticprotectedinherited |
Removes a lock from the database class.
Does nothing if a lock with the given name does not exist in the database class.
| name | Constant reference to a string containing the name of the lock to be removed from the database class. |
References crawlservpp::Main::Database::removeDatabaseLock().
|
inlineprotectedinherited |
Reserves memory for a specific number of additional prepared SQL statements.
| n | Number of prepared SQL statements for which memory should be reserved. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::reserveForPreparedStatements().
Referenced by crawlservpp::Module::Crawler::Database::prepare(), crawlservpp::Module::Parser::Database::prepare(), crawlservpp::Module::Extractor::Database::prepare(), and prepare().
| void crawlservpp::Module::Analyzer::Database::setCorpusSlicing | ( | std::uint8_t | percentageOfMaxAllowedPackageSize | ) |
Sets the size of corpus chunks, in percentage of the maximum package size allowed by the MySQL server.
| percentageOfMaxAllowedPackageSize | Maximum size of the text corpus chunks, in percentage of the maximum package size allowed by the MySQL server. Must be between 1 and 99. |
References corpusSlicing.
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries().
| void crawlservpp::Module::Analyzer::Database::setIsRunningCallback | ( | const IsRunningCallback & | isRunningCallback | ) |
Sets the callback function for checking whether the thread is still running.
This function is needed to interrupt corpus creation in case the thread is interrupted.
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries().
|
inlineinherited |
Sets the current, minimal, and verbose logging levels.
Initializes debug logging via logging file if necessary.
| level | The current logging level. |
| min | The minimum logging level. |
| verbose | The verbose logging level. |
| Module::Database::Exception | if the logging file could not be opened for writing. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Module::Database::setLogging().
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries(), crawlservpp::Module::Parser::Thread::onReset(), crawlservpp::Module::Extractor::Thread::onReset(), and crawlservpp::Module::Crawler::Thread::onReset().
|
inlineinherited |
Sets the number of seconds to sleep before trying to reconnect after connection loss.
| seconds | The number of seconds to wait before trying to reconnect to the MySQL server after the connection got lost. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::setSleepOnError().
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries(), crawlservpp::Module::Parser::Thread::onReset(), crawlservpp::Module::Extractor::Thread::onReset(), and crawlservpp::Module::Crawler::Thread::onReset().
| void crawlservpp::Module::Analyzer::Database::setTargetFields | ( | const std::vector< StringString > & | fields | ) |
Sets the fields of the target table and their types.
The names and the types correspondend to each other via the indices in their respective vector.
| fields | Constant reference to a vector of pairs of string containing both the names and the SQL data types of the fields in the target table. |
References targetFields.
Referenced by crawlservpp::Module::Analyzer::Algo::ExtractIds::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::CorpusGenerator::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::WordsOverTime::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::Assoc::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::AssocOverTime::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::AllTokens::onAlgoInitTarget(), crawlservpp::Module::Analyzer::Algo::SentimentOverTime::onAlgoInitTarget(), and crawlservpp::Module::Analyzer::Algo::TopicModelling::onAlgoInitTarget().
| void crawlservpp::Module::Analyzer::Database::setTargetTable | ( | const std::string & | table | ) |
Sets the name of the target table.
| table | Constant reference to a string containing the name of the target table. |
References crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Wrapper::Database::log(), and targetTableName.
Referenced by crawlservpp::Module::Analyzer::Thread::cleanUpQueries().
|
inlineinherited |
Sets the maximum execution time for MySQL queries, in milliseconds.
| milliseconds | The number of milliseconds for a MySQL query to run before it gets cancelled, or zero to disable the time-out for MySQL queries. |
| Main::Database::Exception | if a MySQL error occurs while setting the execution time. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::setTimeOut().
Referenced by crawlservpp::Module::Parser::Thread::onReset().
|
inlineprotectedinherited |
Sets whether the specified URL list is case-sensitive.
| listId | The ID of the URL list whose case-sensitivity will be changed. |
| isCaseSensitive | Specify whether URLs in the given URL list will be case-sensitive or not. |
| Main::Database::Exception | if no URL list has been specified, i.e. the URL list ID is zero. |
| Main::Database::Exception | if a MySQL error occured while setting the case-sensitivity of the URL list. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::setUrlListCaseSensitive().
Referenced by crawlservpp::Module::Crawler::Database::setUrlCaseSensitive().
|
inlinestaticprotectedinherited |
Catches a SQL exception and re-throws it as a specific or a generic Database::Exception.
| function | Constant reference to a string containing the name of the function in which the exception has been thrown. |
| e | Constant reference to the SQL exception that has been thrown. |
References crawlservpp::Main::Database::sqlException().
Referenced by crawlservpp::Module::Crawler::Database::addUrlIfNotExists(), crawlservpp::Module::Crawler::Database::addUrlsIfNotExist(), crawlservpp::Module::Extractor::Database::checkExtractingTable(), crawlservpp::Module::Parser::Database::checkParsingTable(), checkSources(), crawlservpp::Module::Parser::Database::fetchUrls(), crawlservpp::Module::Extractor::Database::fetchUrls(), crawlservpp::Module::Parser::Database::getAllContents(), crawlservpp::Module::Extractor::Database::getContent(), crawlservpp::Module::Parser::Database::getContentIdFromParsedId(), crawlservpp::Module::Parser::Database::getLatestContent(), crawlservpp::Module::Extractor::Database::getLatestParsedData(), crawlservpp::Module::Parser::Database::getLockTime(), crawlservpp::Module::Extractor::Database::getLockTime(), crawlservpp::Module::Crawler::Database::getNextUrl(), crawlservpp::Module::Parser::Database::getNumberOfContents(), crawlservpp::Module::Crawler::Database::getNumberOfUrls(), crawlservpp::Module::Parser::Database::getNumberOfUrls(), crawlservpp::Module::Extractor::Database::getNumberOfUrls(), getTargetTableUpdated(), crawlservpp::Module::Crawler::Database::getUrlId(), crawlservpp::Module::Crawler::Database::getUrlLockTime(), crawlservpp::Module::Parser::Database::getUrlLockTime(), crawlservpp::Module::Extractor::Database::getUrlLockTime(), crawlservpp::Module::Crawler::Database::getUrlPosition(), crawlservpp::Module::Parser::Database::getUrlPosition(), crawlservpp::Module::Extractor::Database::getUrlPosition(), crawlservpp::Module::Crawler::Database::isArchivedContentExists(), crawlservpp::Module::Crawler::Database::isUrlCrawled(), crawlservpp::Module::Crawler::Database::lockUrlIfOk(), prepare(), crawlservpp::Module::Parser::Database::renewUrlLockIfOk(), crawlservpp::Module::Extractor::Database::renewUrlLockIfOk(), crawlservpp::Module::Crawler::Database::saveArchivedContent(), crawlservpp::Module::Crawler::Database::saveContent(), crawlservpp::Module::Crawler::Database::setUrlFinishedIfOk(), crawlservpp::Module::Parser::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Extractor::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Crawler::Database::unLockUrlIfOk(), crawlservpp::Module::Parser::Database::unLockUrlIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlIfOk(), crawlservpp::Module::Parser::Database::unLockUrlsIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlsIfOk(), updateAdditionalTable(), crawlservpp::Module::Parser::Database::updateOrAddEntries(), crawlservpp::Module::Extractor::Database::updateOrAddEntries(), crawlservpp::Module::Extractor::Database::updateOrAddLinked(), crawlservpp::Module::Parser::Database::updateTargetTable(), updateTargetTable(), crawlservpp::Module::Extractor::Database::updateTargetTable(), crawlservpp::Module::Crawler::Database::urlDuplicationCheck(), crawlservpp::Module::Crawler::Database::urlEmptyCheck(), and crawlservpp::Module::Crawler::Database::urlHashCheck().
|
inlinestaticprotectedinherited |
Executes a prepared SQL statement.
| sqlPreparedStatement | Reference to the prepared SQL statement to be executed. |
References crawlservpp::Main::Database::sqlExecute().
Referenced by checkSources(), crawlservpp::Module::Parser::Database::fetchUrls(), crawlservpp::Module::Extractor::Database::fetchUrls(), crawlservpp::Module::Crawler::Database::saveArchivedContent(), crawlservpp::Module::Crawler::Database::saveContent(), crawlservpp::Module::Crawler::Database::setUrlFinishedIfOk(), crawlservpp::Module::Parser::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Extractor::Database::setUrlsFinishedIfLockOk(), crawlservpp::Module::Crawler::Database::unLockUrlIfOk(), crawlservpp::Module::Parser::Database::unLockUrlsIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlsIfOk(), crawlservpp::Module::Parser::Database::updateOrAddEntries(), crawlservpp::Module::Extractor::Database::updateOrAddEntries(), and crawlservpp::Module::Extractor::Database::updateOrAddLinked().
|
inlinestaticprotectedinherited |
Executes a prepared SQL statement and returns the resulting set.
| sqlPreparedStatement | Reference to the prepared SQL statement to be executed. |
References crawlservpp::Main::Database::sqlExecuteQuery().
Referenced by checkSources(), crawlservpp::Module::Parser::Database::fetchUrls(), crawlservpp::Module::Extractor::Database::fetchUrls(), crawlservpp::Module::Parser::Database::getAllContents(), crawlservpp::Module::Extractor::Database::getContent(), crawlservpp::Module::Parser::Database::getContentIdFromParsedId(), crawlservpp::Module::Parser::Database::getLatestContent(), crawlservpp::Module::Extractor::Database::getLatestParsedData(), crawlservpp::Module::Parser::Database::getLockTime(), crawlservpp::Module::Extractor::Database::getLockTime(), crawlservpp::Module::Crawler::Database::getNextUrl(), crawlservpp::Module::Parser::Database::getNumberOfContents(), crawlservpp::Module::Crawler::Database::getNumberOfUrls(), crawlservpp::Module::Parser::Database::getNumberOfUrls(), crawlservpp::Module::Extractor::Database::getNumberOfUrls(), getTargetTableUpdated(), crawlservpp::Module::Crawler::Database::getUrlId(), crawlservpp::Module::Crawler::Database::getUrlLockTime(), crawlservpp::Module::Parser::Database::getUrlLockTime(), crawlservpp::Module::Extractor::Database::getUrlLockTime(), crawlservpp::Module::Crawler::Database::getUrlPosition(), crawlservpp::Module::Parser::Database::getUrlPosition(), crawlservpp::Module::Extractor::Database::getUrlPosition(), crawlservpp::Module::Crawler::Database::isArchivedContentExists(), crawlservpp::Module::Crawler::Database::isUrlCrawled(), crawlservpp::Module::Crawler::Database::urlDuplicationCheck(), crawlservpp::Module::Crawler::Database::urlEmptyCheck(), and crawlservpp::Module::Crawler::Database::urlHashCheck().
|
inlinestaticprotectedinherited |
Executes a prepared SQL statement and returns the number of affected rows.
| sqlPreparedStatement | Reference to the prepared SQL statement to be executed. |
References crawlservpp::Main::Database::sqlExecuteUpdate().
Referenced by crawlservpp::Module::Crawler::Database::addUrlIfNotExists(), crawlservpp::Module::Crawler::Database::addUrlsIfNotExist(), crawlservpp::Module::Extractor::Database::checkExtractingTable(), crawlservpp::Module::Parser::Database::checkParsingTable(), crawlservpp::Module::Crawler::Database::isArchivedContentExists(), crawlservpp::Module::Crawler::Database::lockUrlIfOk(), crawlservpp::Module::Parser::Database::renewUrlLockIfOk(), crawlservpp::Module::Extractor::Database::renewUrlLockIfOk(), crawlservpp::Module::Parser::Database::unLockUrlIfOk(), crawlservpp::Module::Extractor::Database::unLockUrlIfOk(), updateAdditionalTable(), crawlservpp::Module::Parser::Database::updateTargetTable(), updateTargetTable(), crawlservpp::Module::Extractor::Database::updateTargetTable(), and crawlservpp::Module::Crawler::Database::urlHashCheck().
|
inlinestaticprotectedinherited |
Tries to add a lock to the database class, not blocking execution.
If a lock with the same name already exists, the function will not add a lock and return false instead.
| name | Constant reference to a string containing the name of the lock to be added to the database class if a lock with the same name does not exist already. |
References crawlservpp::Main::Database::tryDatabaseLock().
| void crawlservpp::Module::Analyzer::Database::updateAdditionalTable | ( | std::size_t | id | ) |
Updates an additional table.
Sets the time that specifies, when the table has last been updated, to now – i.e. the current database time.
| id | The ID of the additional table. |
| Module::Analyzer::Database::Exception | if the prepared SQL statements for setting the update time of additional tables is missing or the given ID does not identify an additional table. |
| Main::Database::Exception | if a MySQL error occured while setting the update time of the additional table in the database. |
References additionalTables, crawlservpp::Wrapper::Database::checkConnection(), crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Wrapper::Database::getPreparedStatement(), crawlservpp::Wrapper::Database::log(), crawlservpp::Module::Analyzer::sqlArg1, crawlservpp::Wrapper::Database::sqlException(), and crawlservpp::Wrapper::Database::sqlExecuteUpdate().
Referenced by crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo().
|
inlineinherited |
Updates a custom value in a table row.
| data | Constant reference to a structure containing the data to be updated. |
| Main::Database::Exception | if no table, columns, or column type have been specified in the given data structure, if the given data is too large, or if an invalid data has been encountered. |
| Main::Database::Exception | if a MySQL error occured while updating the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::updateCustomData().
|
inlineinherited |
Updates custom values in multiple table columns of the same type.
| data | Constant reference to a structure containing the data to be updated. |
| Main::Database::Exception | if no columns or no column type are specified in the given data structure, if the given data is too large, or if an invalid data has been encountered. |
| Main::Database::Exception | if a MySQL error occured while updating the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::updateCustomData().
|
inlineinherited |
Updates custom values in multiple table columns of different types.
| data | Constant reference to a structure containing the data to be updated. |
| Main::Database::Exception | if no columns are specified in the given data structure, if the given data is too large, or if an invalid data has been encountered. |
| Main::Database::Exception | if a MySQL error occured while updating the data. |
References crawlservpp::Wrapper::Database::database, and crawlservpp::Main::Database::updateCustomData().
| void crawlservpp::Module::Analyzer::Database::updateTargetTable | ( | ) |
Updates the target table.
Sets the time that specifies, when the target table has last been updated, to now – i.e. the current database time.
| Module::Analyzer::Database::Exception | if the prepared SQL statements for setting the update time of the target table is missing. |
| Main::Database::Exception | if a MySQL error occured while setting the update time of the target table in the database. |
References crawlservpp::Wrapper::Database::checkConnection(), crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Wrapper::Database::getPreparedStatement(), crawlservpp::Wrapper::Database::log(), crawlservpp::Wrapper::Database::sqlException(), crawlservpp::Wrapper::Database::sqlExecuteUpdate(), and targetTableName.
Referenced by crawlservpp::Module::Analyzer::Algo::CorpusGenerator::onAlgoInit(), crawlservpp::Module::Analyzer::Algo::ExtractIds::resetAlgo(), crawlservpp::Module::Analyzer::Algo::WordsOverTime::resetAlgo(), crawlservpp::Module::Analyzer::Algo::Assoc::resetAlgo(), crawlservpp::Module::Analyzer::Algo::AssocOverTime::resetAlgo(), crawlservpp::Module::Analyzer::Algo::AllTokens::resetAlgo(), crawlservpp::Module::Analyzer::Algo::SentimentOverTime::resetAlgo(), and crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo().
|
protected |
The IDs and full names of additional tables to write data to.
Referenced by addAdditionalTable(), getAdditionalTableName(), and updateAdditionalTable().
|
protected |
The maximum size of the text corpus chunks, in percentage of the maximum package size allowed by the MySQL server.
Must be between 1 and 99, i.e. between one and ninety-nine percent.
Referenced by checkSources(), and setCorpusSlicing().
|
protectedinherited |
Reference to the database connection for the thread.
Referenced by crawlservpp::Wrapper::Database::addColumn(), crawlservpp::Wrapper::Database::addOrUpdateTargetTable(), crawlservpp::Wrapper::Database::addPreparedStatement(), crawlservpp::Wrapper::Database::beginNoLock(), crawlservpp::Wrapper::Database::checkConnection(), checkSources(), crawlservpp::Wrapper::Database::clearPreparedStatement(), crawlservpp::Wrapper::Database::compressTable(), crawlservpp::Wrapper::Database::createTable(), crawlservpp::Wrapper::Database::deleteTargetTable(), crawlservpp::Wrapper::Database::dropTable(), crawlservpp::Wrapper::Database::endNoLock(), crawlservpp::Wrapper::Database::getColumnType(), crawlservpp::Wrapper::Database::getConfiguration(), crawlservpp::Wrapper::Database::getCustomData(), crawlservpp::Wrapper::Database::getLastInsertedId(), crawlservpp::Wrapper::Database::getLoggingMin(), crawlservpp::Wrapper::Database::getLoggingVerbose(), crawlservpp::Wrapper::Database::getMaxAllowedPacketSize(), crawlservpp::Wrapper::Database::getOptions(), crawlservpp::Wrapper::Database::getPreparedStatement(), crawlservpp::Wrapper::Database::getQueryProperties(), crawlservpp::Wrapper::Database::getTargetTableId(), crawlservpp::Wrapper::Database::getTargetTableName(), crawlservpp::Wrapper::Database::getTargetTables(), crawlservpp::Wrapper::Database::getUrlListIdString(), crawlservpp::Wrapper::Database::getWebsiteDomain(), crawlservpp::Wrapper::Database::getWebsiteIdString(), crawlservpp::Wrapper::Database::insertCustomData(), crawlservpp::Wrapper::Database::isColumnExists(), crawlservpp::Wrapper::Database::isTableEmpty(), crawlservpp::Wrapper::Database::isTableExists(), crawlservpp::Wrapper::Database::log(), crawlservpp::Wrapper::Database::reserveForPreparedStatements(), crawlservpp::Wrapper::Database::setLogging(), crawlservpp::Wrapper::Database::setSleepOnError(), crawlservpp::Wrapper::Database::setTimeOut(), crawlservpp::Wrapper::Database::setUrlListCaseSensitive(), and crawlservpp::Wrapper::Database::updateCustomData().
|
protected |
The prefix used for tables in the MySQL database.
Referenced by getSourceTableName(), and prepare().
|
protected |
The names and types of the target fields, i.e. the columns in the target table to be written to.
Referenced by initTargetTable(), and setTargetFields().
|
protected |
The full name of the target table to be written to, including prefixes.
Referenced by initTargetTable().
|
protected |
The ID of the target table to be written to.
Referenced by initTargetTable(), and prepare().
|
protected |
The name of the target table to be written to.
Referenced by initTargetTable(), setTargetTable(), and updateTargetTable().