-(defmethod list-all-table-columns (table (db oracle-database))
- (declare (string table))
- (let* ((sql-stmt (concatenate
- 'simple-string
- "select "
- "'',"
- "all_tables.OWNER,"
- "'',"
- "user_tab_columns.COLUMN_NAME,"
- "user_tab_columns.DATA_TYPE from user_tab_columns,"
- "all_tables where all_tables.table_name = '" table "'"
- " and user_tab_columns.table_name = '" table "'"))
- (preresult (database-query sql-stmt db :auto nil)))
- ;; PRERESULT is like RESULT except that it has a name instead of
- ;; type codes in the fifth column of each row. To fix this, we
- ;; destructively modify PRERESULT.
- (dolist (preresult-row preresult)
- (setf (fifth preresult-row)
- (if (find (fifth preresult-row)
- #("NUMBER" "DATE")
- :test #'string=)
- 2 ; numeric
- 1))) ; string
- preresult))