[open-ils-commits] r8125 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Dec 1 22:13:49 EST 2007
Author: miker
Date: 2007-12-01 21:54:41 -0500 (Sat, 01 Dec 2007)
New Revision: 8125
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
moving op_join to the right place ... duh
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2007-12-02 02:48:07 UTC (rev 8124)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2007-12-02 02:54:41 UTC (rev 8125)
@@ -1550,20 +1550,20 @@
int first = 1;
if ( search_hash->type == JSON_ARRAY ) {
- if (first) {
- first = 0;
- } else {
- if (opjoin_type == OR_OP_JOIN) buffer_add(sql_buf, " OR ");
- else buffer_add(sql_buf, " AND ");
- }
+ jsonObjectIterator* search_itr = jsonNewObjectIterator( search_hash );
+ while ( (node = jsonObjectIteratorNext( search_itr )) ) {
+ if (first) {
+ first = 0;
+ } else {
+ if (opjoin_type == OR_OP_JOIN) buffer_add(sql_buf, " OR ");
+ else buffer_add(sql_buf, " AND ");
+ }
- jsonObjectIterator* search_itr = jsonNewObjectIterator( search_hash );
- while ( (node = jsonObjectIteratorNext( search_itr )) ) {
- char* subpred = searchWHERE( node->item, meta, opjoin_type );
- buffer_fadd(sql_buf, "( %s )", subpred);
- free(subpred);
+ char* subpred = searchWHERE( node->item, meta, opjoin_type );
+ buffer_fadd(sql_buf, "( %s )", subpred);
+ free(subpred);
}
- jsonObjectIteratorFree(search_itr);
+ jsonObjectIteratorFree(search_itr);
} else if ( search_hash->type == JSON_HASH ) {
jsonObjectIterator* search_itr = jsonNewObjectIterator( search_hash );
More information about the open-ils-commits
mailing list