Index: session.scm ================================================================== --- session.scm +++ session.scm @@ -22,76 +22,76 @@ ;; if a branch is taken then a new session would need to be created ;; ;; make-vector-record session session dbtype dbinit conn params path-params session-key session-id domain toppage page curr-page content-type page-type sroot twikidir pagedat alt-page-dat pagevars pagevars-before sessionvars sessionvars-before globalvars globalvars-before logpt formdat request-method session-cookie curr-err log-port logfile seen-pages page-dir-style debugmode (define (make-sdat)(make-vector 33)) -(define-inline (sdat-get-dbtype vec) (vector-ref vec 0)) -(define-inline (sdat-get-dbinit vec) (vector-ref vec 1)) -(define-inline (sdat-get-conn vec) (vector-ref vec 2)) -(define-inline (sdat-get-params vec) (vector-ref vec 3)) -(define-inline (sdat-get-path-params vec) (vector-ref vec 4)) -(define-inline (sdat-get-session-key vec) (vector-ref vec 5)) -(define-inline (sdat-get-session-id vec) (vector-ref vec 6)) -(define-inline (sdat-get-domain vec) (vector-ref vec 7)) -(define-inline (sdat-get-toppage vec) (vector-ref vec 8)) -(define-inline (sdat-get-page vec) (vector-ref vec 9)) -(define-inline (sdat-get-curr-page vec) (vector-ref vec 10)) -(define-inline (sdat-get-content-type vec) (vector-ref vec 11)) -(define-inline (sdat-get-page-type vec) (vector-ref vec 12)) -(define-inline (sdat-get-sroot vec) (vector-ref vec 13)) -(define-inline (sdat-get-twikidir vec) (vector-ref vec 14)) -(define-inline (sdat-get-pagedat vec) (vector-ref vec 15)) -(define-inline (sdat-get-alt-page-dat vec) (vector-ref vec 16)) -(define-inline (sdat-get-pagevars vec) (vector-ref vec 17)) -(define-inline (sdat-get-pagevars-before vec) (vector-ref vec 18)) -(define-inline (sdat-get-sessionvars vec) (vector-ref vec 19)) -(define-inline (sdat-get-sessionvars-before vec) (vector-ref vec 20)) -(define-inline (sdat-get-globalvars vec) (vector-ref vec 21)) -(define-inline (sdat-get-globalvars-before vec) (vector-ref vec 22)) -(define-inline (sdat-get-logpt vec) (vector-ref vec 23)) -(define-inline (sdat-get-formdat vec) (vector-ref vec 24)) -(define-inline (sdat-get-request-method vec) (vector-ref vec 25)) -(define-inline (sdat-get-session-cookie vec) (vector-ref vec 26)) -(define-inline (sdat-get-curr-err vec) (vector-ref vec 27)) -(define-inline (sdat-get-log-port vec) (vector-ref vec 28)) -(define-inline (sdat-get-logfile vec) (vector-ref vec 29)) -(define-inline (sdat-get-seen-pages vec) (vector-ref vec 30)) -(define-inline (sdat-get-page-dir-style vec) (vector-ref vec 31)) -(define-inline (sdat-get-debugmode vec) (vector-ref vec 32)) -(define-inline (sdat-set-dbtype! vec val)(vector-set! vec 0 val)) -(define-inline (sdat-set-dbinit! vec val)(vector-set! vec 1 val)) -(define-inline (sdat-set-conn! vec val)(vector-set! vec 2 val)) -(define-inline (sdat-set-params! vec val)(vector-set! vec 3 val)) -(define-inline (sdat-set-path-params! vec val)(vector-set! vec 4 val)) -(define-inline (sdat-set-session-key! vec val)(vector-set! vec 5 val)) -(define-inline (sdat-set-session-id! vec val)(vector-set! vec 6 val)) -(define-inline (sdat-set-domain! vec val)(vector-set! vec 7 val)) -(define-inline (sdat-set-toppage! vec val)(vector-set! vec 8 val)) -(define-inline (sdat-set-page! vec val)(vector-set! vec 9 val)) -(define-inline (sdat-set-curr-page! vec val)(vector-set! vec 10 val)) -(define-inline (sdat-set-content-type! vec val)(vector-set! vec 11 val)) -(define-inline (sdat-set-page-type! vec val)(vector-set! vec 12 val)) -(define-inline (sdat-set-sroot! vec val)(vector-set! vec 13 val)) -(define-inline (sdat-set-twikidir! vec val)(vector-set! vec 14 val)) -(define-inline (sdat-set-pagedat! vec val)(vector-set! vec 15 val)) -(define-inline (sdat-set-alt-page-dat! vec val)(vector-set! vec 16 val)) -(define-inline (sdat-set-pagevars! vec val)(vector-set! vec 17 val)) -(define-inline (sdat-set-pagevars-before! vec val)(vector-set! vec 18 val)) -(define-inline (sdat-set-sessionvars! vec val)(vector-set! vec 19 val)) -(define-inline (sdat-set-sessionvars-before! vec val)(vector-set! vec 20 val)) -(define-inline (sdat-set-globalvars! vec val)(vector-set! vec 21 val)) -(define-inline (sdat-set-globalvars-before! vec val)(vector-set! vec 22 val)) -(define-inline (sdat-set-logpt! vec val)(vector-set! vec 23 val)) -(define-inline (sdat-set-formdat! vec val)(vector-set! vec 24 val)) -(define-inline (sdat-set-request-method! vec val)(vector-set! vec 25 val)) -(define-inline (sdat-set-session-cookie! vec val)(vector-set! vec 26 val)) -(define-inline (sdat-set-curr-err! vec val)(vector-set! vec 27 val)) -(define-inline (sdat-set-log-port! vec val)(vector-set! vec 28 val)) -(define-inline (sdat-set-logfile! vec val)(vector-set! vec 29 val)) -(define-inline (sdat-set-seen-pages! vec val)(vector-set! vec 30 val)) -(define-inline (sdat-set-page-dir-style! vec val)(vector-set! vec 31 val)) -(define-inline (sdat-set-debugmode! vec val)(vector-set! vec 32 val)) +(define (sdat-get-dbtype vec) (vector-ref vec 0)) +(define (sdat-get-dbinit vec) (vector-ref vec 1)) +(define (sdat-get-conn vec) (vector-ref vec 2)) +(define (sdat-get-params vec) (vector-ref vec 3)) +(define (sdat-get-path-params vec) (vector-ref vec 4)) +(define (sdat-get-session-key vec) (vector-ref vec 5)) +(define (sdat-get-session-id vec) (vector-ref vec 6)) +(define (sdat-get-domain vec) (vector-ref vec 7)) +(define (sdat-get-toppage vec) (vector-ref vec 8)) +(define (sdat-get-page vec) (vector-ref vec 9)) +(define (sdat-get-curr-page vec) (vector-ref vec 10)) +(define (sdat-get-content-type vec) (vector-ref vec 11)) +(define (sdat-get-page-type vec) (vector-ref vec 12)) +(define (sdat-get-sroot vec) (vector-ref vec 13)) +(define (sdat-get-twikidir vec) (vector-ref vec 14)) +(define (sdat-get-pagedat vec) (vector-ref vec 15)) +(define (sdat-get-alt-page-dat vec) (vector-ref vec 16)) +(define (sdat-get-pagevars vec) (vector-ref vec 17)) +(define (sdat-get-pagevars-before vec) (vector-ref vec 18)) +(define (sdat-get-sessionvars vec) (vector-ref vec 19)) +(define (sdat-get-sessionvars-before vec) (vector-ref vec 20)) +(define (sdat-get-globalvars vec) (vector-ref vec 21)) +(define (sdat-get-globalvars-before vec) (vector-ref vec 22)) +(define (sdat-get-logpt vec) (vector-ref vec 23)) +(define (sdat-get-formdat vec) (vector-ref vec 24)) +(define (sdat-get-request-method vec) (vector-ref vec 25)) +(define (sdat-get-session-cookie vec) (vector-ref vec 26)) +(define (sdat-get-curr-err vec) (vector-ref vec 27)) +(define (sdat-get-log-port vec) (vector-ref vec 28)) +(define (sdat-get-logfile vec) (vector-ref vec 29)) +(define (sdat-get-seen-pages vec) (vector-ref vec 30)) +(define (sdat-get-page-dir-style vec) (vector-ref vec 31)) +(define (sdat-get-debugmode vec) (vector-ref vec 32)) +(define (sdat-set-dbtype! vec val)(vector-set! vec 0 val)) +(define (sdat-set-dbinit! vec val)(vector-set! vec 1 val)) +(define (sdat-set-conn! vec val)(vector-set! vec 2 val)) +(define (sdat-set-params! vec val)(vector-set! vec 3 val)) +(define (sdat-set-path-params! vec val)(vector-set! vec 4 val)) +(define (sdat-set-session-key! vec val)(vector-set! vec 5 val)) +(define (sdat-set-session-id! vec val)(vector-set! vec 6 val)) +(define (sdat-set-domain! vec val)(vector-set! vec 7 val)) +(define (sdat-set-toppage! vec val)(vector-set! vec 8 val)) +(define (sdat-set-page! vec val)(vector-set! vec 9 val)) +(define (sdat-set-curr-page! vec val)(vector-set! vec 10 val)) +(define (sdat-set-content-type! vec val)(vector-set! vec 11 val)) +(define (sdat-set-page-type! vec val)(vector-set! vec 12 val)) +(define (sdat-set-sroot! vec val)(vector-set! vec 13 val)) +(define (sdat-set-twikidir! vec val)(vector-set! vec 14 val)) +(define (sdat-set-pagedat! vec val)(vector-set! vec 15 val)) +(define (sdat-set-alt-page-dat! vec val)(vector-set! vec 16 val)) +(define (sdat-set-pagevars! vec val)(vector-set! vec 17 val)) +(define (sdat-set-pagevars-before! vec val)(vector-set! vec 18 val)) +(define (sdat-set-sessionvars! vec val)(vector-set! vec 19 val)) +(define (sdat-set-sessionvars-before! vec val)(vector-set! vec 20 val)) +(define (sdat-set-globalvars! vec val)(vector-set! vec 21 val)) +(define (sdat-set-globalvars-before! vec val)(vector-set! vec 22 val)) +(define (sdat-set-logpt! vec val)(vector-set! vec 23 val)) +(define (sdat-set-formdat! vec val)(vector-set! vec 24 val)) +(define (sdat-set-request-method! vec val)(vector-set! vec 25 val)) +(define (sdat-set-session-cookie! vec val)(vector-set! vec 26 val)) +(define (sdat-set-curr-err! vec val)(vector-set! vec 27 val)) +(define (sdat-set-log-port! vec val)(vector-set! vec 28 val)) +(define (sdat-set-logfile! vec val)(vector-set! vec 29 val)) +(define (sdat-set-seen-pages! vec val)(vector-set! vec 30 val)) +(define (sdat-set-page-dir-style! vec val)(vector-set! vec 31 val)) +(define (sdat-set-debugmode! vec val)(vector-set! vec 32 val)) ;; (define-class () ;; (dbtype ;; 'pg or 'sqlite3 ;; dbinit ;; conn Index: tests/test.scm ================================================================== --- tests/test.scm +++ tests/test.scm @@ -20,11 +20,11 @@ (load "./cookie.so") (load "./misc-stml.scm") (load "./formdat.scm") (load "./stml.scm") (load "./session.scm") -;(load "./sqltbl.scm") +(load "./sqltbl.scm") (load "./html-filter.scm") (load "./keystore.scm") ;; Test the primitive dbi interface