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

Remove useless/unused methods

parent ddf6d9bb
......@@ -26,21 +26,6 @@ bool AlbumTrack::createTable(sqlite3* dbConnection)
return SqliteTools::createTable( dbConnection, req );
}
AlbumTrack* AlbumTrack::fetch(sqlite3* dbConnection, unsigned int idTrack )
{
const char* req = "SELECT * FROM AlbumTrack WHERE id_track = ?";
sqlite3_stmt *stmt;
int res = sqlite3_prepare_v2( dbConnection, req, -1, &stmt, NULL );
if ( res != SQLITE_OK )
return NULL;
sqlite3_bind_int( stmt, 1, idTrack );
if ( sqlite3_step( stmt ) != SQLITE_ROW )
return NULL;
AlbumTrack* albumTrack = new AlbumTrack( dbConnection, stmt );
sqlite3_finalize( stmt );
return albumTrack;
}
const std::string& AlbumTrack::genre()
{
return m_genre;
......@@ -61,14 +46,7 @@ IAlbum* AlbumTrack::album()
if ( m_album == NULL && m_albumId != 0 )
{
const char* req = "SELECT * FROM Album WHERE id_album = ?";
sqlite3_stmt *stmt;
int res = sqlite3_prepare_v2( m_dbConnection, req, -1, &stmt, NULL );
if ( res != SQLITE_OK )
return NULL;
sqlite3_bind_int( stmt, 1, m_albumId );
res = sqlite3_step( stmt );
m_album = new Album( m_dbConnection, stmt );
sqlite3_finalize( stmt );
m_album = SqliteTools::fetchOne<Album>( m_dbConnection, req, m_albumId );
}
return m_album;
}
......@@ -19,7 +19,6 @@ class AlbumTrack : public IAlbumTrack
virtual IAlbum*album();
static bool createTable( sqlite3* dbConnection );
static AlbumTrack* fetch( sqlite3* dbConnection, unsigned int idTrack );
private:
sqlite3* m_dbConnection;
......
......@@ -21,12 +21,6 @@ File::File( sqlite3* dbConnection, sqlite3_stmt* stmt )
m_showEpisodeId = sqlite3_column_int( stmt, 5 );
}
File::File()
: m_dbConnection( NULL )
, m_id( 0 )
{
}
bool File::insert( sqlite3* dbConnection )
{
assert( m_dbConnection == NULL );
......
......@@ -21,7 +21,6 @@ class File : public IFile
};
File(sqlite3* dbConnection , sqlite3_stmt* stmt);
File();
bool insert(sqlite3* dbConnection);
......
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