Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated (c) dates, changed to racket, trimmed planet deps

  • Loading branch information...
commit 3143c9af53e809fd2b33271f22e2f3925ab92db1 1 parent 323099e
@rmculpepper authored
Showing with 227 additions and 156 deletions.
  1. +5 −0 .gitignore
  2. +2 −2 generic/exceptions.ss
  3. +3 −3 generic/find-socket.ss
  4. +3 −4 generic/interfaces.ss
  5. +4 −4 generic/io.ss
  6. +2 −2 generic/main.ss
  7. +4 −3 generic/procedures.ss
  8. +3 −3 generic/query.ss
  9. +5 −2 generic/signatures.ss
  10. +23 −24 generic/socket.ss
  11. +5 −6 generic/sql-data.ss
  12. +8 −4 generic/sql-format.ss
  13. +23 −0 generic/unstable-struct.ss
  14. +27 −0 generic/unstable-syntax.ss
  15. +2 −2 info.ss
  16. +2 −2 main.ss
  17. +2 −2 mysql.ss
  18. +8 −9 mysql/connection.ss
  19. +6 −2 mysql/dbsystem.ss
  20. +2 −2 mysql/exceptions.ss
  21. +5 −6 mysql/main.ss
  22. +5 −3 mysql/message.ss
  23. +5 −2 mysql/types.ss
  24. +3 −3 mysql/unit.ss
  25. +2 −2 postgresql.ss
  26. +4 −5 postgresql/connection.ss
  27. +6 −2 postgresql/dbsystem.ss
  28. +2 −2 postgresql/exceptions.ss
  29. +5 −5 postgresql/main.ss
  30. +20 −26 postgresql/msg-util.ss
  31. +2 −2 postgresql/msg.ss
  32. +6 −2 postgresql/types.ss
  33. +3 −3 postgresql/unit.ss
  34. +2 −3 samples/mysql-sample.ss
  35. +2 −2 samples/sample1.ss
  36. +10 −8 scribblings/config.ss
  37. +0 −1  scribblings/connect.scrbl
  38. +1 −1  scribblings/database.scrbl
  39. +0 −1  scribblings/example.scrbl
  40. +5 −1 scribblings/tabbing.ss
