[open-ils-commits] r10266 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 5 21:47:41 EDT 2008
Author: miker
Date: 2008-08-05 21:47:35 -0400 (Tue, 05 Aug 2008)
New Revision: 10266
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
allow NULL as a parameter in transforms and FROM clause functions
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-08-05 18:01:59 UTC (rev 10265)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-08-06 01:47:35 UTC (rev 10266)
@@ -1128,15 +1128,18 @@
else
buffer_add(sql_buf, ", ");
- if ( dbi_conn_quote_string(dbhandle, &val) ) {
+ if (func_item->type == JSON_NULL) {
+ buffer_add( sql_buf, "NULL" );
+ } else if ( dbi_conn_quote_string(dbhandle, &val) ) {
buffer_fadd( sql_buf, "%s", val );
- free(val);
} else {
osrfLogError(OSRF_LOG_MARK, "%s: Error quoting key string [%s]", MODULENAME, val);
free(val);
buffer_free(sql_buf);
return NULL;
}
+
+ free(val);
}
buffer_add(
More information about the open-ils-commits
mailing list