diff options
author | Pjotr Prins | 2023-07-11 10:41:27 -0500 |
---|---|---|
committer | Pjotr Prins | 2023-07-11 10:41:27 -0500 |
commit | 661a9748147d60068d38a2a40e53131447548008 (patch) | |
tree | 23c093621daa849b7186f5b525122b6420aeb6a5 | |
parent | 4dcfbf690585744c00156805c6ca9b7761886270 (diff) | |
download | genenetwork3-661a9748147d60068d38a2a40e53131447548008.tar.gz |
Return SPARQL response
-rwxr-xr-x | gn3-guile/web/webserver.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gn3-guile/web/webserver.scm b/gn3-guile/web/webserver.scm index 1219f52..71ad79c 100755 --- a/gn3-guile/web/webserver.scm +++ b/gn3-guile/web/webserver.scm @@ -71,12 +71,16 @@ (define (sparql-exec query) (sparql-scm query)) -(define (sparql-results query) - (cdr (assoc "bindings" (cdr (assoc "results" (sparql-exec query) +(define (sparql-names response) + (cdr (assoc "vars" (cdr (assoc "head" response)))) + ) + +(define (sparql-results response) + (cdr (assoc "bindings" (cdr (assoc "results" response ))))) (define (sparql-species) - (sparql-results " + (sparql-exec " PREFIX gn: <http://genenetwork.org/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> |