Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
medialibrary
Commits
489bef1a
Commit
489bef1a
authored
May 26, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Album: Remove hardcoded table names
parent
d8fe4e71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/Album.cpp
src/Album.cpp
+5
-2
No files found.
src/Album.cpp
View file @
489bef1a
...
...
@@ -100,7 +100,8 @@ time_t Album::lastSyncDate() const
bool
Album
::
tracks
(
std
::
vector
<
std
::
shared_ptr
<
IAlbumTrack
>
>&
tracks
)
const
{
const
char
*
req
=
"SELECT * FROM AlbumTrack WHERE album_id = ?"
;
static
const
std
::
string
req
=
"SELECT * FROM "
+
policy
::
AlbumTrackTable
::
Name
+
" WHERE album_id = ?"
;
return
SqliteTools
::
fetchAll
<
AlbumTrack
>
(
m_dbConnection
,
req
,
tracks
,
m_id
);
}
...
...
@@ -124,7 +125,9 @@ bool Album::destroy()
bool
Album
::
createTable
(
sqlite3
*
dbConnection
)
{
const
char
*
req
=
"CREATE TABLE IF NOT EXISTS Album("
static
const
std
::
string
req
=
"CREATE TABLE IF NOT EXISTS "
+
policy
::
AlbumTable
::
Name
+
"("
"id_album INTEGER PRIMARY KEY AUTOINCREMENT,"
"name TEXT,"
"release_date UNSIGNED INTEGER,"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment