* sql/classes.lisp: honor case of string tables when outputting queries
* sql/objects.lisp: Add database type to default database-get-type-specifier method
* sql/sql.lisp: Add database type to default database-abort-transaction method
+ * db-mysql/mysql-objects.lisp: New file
+ * sql/objects.lisp: Move MySQL specific code to mysql-objects.lisp
* sql/utils.lisp: Add GETENV function which will be used to get ORACLE_HOME
from environment
* test/test-fdml.lisp: String table names are now case sensitive, so convert to
default db case for FDML/SELECT/25
+>>>>>>> .r9445
22 May 2004 Kevin Rosenberg
* Version 2.10.20 released: Oracle backend now fails 6 out of 200 tests
* TODO: Added 2 variances from CommonSQL. Add tests for owner phrases
(:file "mysql-loader" :depends-on ("mysql-package" "mysql"))
(:file "mysql-client-info" :depends-on ("mysql-loader"))
(:file "mysql-api" :depends-on ("mysql-client-info"))
- (:file "mysql-sql" :depends-on ("mysql-api"))))))
+ (:file "mysql-sql" :depends-on ("mysql-api"))
+ (:file "mysql-objects" :depends-on ("mysql-sql"))))))
--- /dev/null
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name: mysql-objects.lisp
+;;;; Purpose: CLSQL Object layer for MySQL
+;;;; Created: May 2004
+;;;;
+;;;; $Id: mysql-sql.lisp 9403 2004-05-19 23:46:45Z kevin $
+;;;;
+;;;; CLSQL users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+;;;; *************************************************************************
+
+(in-package #:clsql-mysql)
+
+(defmethod database-get-type-specifier ((type (eql 'wall-time)) args (database mysql-database))
+ (declare (ignore args))
+ "DATETIME")
+
+(defmethod database-output-sql-as-type ((type (eql 'boolean)) val (database mysql-database))
+ (if val 1 0))
+
+(defmethod read-sql-value (val (type (eql 'boolean)) (database mysql-database))
+ (etypecase val
+ (string (if (string= "0" val) nil t))
+ (integer (if (zerop val) nil t))))
(case (database-underlying-type database)
((:postgresql :postgresql-socket)
"TIMESTAMP WITHOUT TIME ZONE")
- (:mysql
- "DATETIME")
(t "TIMESTAMP")))
(defmethod database-get-type-specifier ((type (eql 'duration)) args database)
(prin1-to-string val)))
(defmethod database-output-sql-as-type ((type (eql 'boolean)) val database)
- (case (database-underlying-type database)
- (:mysql
- (if val 1 0))
- (t
- (if val "t" "f"))))
+ (declare (ignore database))
+ (if val "t" "f"))
(defmethod database-output-sql-as-type ((type (eql 'string)) val database)
(declare (ignore database))
(defmethod read-sql-value (val (type (eql 'boolean)) database)
(case (database-underlying-type database)
- (:mysql
- (etypecase val
- (string (if (string= "0" val) nil t))
- (integer (if (zerop val) nil t))))
(:postgresql
(if (eq :odbc (database-type database))
(if (string= "0" val) nil t)