/usr/share/common-lisp/source/clsql-mysql/db-mysql/mysql-objects.lisp is in cl-sql-mysql 6.4.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: mysql-objects.lisp
;;;; Purpose: CLSQL Object layer for MySQL
;;;; Created: May 2004
;;;;
;;;; 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
(db-type (eql :mysql)))
(declare (ignore args database))
"DATETIME")
(defmethod database-get-type-specifier ((type (eql 'smallint)) args database
(db-type (eql :mysql)))
(declare (ignore args database))
"SMALLINT")
(defmethod database-get-type-specifier ((type (eql 'mediumint)) args database
(db-type (eql :mysql)))
(declare (ignore args database))
"MEDIUMINT")
(defmethod database-get-type-specifier ((type (eql 'tinyint)) args database
(db-type (eql :mysql)))
(declare (ignore args database))
"TINYINT")
(defmethod database-output-sql-as-type ((type (eql 'boolean)) val database
(db-type (eql :mysql)))
(declare (ignore database))
(if val 1 0))
(defmethod database-output-sql-as-type ((type (eql 'generalized-boolean)) val database
(db-type (eql :mysql)))
(declare (ignore database))
(if val 1 0))
(defmethod read-sql-value (val (type (eql 'boolean)) database
(db-type (eql :mysql)))
(declare (ignore database))
(etypecase val
(string (if (string= "0" val) nil t))
(integer (if (zerop val) nil t))))
(defmethod read-sql-value (val (type (eql 'generalized-boolean)) database
(db-type (eql :mysql)))
(declare (ignore database))
(etypecase val
(string (if (string= "0" val) nil t))
(integer (if (zerop val) nil t))))
|