Moved the database related classes in core to a subfolder aswell.

This commit is contained in:
Relintai 2021-05-15 13:54:28 +02:00
parent 3a00179b3b
commit 7279035237
25 changed files with 22 additions and 21 deletions

View File

@ -6,6 +6,7 @@ env.core_sources = []
env.add_source_files(env.core_sources, "*.cpp")
env.add_source_files(env.core_sources, "./http/*.cpp")
env.add_source_files(env.core_sources, "./database/*.cpp")
# Build it all as a library
lib = env.add_library("core", env.core_sources)

View File

@ -1,6 +1,6 @@
#include "object.h"
#include "database.h"
#include "core/database/database.h"
void Object::migrate() {

View File

@ -2,7 +2,7 @@
#include <cstdio>
#include "core/database_manager.h"
#include "core/database/database_manager.h"
#include "mysql_query_builder.h"
#include "mysql_table_builder.h"

View File

@ -1,7 +1,7 @@
#ifndef MYSQL_CONNECTION
#define MYSQL_CONNECTION
#include "core/database.h"
#include "core/database/database.h"
#include <memory>

View File

@ -4,7 +4,7 @@
#include <memory>
#include <string>
#include "core/query_builder.h"
#include "core/database/query_builder.h"
class MysqlQueryBuilder : public QueryBuilder {
public:

View File

@ -1,7 +1,7 @@
#ifndef MYSQL_QUERY_RESULT_H
#define MYSQL_QUERY_RESULT_H
#include "core/query_result.h"
#include "core/database/query_result.h"
#include <mysql.h>

View File

@ -3,7 +3,7 @@
#include <string>
#include "core/table_builder.h"
#include "core/database/table_builder.h"
class MysqlTableBuilder : public TableBuilder {
public:

View File

@ -1,6 +1,6 @@
#include "pgsql_database.h"
#include "core/database_manager.h"
#include "core/database/database_manager.h"
Database *PGSQLDatabase::_creation_func() {
return new PGSQLDatabase();

View File

@ -1,7 +1,7 @@
#ifndef PGSQL_CONNECTION
#define PGSQL_CONNECTION
#include "core/database.h"
#include "core/database/database.h"
//Brynet has it aswell, and because of using namespace it is defined here aswell
//later this will be fixed better

View File

@ -1,6 +1,6 @@
#include "sqlite3_database.h"
#include "core/database_manager.h"
#include "core/database/database_manager.h"
#include "sqlite3_query_result.h"

View File

@ -1,7 +1,7 @@
#ifndef SQLITE3_CONNECTION
#define SQLITE3_CONNECTION
#include "core/database.h"
#include "core/database/database.h"
//Brynet has it aswell, and because of using namespace it is defined here aswell
//later this will be fixed better

View File

@ -4,7 +4,7 @@
#include <string>
#include <vector>
#include "core/query_result.h"
#include "core/database/query_result.h"
#include "./sqlite/sqlite3.h"

View File

@ -1,8 +1,8 @@
#include "list_page.h"
#include "core/query_builder.h"
#include "core/query_result.h"
#include "core/table_builder.h"
#include "core/database/query_builder.h"
#include "core/database/query_result.h"
#include "core/database/table_builder.h"
#include "core/utils.h"
#include <tinydir/tinydir.h>

View File

@ -1,10 +1,10 @@
#include "message_page.h"
#include "core/database.h"
#include "core/database/database.h"
#include "core/query_builder.h"
#include "core/table_builder.h"
#include "core/query_result.h"
#include "core/database/query_builder.h"
#include "core/database/table_builder.h"
#include "core/database/query_result.h"
void MessagePage::index(Request *request) {
QueryBuilder *b = db->get_query_builder();

View File

@ -1,8 +1,8 @@
#include "paged_article.h"
#include "core/query_builder.h"
#include "core/query_result.h"
#include "core/table_builder.h"
#include "core/database/query_builder.h"
#include "core/database/query_result.h"
#include "core/database/table_builder.h"
#include "core/utils.h"
#include <tinydir/tinydir.h>