22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
(declare (uses mtconfigf))
(declare (uses commonmod))
(declare (uses mtargs))
(module pgdbmod
*
(import scheme chicken data-structures extras posix
(prefix dbi dbi:)
srfi-69 srfi-1 typed-records)
(import (prefix mtconfigf configf:)
(prefix mtargs args:)
commonmod
)
;; given a configdat lookup the connection info and open the db
;;
(define (pgdb:open configdat #!key (dbname #f)(dbispec #f))
(let ((pgconf (or dbispec
(args:get-arg "-pgsync")
(if configdat
|
|
>
|
|
|
|
|
<
|
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
(declare (uses mtconfigf))
(declare (uses commonmod))
(declare (uses mtargs))
(module pgdbmod
*
(import scheme chicken data-structures extras files)
(use posix
(prefix dbi dbi:)
srfi-69 srfi-1 typed-records)
(import (prefix mtconfigf configf:))
(import (prefix mtargs args:))
(import commonmod)
;; given a configdat lookup the connection info and open the db
;;
(define (pgdb:open configdat #!key (dbname #f)(dbispec #f))
(let ((pgconf (or dbispec
(args:get-arg "-pgsync")
(if configdat
|