From 4485a14f767a62881d73b5b9c2993274d90b53bc Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Fri, 8 May 2015 14:14:41 +0200 Subject: [PATCH] MPSPARQL-21: Add %t for unquoted expansion --- src/sparql.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sparql.c b/src/sparql.c index c738e5d..0f38d57 100644 --- a/src/sparql.c +++ b/src/sparql.c @@ -165,6 +165,21 @@ static int z_term(yaz_sparql_t s, WRBUF addinfo, WRBUF res, WRBUF vars, } wrbuf_puts(addinfo, ">"); break; + case 't': + switch (term->which) + { + case Z_Term_general: + wrbuf_json_write(addinfo, + term->u.general->buf, term->u.general->len); + break; + case Z_Term_numeric: + wrbuf_printf(addinfo, ODR_INT_PRINTF, *term->u.numeric); + break; + case Z_Term_characterString: + wrbuf_json_puts(addinfo, term->u.characterString); + break; + } + break; case 'd': switch (term->which) { -- 1.7.10.4