db: minimize dependencies

This commit is contained in:
Ryan Culpepper 2011-09-24 02:28:57 -06:00
parent 36149b92a7
commit 52a738140d
10 changed files with 13 additions and 15 deletions

View File

@ -1,5 +1,5 @@
#lang racket/base #lang racket/base
(require racket/contract (require racket/contract/base
unstable/prop-contract) unstable/prop-contract)
;; ============================================================ ;; ============================================================

View File

@ -1,7 +1,7 @@
#lang racket/base #lang racket/base
(require (for-syntax racket/base) (require (for-syntax racket/base)
unstable/lazy-require unstable/lazy-require
racket/contract racket/contract/base
"base.rkt") "base.rkt")
(provide (all-from-out "base.rkt")) (provide (all-from-out "base.rkt"))

View File

@ -1,5 +1,5 @@
#lang racket/base #lang racket/base
(require racket/contract (require racket/contract/base
openssl openssl
"base.rkt" "base.rkt"
"private/mysql/main.rkt") "private/mysql/main.rkt")

View File

@ -1,5 +1,5 @@
#lang racket/base #lang racket/base
(require racket/contract (require racket/contract/base
"base.rkt" "base.rkt"
"private/odbc/main.rkt") "private/odbc/main.rkt")

View File

@ -1,5 +1,5 @@
#lang racket/base #lang racket/base
(require racket/contract (require racket/contract/base
openssl openssl
"base.rkt" "base.rkt"
"private/postgresql/main.rkt") "private/postgresql/main.rkt")

View File

@ -1,6 +1,6 @@
#lang racket/base #lang racket/base
(require unstable/lazy-require (require unstable/lazy-require
racket/match syntax/parse/private/minimatch
racket/file racket/file
racket/list) racket/list)
(provide dsn-connect (provide dsn-connect

View File

@ -1,6 +1,6 @@
#lang racket/base #lang racket/base
(require racket/class (require racket/class
racket/match syntax/parse/private/minimatch
racket/place racket/place
racket/promise racket/promise
racket/serialize racket/serialize

View File

@ -1,7 +1,7 @@
#lang racket/base #lang racket/base
(require (for-syntax racket/base) (require (for-syntax racket/base)
racket/class racket/class
racket/match syntax/parse/private/minimatch
racket/place racket/place
racket/serialize racket/serialize
unstable/lazy-require unstable/lazy-require

View File

@ -1,17 +1,15 @@
#lang racket/base #lang racket/base
(require ffi/unsafe (require ffi/unsafe
ffi/file ffi/file)
(rename-in racket/contract [-> c->])) (provide unix-socket-connect)
(provide/contract
[unix-socket-connect
(c-> path-string?
(values input-port? output-port?))])
;; The solaris code is untested (and thus disabled). ;; The solaris code is untested (and thus disabled).
;; unix-socket-connect : pathlike -> input-port output-port ;; unix-socket-connect : pathlike -> input-port output-port
;; Connects to the unix domain socket associated with the given path. ;; Connects to the unix domain socket associated with the given path.
(define (unix-socket-connect path0) (define (unix-socket-connect path0)
(unless (path-string? path0)
(raise-type-error 'unix-socket-connect "path or string" path0))
(security-guard-check-file 'unix-socket-connect path0 '(read write)) (security-guard-check-file 'unix-socket-connect path0 '(read write))
(let* ([path* (cleanse-path (path->complete-path path0))] (let* ([path* (cleanse-path (path->complete-path path0))]
[path-b (path->bytes path*)]) [path-b (path->bytes path*)])

View File

@ -1,5 +1,5 @@
#lang racket/base #lang racket/base
(require racket/contract (require racket/contract/base
"base.rkt" "base.rkt"
"private/sqlite3/main.rkt") "private/sqlite3/main.rkt")