[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/akonadi/server
From:       Milian Wolff <mail () milianw ! de>
Date:       2010-05-10 13:41:42
Message-ID: 20100510134142.73AB8AC8B1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1125001 by mwolff:

refactor JOIN in QueryBuilder, esp. in regard to INNER JOIN

Now the QueryBuilder takes it's main table in the Ctor as it's required for all queries anyways.
All joins, even INNER JOINs are handled via the new addJoin() method that takes a JoinType argument.

- LEFT JOIN is only supported for SELECT queries
- INNER JOIN is only supported for SELECT and UPDATE queries

This change to the handling of INNER JOINs is required, since the ',' as shortcut for an INNER JOIN
cannot be mixed with LEFT JOINs, while the explicit version can be. See also:

http://dev.mysql.com/doc/refman/5.0/en/join.html

The part about 'unknown column' when using ',' for INNER JOINs.

Note: Since INNER JOINs are more restrictive than LEFT JOINs, the former
will take precedence over the latter. Joining one and the same table twice
is not supported, instead the JoinConditions will be merged.

based on: http://reviewboard.kde.org/r/3907/

 M  +1 -2      src/cachecleaner.cpp  
 M  +2 -2      src/handler/expunge.cpp  
 M  +16 -21    src/handler/fetchhelper.cpp  
 M  +2 -2      src/handler/list.cpp  
 M  +7 -10     src/handlerhelper.cpp  
 M  +1 -1      src/storage/countquerybuilder.h  
 M  +9 -9      src/storage/datastore.cpp  
 M  +1 -3      src/storage/entities-source.xsl  
 M  +5 -10     src/storage/entity.h  
 M  +4 -6      src/storage/itemqueryhelper.cpp  
 M  +5 -7      src/storage/itemretriever.cpp  
 M  +1 -2      src/storage/query.cpp  
 M  +54 -41    src/storage/querybuilder.cpp  
 M  +30 -21    src/storage/querybuilder.h  
 M  +1 -2      src/storage/selectquerybuilder.h  
 M  +112 -44   tests/unittest/querybuildertest.cpp  
 M  +7 -0      tests/unittest/querybuildertest.h  


http://websvn.kde.org/?view=rev&revision=1125001
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic