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

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 18 10:42:03 EDT 2011


Author: miker
Date: 2011-03-18 10:42:01 -0400 (Fri, 18 Mar 2011)
New Revision: 19801

Modified:
   branches/rel_2_0/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_0/Open-ILS/src/c-apps/oils_sql.c
===================================================================
--- branches/rel_2_0/Open-ILS/src/c-apps/oils_sql.c	2011-03-18 14:41:25 UTC (rev 19800)
+++ branches/rel_2_0/Open-ILS/src/c-apps/oils_sql.c	2011-03-18 14:42:01 UTC (rev 19801)
@@ -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