From a05efe2ad3c81ed44f8f2d02fb2d3879626d7fdc Mon Sep 17 00:00:00 2001 From: syn Date: Sun, 27 Feb 2011 21:13:35 +0000 Subject: [PATCH] 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 --- ssql-pgsql.scm | 25 ------------------------- ssql.setup | 1 - tests/pgsql-test.scm | 18 ------------------ tests/run.scm | 2 -- 4 files changed, 46 deletions(-) delete mode 100644 ssql-pgsql.scm delete mode 100644 tests/pgsql-test.scm diff --git a/ssql-pgsql.scm b/ssql-pgsql.scm deleted file mode 100644 index 0298e62..0000000 --- a/ssql-pgsql.scm +++ /dev/null @@ -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*) - -) \ No newline at end of file diff --git a/ssql.setup b/ssql.setup index 441fc9c..4ca29cb 100644 --- a/ssql.setup +++ b/ssql.setup @@ -1,3 +1,2 @@ (standard-extension 'foops #f) (standard-extension 'ssql #f) -(standard-extension 'ssql-pgsql #f) diff --git a/tests/pgsql-test.scm b/tests/pgsql-test.scm deleted file mode 100644 index 75e0824..0000000 --- a/tests/pgsql-test.scm +++ /dev/null @@ -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") \ No newline at end of file diff --git a/tests/run.scm b/tests/run.scm index 348f3e8..a1cdafa 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -2,7 +2,5 @@ (load-relative "../ssql") (load-relative "transformations-test") (load-relative "ansi-test") -;; (load "mysql-test") -(load-relative "pgsql-test") (test-exit) \ No newline at end of file