You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
648 B
Scheme
25 lines
648 B
Scheme
;; Postgresql implementation of ssql
|
|
(module ssql-pgsql
|
|
|
|
(*pgsql-translator*)
|
|
|
|
(import chicken scheme)
|
|
(use ssql postgresql foops)
|
|
|
|
(define *pgsql-translator*
|
|
(let ((type->sql-converters
|
|
`((,boolean? . boolean->sql)
|
|
,@(*ansi-translator* 'type->sql-converters))))
|
|
|
|
(derive-object (*ansi-translator*)
|
|
((escape-string string)
|
|
(escape-string (ssql-connection) string))
|
|
|
|
((boolean->sql boolean)
|
|
(if boolean "'t'" "'f'"))
|
|
|
|
((type->sql-converters) type->sql-converters))))
|
|
|
|
(register-sql-engine! connection? *pgsql-translator*)
|
|
|
|
) |