From: miker Date: Fri, 18 Mar 2011 14:40:40 +0000 (+0000) Subject: Allow the "result_field" to be used as the default alias in the output column of... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=79eec7c1e7221afac0bfc22c14422899f51b9567;p=evergreen%2Fjoelewis.git Allow the "result_field" to be used as the default alias in the output column of a row or set returning transform git-svn-id: svn://svn.open-ils.org/ILS/trunk@19799 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/c-apps/oils_sql.c b/Open-ILS/src/c-apps/oils_sql.c index 09081cd46d..b64e22e2a1 100644 --- a/Open-ILS/src/c-apps/oils_sql.c +++ b/Open-ILS/src/c-apps/oils_sql.c @@ -4273,6 +4273,8 @@ char* SELECT ( 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; }