Source

mysql-client.egg /

Filename Size Date modified Message
tests
559 B
689 B
148 B
147 B
3.0 KB
398 B
; A minimal MySQL client library for chicken-scheme.
;
; Requires MySQL database system development components,
; libmysqlclient and mysql_config.
;
; To install, from the directory containing mysql-client.setup:
;
;   chicken-install -s -test
;
; To uninstall:
;
;   chicken-uninstall -s mysql-client
;
; Example program below, to compile and run:
;
;   make
;   ./scm-mysql-example

(require-library mysql-client)

(define sql (make-mysql-connection "localhost" "root" #f "information_schema"))

(define fetch (sql "select * from schemata"))

(define (fetch-loop)
  (let ((row (fetch)))
    (if row 
       (begin
          (printf "~A~%" row)
          (fetch-loop)))))

(fetch-loop)