Commit e94fcd7c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Rename Table -> DatabaseHelper

parent c855756d
......@@ -29,7 +29,7 @@
#include "IMediaLibrary.h"
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
#include "IAlbum.h"
class Album;
......@@ -47,9 +47,9 @@ struct AlbumTable
};
}
class Album : public IAlbum, public Table<Album, policy::AlbumTable>
class Album : public IAlbum, public DatabaseHelpers<Album, policy::AlbumTable>
{
using _Cache = Table<Album, policy::AlbumTable>;
using _Cache = DatabaseHelpers<Album, policy::AlbumTable>;
public:
Album( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -28,7 +28,7 @@
#include "IAlbumTrack.h"
#include "IMediaLibrary.h"
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
class Album;
class AlbumTrack;
......@@ -44,9 +44,9 @@ struct AlbumTrackTable
};
}
class AlbumTrack : public IAlbumTrack, public Table<AlbumTrack, policy::AlbumTrackTable>
class AlbumTrack : public IAlbumTrack, public DatabaseHelpers<AlbumTrack, policy::AlbumTrackTable>
{
using _Cache = Table<AlbumTrack, policy::AlbumTrackTable>;
using _Cache = DatabaseHelpers<AlbumTrack, policy::AlbumTrackTable>;
public:
AlbumTrack( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -22,7 +22,7 @@
#pragma once
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
#include "IArtist.h"
#include "IMediaLibrary.h"
......@@ -40,10 +40,10 @@ struct ArtistTable
};
}
class Artist : public IArtist, public Table<Artist, policy::ArtistTable>
class Artist : public IArtist, public DatabaseHelpers<Artist, policy::ArtistTable>
{
private:
using _Cache = Table<Artist, policy::ArtistTable>;
using _Cache = DatabaseHelpers<Artist, policy::ArtistTable>;
public:
Artist( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -25,7 +25,7 @@
#include "IAudioTrack.h"
#include "IMediaLibrary.h"
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
class AudioTrack;
......@@ -39,9 +39,9 @@ struct AudioTrackTable
};
}
class AudioTrack : public IAudioTrack, public Table<AudioTrack, policy::AudioTrackTable>
class AudioTrack : public IAudioTrack, public DatabaseHelpers<AudioTrack, policy::AudioTrackTable>
{
using _Cache = Table<AudioTrack, policy::AudioTrackTable>;
using _Cache = DatabaseHelpers<AudioTrack, policy::AudioTrackTable>;
public:
AudioTrack( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -22,7 +22,7 @@
#pragma once
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
#include "IFolder.h"
#include <sqlite3.h>
......@@ -45,9 +45,9 @@ struct FolderTable
}
class Folder : public IFolder, public Table<Folder, policy::FolderTable>
class Folder : public IFolder, public DatabaseHelpers<Folder, policy::FolderTable>
{
using _Cache = Table<Folder, policy::FolderTable>;
using _Cache = DatabaseHelpers<Folder, policy::FolderTable>;
public:
Folder( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -30,7 +30,7 @@ class Media;
class Label;
#include "ILabel.h"
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
namespace policy
{
......@@ -50,9 +50,9 @@ struct LabelCachePolicy
}
class Label : public ILabel, public Table<Label, policy::LabelTable>
class Label : public ILabel, public DatabaseHelpers<Label, policy::LabelTable>
{
using _Cache = Table<Label, policy::LabelTable>;
using _Cache = DatabaseHelpers<Label, policy::LabelTable>;
public:
Label( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -27,7 +27,7 @@
#include <sqlite3.h>
#include "IMedia.h"
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
class Album;
......@@ -51,10 +51,10 @@ struct MediaTable
};
}
class Media : public IMedia, public Table<Media, policy::MediaTable>
class Media : public IMedia, public DatabaseHelpers<Media, policy::MediaTable>
{
private:
using _Cache = Table<Media, policy::MediaTable>;
using _Cache = DatabaseHelpers<Media, policy::MediaTable>;
public:
// Those should be private, however the standard states that the expression
......
......@@ -25,7 +25,7 @@
#include "IMovie.h"
#include <sqlite3.h>
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
class Movie;
......@@ -39,9 +39,9 @@ struct MovieTable
};
}
class Movie : public IMovie, public Table<Movie, policy::MovieTable>
class Movie : public IMovie, public DatabaseHelpers<Movie, policy::MovieTable>
{
using _Cache = Table<Movie, policy::MovieTable>;
using _Cache = DatabaseHelpers<Movie, policy::MovieTable>;
public:
Movie( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -25,7 +25,7 @@
#include <sqlite3.h>
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
#include "IMediaLibrary.h"
#include "IShow.h"
......@@ -42,9 +42,9 @@ struct ShowTable
};
}
class Show : public IShow, public Table<Show, policy::ShowTable>
class Show : public IShow, public DatabaseHelpers<Show, policy::ShowTable>
{
using _Cache = Table<Show, policy::ShowTable>;
using _Cache = DatabaseHelpers<Show, policy::ShowTable>;
public:
Show( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -31,7 +31,7 @@ class ShowEpisode;
#include "IMediaLibrary.h"
#include "IShowEpisode.h"
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
namespace policy
{
......@@ -43,9 +43,9 @@ struct ShowEpisodeTable
};
}
class ShowEpisode : public IShowEpisode, public Table<ShowEpisode, policy::ShowEpisodeTable>
class ShowEpisode : public IShowEpisode, public DatabaseHelpers<ShowEpisode, policy::ShowEpisodeTable>
{
using _Cache = Table<ShowEpisode, policy::ShowEpisodeTable>;
using _Cache = DatabaseHelpers<ShowEpisode, policy::ShowEpisodeTable>;
public:
ShowEpisode( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -23,7 +23,7 @@
#ifndef VIDEOTRACK_H
#define VIDEOTRACK_H
#include "database/SqliteTable.h"
#include "database/DatabaseHelpers.h"
#include "IVideoTrack.h"
#include <sqlite3.h>
......@@ -40,9 +40,9 @@ struct VideoTrackTable
};
}
class VideoTrack : public IVideoTrack, public Table<VideoTrack, policy::VideoTrackTable>
class VideoTrack : public IVideoTrack, public DatabaseHelpers<VideoTrack, policy::VideoTrackTable>
{
using _Cache = Table<VideoTrack, policy::VideoTrackTable>;
using _Cache = DatabaseHelpers<VideoTrack, policy::VideoTrackTable>;
public:
VideoTrack( DBConnection dbConnection, sqlite::Row& row );
......
......@@ -31,7 +31,7 @@
#include "SqliteTools.h"
template <typename IMPL, typename TABLEPOLICY>
class Table
class DatabaseHelpers
{
using Lock = std::unique_lock<std::recursive_mutex>;
......@@ -130,7 +130,7 @@ class Table
template <typename IMPL, typename TABLEPOLICY>
std::unordered_map<unsigned int, std::shared_ptr<IMPL>>
Table<IMPL, TABLEPOLICY>::Store;
DatabaseHelpers<IMPL, TABLEPOLICY>::Store;
template <typename IMPL, typename TABLEPOLICY>
std::recursive_mutex Table<IMPL, TABLEPOLICY>::Mutex;
std::recursive_mutex DatabaseHelpers<IMPL, TABLEPOLICY>::Mutex;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment