{"action":"created","issue":{"url":"https://api.github.com/repos/mixxxdj/mixxx/issues/1099","repository_url":"https://api.github.com/repos/mixxxdj/mixxx","labels_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/1099/labels{/name}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/1099/comments","events_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/1099/events","html_url":"https://github.com/mixxxdj/mixxx/pull/1099","id":198230664,"number":1099,"title":"[PREVIEW] CrateStorage: Prototype for future DB access","user":{"login":"uklotzde","id":1474154,"avatar_url":"https://avatars.githubusercontent.com/u/1474154?v=3","gravatar_id":"","url":"https://api.github.com/users/uklotzde","html_url":"https://github.com/uklotzde","followers_url":"https://api.github.com/users/uklotzde/followers","following_url":"https://api.github.com/users/uklotzde/following{/other_user}","gists_url":"https://api.github.com/users/uklotzde/gists{/gist_id}","starred_url":"https://api.github.com/users/uklotzde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uklotzde/subscriptions","organizations_url":"https://api.github.com/users/uklotzde/orgs","repos_url":"https://api.github.com/users/uklotzde/repos","events_url":"https://api.github.com/users/uklotzde/events{/privacy}","received_events_url":"https://api.github.com/users/uklotzde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-12-31T12:30:40Z","updated_at":"2017-01-27T09:48:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/1099","html_url":"https://github.com/mixxxdj/mixxx/pull/1099","diff_url":"https://github.com/mixxxdj/mixxx/pull/1099.diff","patch_url":"https://github.com/mixxxdj/mixxx/pull/1099.patch"},"body":"This branch demonstrates how a low-level \"DAO\" should look like by replacing CrateDAO with CrateStorage:\r\n- Decoupling of schema dependencies between different modules (tracks, crates, playlists, autodj, ...). Cannot be finished until all other DAOs follow the new rules.\r\n- Type-safe binding of query parameters\r\n- Type-safe mapping of columns to member variables\r\n- Robust and consistent error handling and reporting\r\n- Read operations without the need for intermediate storage (QList, QSet, ...) by using iterators and forward-only queries for maximum performance\r\n- Write operations (transactional) divided into 2 subsequent phases (on/after)\r\n- Repair operation (_self-healing_, optional) for fixing potential database issues once in a while (see also: SqlStorage base class/interface). For example it detected and deleted various strayed entries in my _crate\\_tracks_ table on the first  invocation. Also needed if Mixxx is decomposed into independent modules with decoupled threads (or even microservices) sometimes in the future where referential integrity and consistency cannot be guaranteed by shared transactions anymore -> _eventual consistency_\r\n- Promoting _TrackCollection_ as the controller that is coordinating write operations and notifications for the library\r\n\r\nThe code is fully functional and tested. It fixes existing bugs (like GUI update issues caused by spaghetti signal/slot connections and missing coordination) and enables case-insensitive, locale-aware sorting.\r\n\r\n**Fixed bugs**\r\nhttps://bugs.launchpad.net/mixxx/+bug/1637889\r\nhttps://bugs.launchpad.net/mixxx/+bug/1577185\r\n\r\n**Note**\r\nI will rebase and edit this branch frequently until we agree that it is mergeable ;) That's the reason for tagging this PR with _[PREVIEW]_"},"comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/issues/comments/275626930","html_url":"https://github.com/mixxxdj/mixxx/pull/1099#issuecomment-275626930","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/1099","id":275626930,"user":{"login":"uklotzde","id":1474154,"avatar_url":"https://avatars.githubusercontent.com/u/1474154?v=3","gravatar_id":"","url":"https://api.github.com/users/uklotzde","html_url":"https://github.com/uklotzde","followers_url":"https://api.github.com/users/uklotzde/followers","following_url":"https://api.github.com/users/uklotzde/following{/other_user}","gists_url":"https://api.github.com/users/uklotzde/gists{/gist_id}","starred_url":"https://api.github.com/users/uklotzde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uklotzde/subscriptions","organizations_url":"https://api.github.com/users/uklotzde/orgs","repos_url":"https://api.github.com/users/uklotzde/repos","events_url":"https://api.github.com/users/uklotzde/events{/privacy}","received_events_url":"https://api.github.com/users/uklotzde/received_events","type":"User","site_admin":false},"created_at":"2017-01-27T09:48:08Z","updated_at":"2017-01-27T09:48:08Z","body":"This was also my impression ;) I'm also not happy with the naming of this \nmacro that has an intended side effects in release mode, but let's the debug \nversion fail at runtime.\n\nOn 27.01.2017 10:37, Daniel Schürmann wrote:\n>\n> *@daschuer* commented on this pull request.\n>\n> ----------------------------------------------------------------------------\n>\n> In src/library/trackcollection.cpp \n> <https://github.com/mixxxdj/mixxx/pull/1099#pullrequestreview-18802521>:\n>\n> >      }\n> -}\n> +    DEBUG_ASSERT_AND_HANDLE(m_trackDao.onHidingTracks(transaction, trackIds)) {\n>\n> This and this one below reads a bit as if they were only called in debug mode.\n> This was my fault reading it and a bit if an issue of the AND_HANDLE macro.\n> I have no idea to improve this situation without destroying the doku \n> featured from the macro.\n> Do you ?\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub \n> <https://github.com/mixxxdj/mixxx/pull/1099#pullrequestreview-18802521>, \n> or mute the thread \n> <https://github.com/notifications/unsubscribe-auth/ABZ-auuxZWebHXibiO4t6r_5-j8hl2kFks5rWbr1gaJpZM4LYjFQ>.\n>\n\n"}}
{"actor":{"display_login":"uklotzde"}}