(:boolean-ptr
(uffi:with-foreign-object (fo :byte)
(setf (uffi:deref-pointer fo :byte)
- (if (or (zerop value) (null value))
- 0
- 1))
+ (case value
+ ((nil 0) 0)
+ (t 1)))
(mysql-options mysql-ptr option-code fo)))))))))))
(defmethod database-connect (connection-spec (database-type (eql :mysql)))
(unless (find col results :test #'string-equal)
(push col results)))))
-(defmethod database-list-attributes ((table string) (database mysql-database)
- &key (owner nil))
+(defmethod database-list-attributes ((table clsql-sys::%database-identifier)
+ (database mysql-database)
+ &key (owner nil)
+ &aux (table (unescaped-database-identifier table)))
(declare (ignore owner))
(mapcar #'car
(database-query
table database))
database nil nil)))
-(defmethod database-attribute-type (attribute (table string)
+(defmethod database-attribute-type ((attribute clsql-sys::%database-identifier)
+ (table clsql-sys::%database-identifier)
(database mysql-database)
- &key (owner nil))
+ &key (owner nil)
+ &aux (table (unescaped-database-identifier table))
+ (attribute (unescaped-database-identifier attribute)))
(declare (ignore owner))
(let ((row (car (database-query
(format nil