From: miker Date: Fri, 18 Mar 2011 14:42:01 +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=d74bde4d4f13bc9add57b70ce65c5eed04fc4f57;p=working%2FEvergreen.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_2_0@19801 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 cff06bca60..c3f54fd260 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; }