created a command object function to slim down the typing neccessary to use one
[clsql.git] / sql / generic-postgresql.lisp
index 70a8e9fb9dc8aa5887ad2f81e07faa26f83efefd..5498ee2d0114f43cd2a5a77044da7df4b3cba972 100644 (file)
 
 
 ;; Object functions
+(defmethod database-output-sql-as-type ((type (eql 'float)) val database (db-type (eql :postgresql)))
+  (declare (ignore database db-type))
+  val)
+
+(defmethod database-output-sql-as-type ((type (eql 'float)) val database (db-type (eql :postgresql-socket)))
+  (declare (ignore database db-type))
+  val)
+
+(defmethod database-output-sql ((self wall-time) (database generic-postgresql-database))
+  (declare (ignore database))
+  (concatenate 'string "'" (format-time nil self :format :iso8601)  "'"))
+
+(defmethod database-output-sql ((self date) (database generic-postgresql-database))
+  (declare (ignore database))
+  (concatenate 'string "'" (format-time nil (date->time self) :format :iso8601)  "'"))
 
 (defmethod database-get-type-specifier (type args database
                                         (db-type (eql :postgresql)))