[open-ils-commits] r19802 - branches/rel_1_6/Open-ILS/src/c-apps (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 18 10:43:58 EDT 2011


Author: miker
Date: 2011-03-18 10:43:56 -0400 (Fri, 18 Mar 2011)
New Revision: 19802

Modified:
   branches/rel_1_6/Open-ILS/src/c-apps/oils_cstore.c
Log:
Allow the "result_field" to be used as the default alias in the output column of a row or set returning transform

Modified: branches/rel_1_6/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- branches/rel_1_6/Open-ILS/src/c-apps/oils_cstore.c	2011-03-18 14:42:01 UTC (rev 19801)
+++ branches/rel_1_6/Open-ILS/src/c-apps/oils_cstore.c	2011-03-18 14:43:56 UTC (rev 19802)
@@ -3138,6 +3138,8 @@
 					const char* _alias;
 					if ((tmp_const = jsonObjectGetKeyConst( selfield, "alias" ))) {
 						_alias = jsonObjectGetString( tmp_const );
+					} else if ((tmp_const = jsonObjectGetKeyConst( selfield, "result_field" ))) { // Use result_field name as the alias
+						_alias = jsonObjectGetString( tmp_const );
 					} else {         // Use field name as the alias
 						_alias = col_name;
 					}



More information about the open-ils-commits mailing list