-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello-world.rkt
46 lines (40 loc) · 934 Bytes
/
hello-world.rkt
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /usr/bin/env racket
; raco make $*
; raco exe $*
; raco exe --gui $*
#lang racket/base
(require db/base
db/postgresql
)
(require "hello-world-mod1.rkt"
"hello-world-mod2.rkt"
)
(+ b c)
(* b c)
(+ b c b c b)
(display "\u03BB")
(newline)
(>= 4 5 )
(>= (+ 4 (random)) 9 )
(display "Is equal?: ")
(equal? 4 4)
(number->string 255 16)
(define pgc
(postgresql-connect #:user "wbowner"
#:database "wbank"
#:password "owner"
#:server "api"
#:port 5432
)
)
(define cursor-accounts
(prepare pgc "select acc,open_date from gl_acct where acc > $1")
)
(for ([i (in-naturals 1)] [acc-mask '(4702810300000000937 4702810300000000938)])
(printf "~a ~a\n" i "Header: --------------")
(for ([ (acc open-date) (in-query pgc cursor-accounts acc-mask) ])
(printf "~a ~a\n" acc open-date)
)
)
(disconnect pgc)
(exit)