From: miker Date: Fri, 18 Mar 2011 14:45:09 +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=01f575c5bb67bb74558603e5e37dcd1afa2c5dfd;p=Evergreen.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/branches/rel_1_6_1@19804 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/c-apps/oils_cstore.c b/Open-ILS/src/c-apps/oils_cstore.c index e3ddf759f3..71133aad62 100644 --- a/Open-ILS/src/c-apps/oils_cstore.c +++ b/Open-ILS/src/c-apps/oils_cstore.c @@ -3138,6 +3138,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; }