Patch is fine to commit in git/master. qCDebug(debug namespace) is the reight way to print statements on the console. At run time, there are run to enable/disable prints. debug namespace are declared in /core/app/utils/digikam_debug.h Gilles Caulier 2016-06-05 10:44 GMT+02:00 Swati Lodha <[hidden email]>:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
I've now added #include "digikam_debug.h" under Local includes for qCDebug statement. ᐧ On Sun, Jun 5, 2016 at 2:33 PM, Gilles Caulier <[hidden email]> wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Please find attached patch for facesdb. Committing on git/master. Compiles without error. Thank you. ᐧ On Sun, Jun 5, 2016 at 2:38 PM, Swati Lodha <[hidden email]> wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel facedb.patch (9K) Download Attachment |
Please find this patch for facedbschemaupdater.cpp Is it fine to commit? ᐧ On Mon, Jun 6, 2016 at 12:54 AM, Swati Lodha <[hidden email]> wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel facedbschemaupdater.patch (1K) Download Attachment |
In reply to this post by Swati Lodha
Patch sond fine. Q : What' s the side effect to miss ";" at end of sql statements ? Gilles Caulier 2016-06-05 21:24 GMT+02:00 Swati Lodha <[hidden email]>:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
There is no V1 and V2 as i know. This is why code is commented (typically a copy and cast from me when i migrate libkface to digiKam core, using other DB class code as template. Gilles Caulier 2016-06-06 22:37 GMT+02:00 Gilles Caulier <[hidden email]>:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
The semicolon in SQL is a statement terminator. It specifies that a particular statement has ended. This allows more than one statement to be executed. Missing ; in the queries would thus never execute that query. ᐧ On Tue, Jun 7, 2016 at 2:10 AM, Gilles Caulier <[hidden email]> wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
So basically this function would never be called for Face DB ? ᐧ On Tue, Jun 7, 2016 at 2:16 AM, Swati Lodha <[hidden email]> wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Swati Lodha
Really ? If this is true, with all ';' we can considerate that nothing can work previously. Gilles Caulier 2016-06-06 22:46 GMT+02:00 Swati Lodha <[hidden email]>:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Swati Lodha
Currently yes. There is a SchemaUpdater class where updating rules can be written. Check with DBCore schema updater how the rules are implemented. Gilles Caulier 2016-06-06 22:48 GMT+02:00 Swati Lodha <[hidden email]>:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
I think if ; is omitted and query compiles, it can produce unexpected results. So it helps to avoid bugs in code, that could go undetected. ᐧ On Tue, Jun 7, 2016 at 2:33 AM, Gilles Caulier <[hidden email]> wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Richard Mortimer-2
Hi,
I was also thinking along the lines of a solution "b" to have proper and clean support. This would require some trivial support to filter out special values at the right places. Using 0 as magic values usually comes handy and works fast and easy, which is the reason why it was used, but is not 100% clean. Marcel > It is all part of the bigger picture that needs considering to allow > referential integrity to be applied across the (MySQL) database. I don't > have the years of experience with digikam that Marcel does but I think > the following is required: > > 1 - apply "ideal" referential integrity to the MySQL digikam schema > (mostly done). > > 2 - now identify where things break down due to interaction with the > outside world (file systems, other photo editors/tools). Generally I > think this is easy to spot and is normally the root of an information > hierarchy. (tags tree, albums, album roots spring to mind). > > I think that digikam has been pretty consistent with using a magic "0" > value to represent where something no-longer fits into a hierarchy but > is likely to re-appear in due course. > > 3 - Once identified the architectural decision is how to handle it in a > database configured to enforce referential integrity. Bear in mind that > this needs to continue to support SQLite too without having to add too > many special cases. Note that SQLite is capable of supporting > referential integrity so the choice may be to adopt the same solution > for both. > > Really the choices for handling the orphaned items are: > > a - disable referential integrity on those affected fields. That is > almost trivial to implement but does negate some of the benefits. > > b - add "special" internal rows that can be used to collect these > temporarily orphaned nodes. I know that there is one at the root of the > tags tree for MySQL. Note they are a bit tricky to arrange because they > really need to be created with a primary key of zero to match the > existing behaviour of putting zero in there. > > c - change to use null instead of a magic placeholder value. That is > probably a purer solution but does create differences between SQLite and > MySQL. > > I'd probably suggest that option b is the right one to minimise chances > of short/medium term breakage but would be interested to know what > others think. > > Regards > > Richard > > P.S. even if b & c are chosen there are some potential issues that may > occur if multiple orphaned tags, folders, images have the same name. > That will trip up with existing "unique" constraints on the database. I > suspect that this should just be left as "good enough" for now. > Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Swati Lodha
Fine for me.
SQLite didn't care about the semicolon. Other systems might be more picky. Good to fix it. > Final patch for coredb.cpp > > Thank you. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |