ssql: move ssql-pgsql into a separate egg to remove the postgresql dependency and rename it to ssql-postgresql in the course to match with awful-postgresql and autoform-postgresql

git-svn-id: https://code.call-cc.org/svn/chicken-eggs/release/4/ssql/trunk@22911 fca3e652-9b03-0410-8d7b-ac86a6ce46c4
master
syn 14 years ago
parent 33c17eb471
commit a05efe2ad3

@ -1,25 +0,0 @@
;; 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*)
)

@ -1,3 +1,2 @@
(standard-extension 'foops #f) (standard-extension 'foops #f)
(standard-extension 'ssql #f) (standard-extension 'ssql #f)
(standard-extension 'ssql-pgsql #f)

@ -1,18 +0,0 @@
(load-relative "../ssql-pgsql")
(import ssql)
(import ssql-pgsql)
(use test postgresql foops)
(define *test-pgsql-translator*
(derive-object (*pgsql-translator* self super)
((escape-string string)
(super (ssql-connection) string))))
(register-sql-engine! (lambda (x) (eq? x #t)) *test-pgsql-translator*)
(test-begin "selects")
(test "Simple query"
"SELECT actors.firstname, actors.lastname FROM actors"
(ssql->sql #t `(select (columns actors.firstname actors.lastname)
(from actors))))
(test-end "selects")

@ -2,7 +2,5 @@
(load-relative "../ssql") (load-relative "../ssql")
(load-relative "transformations-test") (load-relative "transformations-test")
(load-relative "ansi-test") (load-relative "ansi-test")
;; (load "mysql-test")
(load-relative "pgsql-test")
(test-exit) (test-exit)
Loading…
Cancel
Save