|
YCLIMP
Yandex Command Line Interface Music Player
|
The PlaylistDao class - Database class to manipulate playlist related data
.
More...
#include <PlaylistDao.hpp>
Public Member Functions | |
| PlaylistDao (SQLite::Database &database) | |
| void | Init () const |
| int | AddPlaylist (const std::string &name) const |
| int | AddNewOrGetPlaylist (const std::string &name) const |
| If playlist with such name existed, return it's id. | |
| void | RenamePlaylist (int id, const std::string &newName) const |
| std::vector< DBPlaylist > | FetchAll () const |
| void | AddTracksToPlaylist (int playlistId, std::vector< int > trackIds) const |
| void | AddTrackToPlaylist (int playlistId, int trackId) const |
The PlaylistDao class - Database class to manipulate playlist related data
.
Has 3 types of tables:
1) One table with all playlists
2) Table for each playlist defining tracks order in that playlist
3) Table for each playlist defining based on sources
(based on sources - if one of the sources have new tracks, the playlist will be also updated)
| int PlaylistDao::AddNewOrGetPlaylist | ( | const std::string & | name | ) | const |
If playlist with such name existed, return it's id.
| name | - playlist name |