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 read-sql-value (val (type (eql 'boolean)) database
37 (db-type (eql :mysql)))
38 (declare (ignore database))
40 (string (if (string= "0" val) nil t))
41 (integer (if (zerop val) nil t))))
43 (defmethod read-sql-value (val (type (eql 'generalized-boolean)) database
44 (db-type (eql :mysql)))
45 (declare (ignore database))
47 (string (if (string= "0" val) nil t))
48 (integer (if (zerop val) nil t))))