[open-ils-commits] r11143 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 11 15:44:09 EST 2008
Author: miker
Date: 2008-11-11 15:44:05 -0500 (Tue, 11 Nov 2008)
New Revision: 11143
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
adding subselect support (do not add semicolons to subselects)
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-11-11 20:11:58 UTC (rev 11142)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-11-11 20:44:05 UTC (rev 11143)
@@ -18,6 +18,7 @@
# define MODULENAME "open-ils.cstore"
#endif
+#define SUBSELECT 4
#define DISABLE_I18N 2
#define SELECT_DISTINCT 1
#define AND_OP_JOIN 0
@@ -1664,7 +1665,7 @@
jsonObjectGetKey( node, "order_by" ),
jsonObjectGetKey( node, "limit" ),
jsonObjectGetKey( node, "offset" ),
- 0
+ SUBSELECT
);
buffer_fadd(sql_buf, "EXISTS ( %s )", subpred);
@@ -2235,7 +2236,7 @@
free(string);
}
- buffer_add(sql_buf, ";");
+ if (!(flags & SUBSELECT)) buffer_add(sql_buf, ";");
free(core_class);
if (defaultselhash) jsonObjectFree(defaultselhash);
More information about the open-ils-commits
mailing list