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 (eql 'wall-time)) args database
17 (db-type (eql :mysql)))
18 (declare (ignore args database))
21 (defmethod database-get-type-specifier ((type (eql 'smallint)) args database
22 (db-type (eql :mysql)))
23 (declare (ignore args database))
26 (defmethod database-get-type-specifier ((type (eql 'mediumint)) args database
27 (db-type (eql :mysql)))
28 (declare (ignore args database))
31 (defmethod database-get-type-specifier ((type (eql 'tinyint)) args database
32 (db-type (eql :mysql)))
33 (declare (ignore args database))
36 (defmethod database-output-sql-as-type ((type (eql 'boolean)) val database
37 (db-type (eql :mysql)))
38 (declare (ignore database))
41 (defmethod database-output-sql-as-type ((type (eql 'generalized-boolean)) val database
42 (db-type (eql :mysql)))
43 (declare (ignore database))
46 (defmethod read-sql-value (val (type (eql 'boolean)) database
47 (db-type (eql :mysql)))
48 (declare (ignore database))
50 (string (if (string= "0" val) nil t))
51 (integer (if (zerop val) nil t))))
53 (defmethod read-sql-value (val (type (eql 'generalized-boolean)) database
54 (db-type (eql :mysql)))
55 (declare (ignore database))
57 (string (if (string= "0" val) nil t))
58 (integer (if (zerop val) nil t))))