1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-
+
+
+
|
;; Copyright 2007-2008, Matthew Welland. Kiatoa.com All rights reserved.
;; Copyright 2007-2011, Matthew Welland. Kiatoa.com All rights reserved.
;;
;; DON'T USE THIS!!!! It was a bad idea :-(
;; (require-extension tinyclos)
;; (define-class <sqltbl> ()
;; (rows
;; fields ;; list of field
;; fields-hash ;; hash of fields -> number
;; query ;; query string using ?'s
;; query-params ;; list of params for the query
;; conn ;; connection to db
;; num-rows ;; whatever
;; curr-row-ptr ;; number of the current row
;; curr-row ;; the current row vector (?? do we really want this ??)
;; ))
(declare (unit sqltbl))
(define (make-sqltbl:tbl)(make-vector 9))
(define-inline (sqltbl:tbl-get-rows vec) (vector-ref vec 0))
(define-inline (sqltbl:tbl-get-fields vec) (vector-ref vec 1))
(define-inline (sqltbl:tbl-get-fields-hash vec) (vector-ref vec 2))
(define-inline (sqltbl:tbl-get-query vec) (vector-ref vec 3))
(define-inline (sqltbl:tbl-get-query-params vec) (vector-ref vec 4))
|