ssql: add ssql-pgsql (whoops)
git-svn-id: https://code.call-cc.org/svn/chicken-eggs/release/4/ssql/trunk@22896 fca3e652-9b03-0410-8d7b-ac86a6ce46c4master
parent
1c67cd0c36
commit
9dfb01510d
@ -0,0 +1,25 @@
|
||||
;; 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*)
|
||||
|
||||
)
|
Loading…
Reference in New Issue