 (ns clojars.db
   (:use [clojars :only [config]]
         clojure.contrib.sql
-        clojure.contrib.duck-streams
-        [clojure.contrib.str-utils2 :only [join]])
+        clojure.contrib.duck-streams)
+  (:require [clojure.string :as str])
   (:import java.security.MessageDigest
            java.util.Date
            java.io.File))

       :created    (Date.)
       :description (:description jarmap)
       :homepage   (:homepage jarmap)
       :authors    (join ", " (map #(.replace % "," "")
                                   (:authors jarmap)))}))))

(defn search-jars [query & [offset]]
  ;; TODO make search less stupid, figure out some relevance ranking

            "content match ?"
            "limit 50 "
            "offset ?")
       (quote-hyphanated query)
       (or offset 0)]
    ;; TODO: do something less stupidly slow
    (vec (map #(find-jar (:group_name %) (:jar_name %)) rs))))
