           (where {:owner owner :table_name tab-name})
           (order :column_id)))
 
-(defn get-idx-desc [owner idx-name]
+(defn get-idx-desc [owner tab-name]
   (->> (select all_ind_columns
-               (fields :table_name :index_name :column_position :column_name)
-               (where {:index_owner owner :index_name idx-name})
-               (order :column_position))
-       (map #(:column_name %))
-       (str/join "+")))
+               (fields :index_name :column_position :column_name)
+               (where {:table_owner owner :table_name tab-name}))
+       (group-by #(% :index_name))))

(defentity all_tab_comments)
(defentity all_col_comments)

;; (->> (select employees (fields [:FIRST_NAME :fn] [:LAST_NAME :ln]))
;;      (map #(str (% :fn) " " (% :ln))))

(defn get-tab-stat [owner tab-name]
  (select all_tables

  {:classname "oracle.jdbc.OracleDriver"
   :subprotocol "oracle"
   :subname "thin:@192.168.1.83:1521:testdb"
   :user "xxx"
   :password "xxx"
   :naming {:keys str/lower-case :fields str/upper-case}})

;; (def db-spec
