X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-oracle%2Foracle-objects.lisp;h=84a352cba819c6f99619f004e42874ecd763c811;hb=e5a6fadf80e923a4fa08fbb8af16652d7970983e;hp=e8993183ce9709fc97a70d180db3541ed1e0c727;hpb=48652576baf88a7dcde5649cec889228aa7b5133;p=clsql.git diff --git a/db-oracle/oracle-objects.lisp b/db-oracle/oracle-objects.lisp index e899318..84a352c 100644 --- a/db-oracle/oracle-objects.lisp +++ b/db-oracle/oracle-objects.lisp @@ -2,11 +2,11 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: oracle-objects.lisp +;;;; Name: oracle-objects.lisp ;;;; ;;;; $Id$ ;;;; -;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; This file is part of CLSQL. ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License @@ -69,9 +69,14 @@ (or (first args) 38) (or (second args) 38)) "NUMBER")) +(defmethod database-get-type-specifier + ((type (eql 'boolean)) args (database oracle-database)) + (declare (ignore args)) + "CHAR(1)") + (defmethod read-sql-value (val type (database oracle-database)) - (declare (ignore type database)) ;;(format t "value is \"~A\" of type ~A~%" val (type-of val)) + (declare (ignore type)) (etypecase val (string (read-from-string val)) @@ -84,22 +89,22 @@ (defmethod read-sql-value (val (type (eql 'integer)) (database oracle-database)) - (declare (ignore database)) val) (defmethod read-sql-value (val (type (eql 'float)) (database oracle-database)) val) -;;; LOCAL-TIME stuff that needs to go into hooks -#+local-time -(defmethod clsql::database-get-type-specifier - ((type (eql 'local-time::local-time)) args (database oracle-database)) +(defmethod read-sql-value (val (type (eql 'boolean)) (database oracle-database)) + (when (char-equal #\t (schar val 0)) + t)) + +(defmethod database-get-type-specifier + ((type (eql 'wall-time)) args (database oracle-database)) (declare (ignore args)) "DATE") -#+local-time -(defmethod clsql::database-get-type-specifier - ((type (eql 'local-time::duration)) +(defmethod database-get-type-specifier + ((type (eql 'duration)) args (database oracle-database)) (declare (ignore args))