83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
+
+
+
+
+
+
+
+
+
+
+
+
|
(session:del! s:session "*sessionvars*" key))
;; utility to get all vars as hash table
(define (s:session-get-sessionvars)
(sdat-get-sessionvars s:session))
;; inputs
;;
(define (s:get-input key)
(session:get-input s:session key))
(define (s:load-model model)
(session:load-model s:session model))
(define (s:model-path model)
(session:model-path s:session model))
;; share data between pages calls
;;
(define (s:shared-hash)
(sdat-get-shared-hash s:session))
(define (s:shared-set! key val)
(hash-table-set! (sdat-get-shared-hash s:session) key val))
(define (s:shared-get key)
(hash-table-ref (sdat-get-shared-hash s:session) key))
;; http://foo.bar.com/pagename/p1/p2 => '("p1" "p2")
;;
(define (s:get-page-params)
(sdat-get-page-params s:session))
(define (s:db)
(sdat-get-conn s:session))
|