aboutsummaryrefslogtreecommitdiff
path: root/gn/data/dataset.scm
blob: c28cf25f1be57eeadba5c225dda5fbc8050ec86e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(define-module (gn data dataset)
  #: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 (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 (get-dataset db probesetfreeze-id)
  (dbi-query db
             (string-append
              "select Name,Name2,FullName from ProbeSetFreeze where Id=" (int-to-string probesetfreeze-id) " limit 1;"))
  (get-row db))

(define (dataset-name db probesetfreeze-id)
  (assoc-ref (get-dataset db probesetfreeze-id) "Name"))