View
5 .gitignore
@@ -0,0 +1,5 @@
+compiled
+doc
+generic/compiled
+mysql/compiled
+postgresql/compiled
View
4 generic/exceptions.ss
@@ -1,8 +1,8 @@
-;; Copyright 2000-2009 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(provide (struct-out exn:fail:backend)
internal-raise-backend-error)
View
6 generic/find-socket.ss
@@ -1,12 +1,12 @@
-;; Copyright 2009 Ryan Culpepper
+;; Copyright 2009-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(provide guess-socket-path/paths)
(define (guess-socket-path/paths function paths)
- (or (for/or ([path paths])
+ (or (for/or ([path (in-list paths)])
(and (file-exists? path) path))
(error function
"automatic socket path search failed")))
View
7 generic/interfaces.ss
@@ -1,9 +1,9 @@
-;; Copyright 2000-2009 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/class)
+#lang racket/base
+(require racket/class)
(provide connection:admin<%>
connection:query<%>
@@ -246,4 +246,3 @@
;; bind-prepared-statement : PreparedStatement (list-of value) -> Statement
bind-prepared-statement
))
-
View
8 generic/io.ss
@@ -1,9 +1,9 @@
-;; Copyright 2000-2009 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require (for-syntax scheme/base))
+#lang racket/base
+(require (for-syntax racket/base))
(provide subport
io:write
@@ -47,7 +47,7 @@
io:read-bytes-to-eof)
-(require (rename-in scheme/base
+(require (rename-in racket/base
[read-byte read-byte/timeout]
[read-bytes read-bytes/timeout]
[write-byte write-byte/timeout]
View
4 generic/main.ss
@@ -1,8 +1,8 @@
-;; Copyright 2009 Ryan Culpepper
+;; Copyright 2009-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(require "interfaces.ss"
"signatures.ss"
"sql-data.ss"
View
7 generic/procedures.ss
@@ -1,9 +1,9 @@
-;; Copyright 2009 Ryan Culpepper
+;; Copyright 2009-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/class
+#lang racket/base
+(require racket/class
"interfaces.ss")
(provide (except-out (all-defined-out)
defproc*
@@ -11,6 +11,7 @@
(define-syntax-rule (defproc* ifc def ...)
(begin (defproc ifc . def) ...))
+
(define-syntax defproc
(syntax-rules ()
[(_ ifc [proc method] . formals)
View
6 generic/query.ss
@@ -1,9 +1,9 @@
-;; Copyright 2000-2008 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/class
+#lang racket/base
+(require racket/class
"interfaces.ss"
"sql-data.ss")
View
7 generic/signatures.ss
@@ -1,6 +1,9 @@
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/unit
+#lang racket/base
+(require racket/unit
;; "sql-format.ss"
)
(provide database^)
View
47 generic/socket.ss
@@ -1,11 +1,10 @@
-;; Copyright 2007-2008 Ryan Culpepper
+;; Copyright 2007-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/foreign
- mzlib/etc)
-(unsafe!)
+#lang racket/base
+(require racket/block
+ ffi/unsafe)
(provide unix-socket-connect)
;; The solaris code is untested (and thus disabled).
@@ -13,25 +12,25 @@
;; unix-socket-connect : pathlike -> input-port output-port
;; Connects to the unix domain socket associated with the given path.
(define (unix-socket-connect path0)
- (begin-with-definitions
- (define path (check-pathlike 'unix-socket-connect path0))
- (define s (make-socket))
- (unless (positive? s)
- (error 'unix-socket-connect
- "failed to create socket"))
- (define addr (make-unix-sockaddr path))
- (define addrlen (+ (ctype-sizeof _short) (bytes-length path)))
- (define ce (_connect s addr addrlen))
- (unless (zero? ce)
- (_close s)
- (raise-user-error
- 'unix-socket-connect
- "failed to connect socket to path: ~s" path))
- (with-handlers ([(lambda (e) #t)
- (lambda (e)
- (_close s)
- (raise e))])
- (_make_fd_output_port s 'socket #f #f #t))))
+ (block
+ (define path (check-pathlike 'unix-socket-connect path0))
+ (define s (make-socket))
+ (unless (positive? s)
+ (error 'unix-socket-connect
+ "failed to create socket"))
+ (define addr (make-unix-sockaddr path))
+ (define addrlen (+ (ctype-sizeof _short) (bytes-length path)))
+ (define ce (_connect s addr addrlen))
+ (unless (zero? ce)
+ (_close s)
+ (raise-user-error
+ 'unix-socket-connect
+ "failed to connect socket to path: ~s" path))
+ (with-handlers ([(lambda (e) #t)
+ (lambda (e)
+ (_close s)
+ (raise e))])
+ (_make_fd_output_port s 'socket #f #f #t))))
(define platform
(let ([os (system-type 'os)]
View
11 generic/sql-data.ss
@@ -1,15 +1,14 @@
-;; Copyright 2000-2007 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-
-(require scheme/match
+#lang racket/base
+(require racket/match
(prefix-in srfi: srfi/19))
(provide sql-null
sql-null?
-
+
(struct-out sql-date)
(struct-out sql-time)
(struct-out sql-timestamp)
@@ -50,7 +49,7 @@
marshal-time-tz
marshal-timestamp
marshal-timestamp-tz
-
+
quote-literal)
;; SQL Data
View
12 generic/sql-format.ss
@@ -1,7 +1,11 @@
-#lang scheme/base
-(require (for-syntax scheme/base)
- scheme/unit
- scheme/class
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
+(require (for-syntax racket/base)
+ racket/unit
+ racket/class
"interfaces.ss"
"sql-data.ss")
(provide format-sql
View
23 generic/unstable-struct.ss
@@ -0,0 +1,23 @@
+;; Copyright 2007-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
+(require (for-syntax racket/base
+ syntax/parse
+ "unstable-syntax.ss"))
+(provide define-struct-property)
+
+;; syntax define-struct-property
+;; Example:
+;; (define-struct-property prop:fooable)
+(define-syntax (define-struct-property stx)
+ (syntax-parse stx
+ [(_ name (~and (~optional _) (~seq stuff ...)))
+ (and (identifier? #'name))
+ (with-syntax ([predicate
+ (format-id #'name "~a?" #'name)]
+ [accessor
+ (format-id #'name "~a-value" #'name)])
+ #'(define-values (name predicate accessor)
+ (make-struct-type-property 'name stuff ...)))]))
View
27 generic/unstable-syntax.ss
@@ -0,0 +1,27 @@
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
+(provide format-symbol
+ format-id)
+
+;; Symbol Formatting
+
+(define (format-symbol fmt . args)
+ (define (convert x) (->atom x 'format-symbol))
+ (check-restricted-format-string 'format-symbol fmt)
+ (let ([args (map convert args)])
+ (string->symbol (apply format fmt args))))
+
+(define (format-id lctx
+ #:source [src #f]
+ #:props [props #f]
+ #:cert [cert #f]
+ fmt . args)
+ (define (convert x) (->atom x 'format-id))
+ (check-restricted-format-string 'format-id fmt)
+ (let* ([args (map convert args)]
+ [str (apply format fmt args)]
+ [sym (string->symbol str)])
+ (datum->syntax lctx sym src props cert)))
View
4 info.ss
@@ -3,7 +3,7 @@
;; COPYRIGHT for terms).
#lang setup/infotab
-(define name "database")
+(define name "db")
(define compile-omit-paths
'("samples"
"tests"))
@@ -14,4 +14,4 @@
(define scribblings '(("scribblings/database.scrbl" (multi-page))))
(define categories '(net))
(define can-be-loaded-with 'all)
-(define required-core-version "4.1")
+(define required-core-version "5.0")
View
4 main.ss
@@ -1,8 +1,8 @@
-;; Copyright 2009 Ryan Culpepper
+;; Copyright 2009-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(require (prefix-in postgresql- "postgresql/main.ss")
(prefix-in mysql- "mysql/main.ss")
"generic/main.ss")
View
4 mysql.ss
@@ -1,8 +1,8 @@
-;; Copyright 2009 Ryan Culpepper
+;; Copyright 2009-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(require "generic/main.ss"
(prefix-in mysql- "mysql/main.ss"))
(provide (all-from-out "generic/main.ss")
View
17 mysql/connection.ss
@@ -1,15 +1,14 @@
-;; Copyright 2000-2009 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
;; Implementation of connections, which communicate with a backend through
;; structured messages.
-#lang scheme/base
-(require scheme/class
- scheme/match
- (only-in (planet "digest.ss" ("soegaard" "digest.plt" 1 2))
- sha1-bytes)
+#lang racket/base
+(require racket/class
+ racket/match
+ openssl/sha1
"../generic/interfaces.ss"
"../generic/sql-data.ss"
"../generic/query.ss"
@@ -216,9 +215,9 @@
(define (scramble-password scramble password)
(and scramble password
(let* ([password (string->bytes/latin-1 password)]
- [stage1 (sha1-bytes password)]
- [stage2 (sha1-bytes stage1)]
- [stage3 (sha1-bytes (bytes-append scramble stage2))]
+ [stage1 (sha1-bytes (open-input-bytes password))]
+ [stage2 (sha1-bytes (open-input-bytes stage1))]
+ [stage3 (sha1-bytes (open-input-bytes (bytes-append scramble stage2)))]
[reply (bytes-xor stage1 stage3)])
reply)))
View
8 mysql/dbsystem.ss
@@ -1,5 +1,9 @@
-#lang scheme/base
-(require scheme/class
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
+(require racket/class
"../generic/interfaces.ss"
"types.ss")
(provide (all-defined-out))
View
4 mysql/exceptions.ss
@@ -1,8 +1,8 @@
-;; Copyright 2000-2008 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(require "message.ss"
"../generic/exceptions.ss")
(provide raise-backend-error)
View
11 mysql/main.ss
@@ -1,11 +1,11 @@
-;; Copyright 2000-2009 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/contract
- scheme/class
- scheme/tcp
+#lang racket/base
+(require racket/contract
+ racket/class
+ racket/tcp
"../generic/main.ss"
"../generic/socket.ss"
"../generic/find-socket.ss"
@@ -66,7 +66,6 @@
(send c start-connection-protocol database user password)
c))
-
(define socket-paths
'("/var/run/mysqld/mysqld.sock"))
View
8 mysql/message.ss
@@ -1,7 +1,9 @@
-;; Copyright 2007-2009 Ryan Culpepper
+;; Copyright 2007-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/match
+#lang racket/base
+(require racket/match
"../generic/sql-data.ss"
"../generic/io.ss")
(provide (all-defined-out))
View
7 mysql/types.ss
@@ -1,6 +1,9 @@
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/unit
+#lang racket/base
+(require racket/unit
"../generic/sql-data.ss"
"../generic/sql-format.ss")
(provide wire-typeid->type
View
6 mysql/unit.ss
@@ -1,9 +1,9 @@
-;; Copyright 2008 Ryan Culpepper
+;; Copyright 2008-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/unit
+#lang racket/base
+(require racket/unit
"../generic/signatures.ss"
"main.ss")
(provide mysql@)
View
4 postgresql.ss
@@ -1,8 +1,8 @@
-;; Copyright 2009 Ryan Culpepper
+;; Copyright 2009-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(require "generic/main.ss"
(prefix-in postgresql- "postgresql/main.ss"))
(provide (all-from-out "generic/main.ss")
View
9 postgresql/connection.ss
@@ -1,15 +1,14 @@
-;; Copyright 2000-2008 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
;; Implementation of connections, which communicate with a backend through
;; structured messages.
-#lang scheme/base
-
+#lang racket/base
(require mzlib/etc
- scheme/class
- scheme/match
+ racket/class
+ racket/match
file/md5
openssl/mzssl
"../generic/interfaces.ss"
View
8 postgresql/dbsystem.ss
@@ -1,5 +1,9 @@
-#lang scheme/base
-(require scheme/class
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
+(require racket/class
"../generic/interfaces.ss"
"types.ss")
(provide (all-defined-out))
View
4 postgresql/exceptions.ss
@@ -1,8 +1,8 @@
-;; Copyright 2000-2008 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(require "msg.ss"
"../generic/exceptions.ss")
(provide raise-backend-error)
View
10 postgresql/main.ss
@@ -1,11 +1,11 @@
-;; Copyright 2000-2008 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/class
- scheme/contract
- scheme/tcp
+#lang racket/base
+(require racket/class
+ racket/contract
+ racket/tcp
"../generic/main.ss"
"../generic/socket.ss"
"../generic/find-socket.ss"
View
46 postgresql/msg-util.ss
@@ -1,11 +1,11 @@
-;; Copyright 2000-2009 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require (for-syntax scheme/base)
- (for-syntax (planet "stx.ss" ("ryanc" "macros.plt" 1 1)))
- (planet "struct.ss" ("ryanc" "macros.plt" 1 1))
+#lang racket/base
+(require (for-syntax racket/base)
+ (for-syntax "../generic/unstable-syntax.ss")
+ "../generic/unstable-struct.ss"
"../generic/io.ss")
(provide (all-defined-out))
@@ -14,7 +14,7 @@
(define-struct-property message-parser)
;; Structures for messages
-(define-struct* msg () #:transparent)
+(define-struct msg () #:transparent)
(define-for-syntax stx@ datum->syntax)
@@ -32,21 +32,15 @@
[(header c) #'c]
[_ #f]))
stxs))
- (define (join sym stx)
- (datum->syntax
- stx
- (string->symbol
- (string-append (symbol->string sym)
- (symbol->string (syntax-e stx))))))
(syntax-case stx ()
[(_ name clause ...)
(let [(fields (apply append
(map gather-fields
(syntax-e #'(clause ...)))))]
(with-syntax ([(field ...) fields]
- [parse:name (stx@ #'name (symbol-append 'parse: #'name))]
- [write:name (stx@ #'name (symbol-append 'write: #'name))]
- [constructor (stx@ #'name (symbol-append 'make- #'name))])
+ [parse:name (format-id #'name "parse:~a" #'name)]
+ [write:name (format-id #'name "write:~a" #'name)]
+ [constructor (format-id #'name "make-~a" #'name)])
#`(begin
(define (parse:name p)
(msg-parser constructor p () clause ...))
@@ -62,28 +56,27 @@
[(define-msg-struct name (field ...))
#'(define-msg-struct name (field ...) #f)]
[(define-msg-struct name (field ...) descriminator)
- (with-syntax ([parser (stx@ #'name (symbol-append 'parse: #'name))]
- [writer (stx@ #'name (symbol-append 'write: #'name))])
+ (with-syntax ([parser (format-id #'name "parse:~a" #'name)]
+ [writer (format-id #'name "write:~a" #'name)])
#'(define-msg-struct name (field ...) descriminator parser writer))]
[(define-msg-struct name (field ...) descriminator parser writer)
- #'(define-struct* name (field ...)
- (#:super msg)
+ #'(define-struct (name msg) (field ...)
#:transparent
- (#:property message-parser parser)
- (#:property message-writer writer)
- (#:property message-parser-descrim descriminator))]))
+ #:property message-parser parser
+ #:property message-writer writer
+ #:property message-parser-descrim descriminator)]))
;; Message writers should never call flush-output directly.
(define-syntax (msg-writer stx)
(define (build-accessor struct field)
- (stx@ struct (symbol-append struct '- field)))
+ (format-id struct "~a-~a" struct field))
(define (++ a b) (and a b (+ a b)))
(define (compute-length clauses)
(cond [(null? clauses) 4] ;; the length field itself
[else
(syntax-case* (car clauses) (header literal field sequence)
- literal-identifier=?
+ (lambda (x y) (eq? (syntax-e x) (syntax-e y)))
[(literal type value)
(case (syntax-e #'type)
((#:int16) (++ 2 (compute-length (cdr clauses))))
@@ -100,7 +93,8 @@
((#:byte #:byte/char) (++ 1 (compute-length (cdr clauses))))
(else #f))]
[(sequence . _) #f])]))
- (syntax-case* stx (header literal field sequence) literal-identifier=?
+ (syntax-case* stx (header literal field sequence)
+ (lambda (x y) (eq? (syntax-e x) (syntax-e y)))
[(_ n v p)
#'(void)]
[(_ n v p (header c) clause ...)
@@ -233,7 +227,7 @@
(syntax-case stx ()
[(_ msg-name)
(identifier? #'msg-name)
- (let [(struct-type (stx@ #'msg-name (symbol-append 'struct: #'msg-name)))]
+ (let ([struct-type (format-id #'msg-name "struct:~a" #'msg-name)])
#`(cons (char->integer (message-parser-descrim-value #,struct-type))
(message-parser-value #,struct-type)))]
[(_ [char parser])
View
4 postgresql/msg.ss
@@ -1,8 +1,8 @@
-;; Copyright 2000-2009 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
+#lang racket/base
(require "../generic/sql-data.ss"
"../generic/io.ss"
"msg-util.ss")
View
8 postgresql/types.ss
@@ -1,5 +1,9 @@
-#lang scheme/base
-(require scheme/unit
+;; Copyright 2000-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
+(require racket/unit
"../generic/sql-data.ss"
"../generic/sql-format.ss")
(provide (all-defined-out))
View
6 postgresql/unit.ss
@@ -1,9 +1,9 @@
-;; Copyright 2000-2008 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
-#lang scheme/base
-(require scheme/unit
+#lang racket/base
+(require racket/unit
"../generic/signatures.ss"
"main.ss")
(provide postgresql@)
View
5 samples/mysql-sample.ss
@@ -1,6 +1,5 @@
-#lang scheme
-(require scheme/class
- "../mysql/main.ss")
+#lang racket
+(require "../mysql/main.ss")
(define c
(connect #:socket "/var/run/mysqld/mysqld.sock"
View
4 samples/sample1.ss
@@ -1,11 +1,11 @@
-;; Copyright 2000-2007 Ryan Culpepper
+;; Copyright 2000-2010 Ryan Culpepper
;; Released under the terms of the modified BSD license (see the file
;; COPYRIGHT for terms).
;; The following program demonstrates how to connect to a PostgreSQL backend
;; perform simple queries on the connection.
-(require scheme
+(require racket
"../main.ss")
;; Replace these values with the appropriate values for your
View
18 scribblings/config.ss
@@ -1,15 +1,17 @@
-#lang scheme/base
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
(require scribble/manual
scribble/eval
- scheme/sandbox
- (for-syntax scheme/base)
+ racket/sandbox
+ (for-syntax racket/base)
planet/util)
-(require (planet cce/scheme:3:0))
+(require (planet cce/scheme:7/scribble))
(provide (all-defined-out)
- (all-from-out (planet cce/scheme:3:0)))
-;; defmodule/this-package
-;; declare-exporting/this-package
+ (all-from-out (planet cce/scheme:7/scribble)))
(define (package-version)
(format "~a.~a" (this-package-version-maj) (this-package-version-min)))
@@ -19,7 +21,7 @@
(define the-eval (make-base-eval))
(void
(interaction-eval #:eval the-eval
- (require scheme/class
+ (require racket/class
"main.ss")))
(void
(interaction-eval #:eval the-eval
View
1  scribblings/connect.scrbl
@@ -4,7 +4,6 @@
scribble/eval
scribble/struct
scheme/sandbox
- (planet cce/scheme:3)
"config.ss"
(for-label scheme/base
scheme/contract
View
2  scribblings/database.scrbl
@@ -5,7 +5,7 @@
(for-label scheme/base)
(for-label "../generic/main.ss"))
-@title[#:version (package-version)]{database: Database connectivity}
+@title[#:version (package-version)]{db: Database connectivity}
@author{Ryan Culpepper}
@section-index["postgresql"]
View
1  scribblings/example.scrbl
@@ -4,7 +4,6 @@
scribble/eval
scribble/struct
scheme/sandbox
- (planet cce/scheme:3)
"config.ss")
@(require (for-label scheme/base)
(for-label "../main.ss"))
View
6 scribblings/tabbing.ss
@@ -1,4 +1,8 @@
-#lang scheme/base
+;; Copyright 2009-2010 Ryan Culpepper
+;; Released under the terms of the modified BSD license (see the file
+;; COPYRIGHT for terms).
+
+#lang racket/base
(require scribble/struct
scribble/basic)
(provide & // tabbing)
Please sign in to comment.
Something went wrong with that request. Please try again.