aboutsummaryrefslogtreecommitdiff
path: root/gn/data/dataset.scm
diff options
context:
space:
mode:
authorPjotr Prins2023-11-19 17:14:15 +0100
committerPjotr Prins2023-11-19 17:14:15 +0100
commitf65cada4f70d7449f38f1fef5164d7c52283a0e9 (patch)
tree2323a63a44737b5f02cdb7a3044dabc9dc1cc564 /gn/data/dataset.scm
parentcd868747703585661efac3b85a423b6dae9b71c2 (diff)
downloadgn-guile-f65cada4f70d7449f38f1fef5164d7c52283a0e9.tar.gz
Iterating through hits
Diffstat (limited to 'gn/data/dataset.scm')
-rw-r--r--gn/data/dataset.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/gn/data/dataset.scm b/gn/data/dataset.scm
new file mode 100644
index 0000000..5e81d1e
--- /dev/null
+++ b/gn/data/dataset.scm
@@ -0,0 +1,23 @@
+(define-module (gn data dataset)
+ #:use-module (json)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 format)
+ #:use-module (ice-9 iconv)
+ #:use-module (ice-9 receive)
+ #:use-module (ice-9 string-fun)
+ ;; #:use-module (gn db sparql)
+ #:use-module (dbi dbi)
+ #:use-module (gn db mysql)
+ #:use-module (gn data group)
+ #:use-module (gn util convert)
+ #:use-module (web gn-uri)
+
+ #:export (
+ dataset-name
+ ))
+
+(define (dataset-name db probesetfreeze-id)
+ (dbi-query db
+ (string-append
+ "select Name2 from ProbeSetFreeze where Id=" (int-to-string probesetfreeze-id) " limit 1;"))
+ (assoc-ref (get-row db) "Name2"))