This differential refactors rekey media containers query not to use ORM.
Details
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp | ||
---|---|---|
1294 ↗ | (On Diff #35894) | I am wondering if this is safe - here it should work because container is not the primary key. But overall it could cause unique constraint violation |
native/cpp/CommonCpp/DatabaseManagers/entities/EntityQueryHelpers.h | ||
146 ↗ | (On Diff #35894) | shouldn't we also check result of this bind operation? |
native/cpp/CommonCpp/DatabaseManagers/entities/EntityQueryHelpers.h | ||
---|---|---|
146 ↗ | (On Diff #35894) | I don't think that checking for every bind operation is necessary. If the query is malformated then the second bind should also fail. Even if not then in worst case scenario query execution will fail. |
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp | ||
---|---|---|
1294 ↗ | (On Diff #35894) | According to SQLite docs there are a couple of options for unique constraint violation resolution: https://www.sqlite.org/lang_conflict.html. However we don't know which one we would like to use if we ever introduce unique constraint on container field so I would leave it as it is. If this query violates something in future we will be informed from error message and then decide on the best conflict resolution strategy. |
- Add moveDraft and rekeyMessage refactor to this diff.
- Refactor functions above to use one sql query