Mighty wrong and redundant queries in some of those reports

Phil Longstaff plongstaff at rogers.com
Thu Jun 18 22:08:38 EDT 2009


I've been working on implementing proper SQL queries in the dbi backend to 
support reports properly.  All reports load properly except for the 'Equity 
Statement'.  It has this query:

* 21:59:04 DEBUG <qof.query>     [enter qofquery.c:qof_query_print()]  
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Query Object 
Type: Split
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
reconcile-flag
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
character
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_CHAR_MATCH_ANY char list: v
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
reconcile-flag
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
character
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_CHAR_MATCH_ANY char list: v
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
reconcile-flag
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
character
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_CHAR_MATCH_ANY char list: v
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
reconcile-flag
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
character
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_CHAR_MATCH_ANY char list: v
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
reconcile-flag
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
character
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_CHAR_MATCH_ANY char list: v
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
reconcile-flag
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
character
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_CHAR_MATCH_ANY char list: v
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
book->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 9a666c13b090ffde91dadfc9542a2e90
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
account->guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: guid
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Match type 
QOF_GUID_MATCH_ANY, guids: 5f444f71e51b9176c5f16da1a76cf5d8, guids: 
0a1c424af30cbc9d503852aa020d09c9, guids: e20de37d8a765a98c6f15ae99f1ec8e4, 
guids: 5b0ecd035659bef5c88e47dfd6362f12
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_GTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2008-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->date-posted
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: date 
how: QOF_COMPARE_LTE
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_DATE_MATCH_NORMAL query_date: 2009-12-31
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  OR and AND 
Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  AND Terms:
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   INVERT SENSE 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Param List:  
trans->desc
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Pred Data: 
string how: QOF_COMPARE_EQUAL
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]   Match type 
QOF_STRING_MATCH_CASEINSENSITIVE Not regex string: Closing Entries
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Sort Parameters:    
Param: QofQueryDefaultSort DESC  Options: 0x0 
* 21:59:04 DEBUG <qof.query>         [qof_query_printOutput]  Maximum number 
of results: -1
* 21:59:04 DEBUG <qof.query>     [leave qof_query_print()]  

The query parameters are an OR groups where the groups are terms ANDed 
together.  Given that the first OR term is book.guid != "...", the result of 
that alone returns no splits.

These queries need to be cleaned up.  Any takers?

Phil


More information about the gnucash-devel mailing list