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

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 18 10:41:27 EDT 2011


Author: miker
Date: 2011-03-18 10:41:25 -0400 (Fri, 18 Mar 2011)
New Revision: 19800

Modified:
   branches/rel_2_1/Open-ILS/src/c-apps/oils_sql.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_2_1/Open-ILS/src/c-apps/oils_sql.c
===================================================================
--- branches/rel_2_1/Open-ILS/src/c-apps/oils_sql.c	2011-03-18 14:40:40 UTC (rev 19799)
+++ branches/rel_2_1/Open-ILS/src/c-apps/oils_sql.c	2011-03-18 14:41:25 UTC (rev 19800)
@@ -4273,6 +4273,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