1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: mysql-objects.lisp
6 ;;;; Purpose: CLSQL Object layer for MySQL
9 ;;;; CLSQL users are granted the rights to distribute and use this software
10 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
11 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
12 ;;;; *************************************************************************
14 (in-package #:clsql-mysql)
16 (defmethod database-get-type-specifier ((type symbol) args database
17 (db-type (eql :mysql)))
18 (declare (ignore args database db-type))
20 (wall-time "DATETIME")
23 (mediumint "MEDIUMINT")
24 (t (call-next-method))))
26 (defmethod read-sql-value (val (type (eql 'boolean)) database
27 (db-type (eql :mysql)))
28 (declare (ignore database))
30 (string (if (string= "0" val) nil t))
31 (integer (if (zerop val) nil t))))
33 (defmethod read-sql-value (val (type (eql 'generalized-boolean)) database
34 (db-type (eql :mysql)))
35 (declare (ignore database))
37 (string (if (string= "0" val) nil t))
38 (integer (if (zerop val) nil t))))