[open-ils-commits] r12561 - trunk/Open-ILS/src/c-apps (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 17 11:36:44 EDT 2009
Author: scottmk
Date: 2009-03-17 11:36:42 -0400 (Tue, 17 Mar 2009)
New Revision: 12561
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
Implement a NOT operator, expressed as "-not".
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-03-17 15:32:12 UTC (rev 12560)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-03-17 15:36:42 UTC (rev 12561)
@@ -2410,7 +2410,16 @@
buffer_free( sql_buf );
return NULL;
}
- } else if ( !strcasecmp("-exists",search_itr->key) ) {
+ } else if ( !strcasecmp("-not",search_itr->key) ) {
+ char* subpred = searchWHERE( node, meta, AND_OP_JOIN, ctx );
+ if( subpred ) {
+ buffer_fadd(sql_buf, " NOT ( %s )", subpred);
+ free( subpred );
+ } else {
+ buffer_free( sql_buf );
+ return NULL;
+ }
+ } else if ( !strcasecmp("-exists",search_itr->key) ) {
char* subpred = SELECT(
ctx,
jsonObjectGetKey( node, "select" ),
More information about the open-ils-commits
mailing list