r9447: * sql/*.lisp: Add db-type parameter to generic functions READ-SQL...
[clsql.git] / sql / generic-odbc.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;;
4 ;;;; $Id$
5 ;;;;
6 ;;;; Generic ODBC layer, used by db-odbc and db-aodbc backends
7 ;;;;
8 ;;;; This file is part of CLSQL.
9 ;;;;
10 ;;;; CLSQL users are granted the rights to distribute and use this software
11 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
12 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
13 ;;;; *************************************************************************
14
15 (in-package #:clsql-sys)
16
17 (defclass generic-odbc-database (database)
18   ()
19   (:documentation "Encapsulate same behavior across odbc and aodbc backends."))
20
21 (defmethod read-sql-value (val (type (eql 'boolean))
22                            (database generic-odbc-database)
23                            (db-type (eql :postgresql)))
24   (if (string= "0" val) nil t))
25