From 79eec7c1e7221afac0bfc22c14422899f51b9567 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 18 Mar 2011 14:40:40 +0000 Subject: [PATCH] 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 --- Open-ILS/src/c-apps/oils_sql.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.43.2