+ "select column_name from user_tab_columns where table_name='~A'~A"
+ table
+ (if owner
+ (format nil " AND OWNER='~A'" owner)
+ ""))
+ database nil nil)))
+
+(defmethod database-attribute-type (attribute (table string)
+ (database oracle-database)
+ &key (owner nil))
+ (let ((rows
+ (database-query
+ (format nil
+ "select data_type,data_length,data_precision,data_scale,nullable from user_tab_columns where table_name='~A' and column_name='~A'~A"
+ table attribute
+ (if owner
+ (format nil " AND OWNER='~A'" owner)
+ ""))
+ database :auto nil)))
+ (destructuring-bind (type length precision scale nullable) (car rows)
+ (values (ensure-keyword type) length precision scale
+ (if (char-equal #\Y (schar nullable 0)) 1 0)))))
+