Import from scsh trunk

This commit is contained in:
eknauel 2004-02-11 07:29:09 +00:00
parent 99e0cd7d7d
commit 26ec2f9283
4 changed files with 2806 additions and 0 deletions

1438
scheme/odbc-interfaces.scm Normal file

File diff suppressed because it is too large Load Diff

12
scheme/odbc-packages.scm Normal file
View File

@ -0,0 +1,12 @@
(define-structure low-odbc low-odbc-interface
(open
scheme external-calls scsh-utilities
srfi-1 define-record-types
conditions signals
low-odbc-constants)
(files odbc))
(define-structure low-odbc-constants low-odbc-constants-interface
(open scheme)
(files
odbc-constants))

70
scheme/odbc-types.scm Normal file
View File

@ -0,0 +1,70 @@
(define-record-type sql-date :sql-date
(make-sql-date year month day)
sql-date?
(year sql-date-year)
(month sql-date-month)
(day sql-date-day))
(define-record-discloser :sql-date
(lambda (rec)
`(sql-date year ,(sql-date-year rec)
month ,(sql-date-month rec)
day ,(sql-date-day rec))))
(define-exported-binding "sql-date-record-type" :sql-date)
(define-record-type sql-time :sql-time
(make-sql-time hour minute second)
sql-time?
(hour sql-time-hour)
(minute sql-time-minute)
(second sql-time-second))
(define-record-discloser :sql-time
(lambda (rec)
`(sql-time hour ,(sql-time-hour rec)
minute ,(sql-time-minute rec)
second ,(sql-time-second rec))))
(define-exported-binding "sql-time-record-type" :sql-time)
(define-record-type sql-timestamp :sql-timestamp
(make-sql-timestamp year month day hour minute second fraction)
sql-timestamp?
(year sql-timestamp-year)
(month sql-timestamp-month)
(day sql-timestamp-day)
(hour sql-timestamp-hour)
(minute sql-timestamp-minute)
(second sql-timestamp-second)
(fraction sql-timestamp-fraction))
(define-record-discloser :sql-timestamp
(lambda (rec)
`(sql-timestamp year ,(sql-timestamp-year rec)
month ,(sql-timestamp-month rec)
day ,(sql-timestamp-day rec)
hour ,(sql-timestamp-hour rec)
minute ,(sql-timestamp-minute rec)
second ,(sql-timestamp-second rec)
fraction ,(sql-timestamp-fraction rec))))
(define-exported-binding "sql-timestamp-record-type" :sql-timestamp)
(define-record-type sql-numeric :sql-numeric
(make-sql-numeric precision scale sign value)
sql-numeric?
(precision sql-numeric-precision)
(scale sql-numeric-scale)
(sign sql-numeric-sign)
(value sql-numeric-value))
(define-record-discloser :sql-numeric
(lambda (rec)
`(sql-numeric precision ,(sql-numeric-precision rec)
scale ,(sql-numeric-scale rec)
sign ,(sql-numeric-sign rec)
value ,(sql-numeric-value rec))))
(define-exported-binding "sql-numeric" :sql-numeric)

1286
scheme/odbc.scm Normal file

File diff suppressed because it is too large Load Diff