 (ns dynamodb-expression.core
   (:require [clojure.string :as st]))
 
-(defn sanitize-placeholder [ph]
+(defn- sanitize-placeholder [ph]
   (st/replace ph #"[^0-9a-zA-Z_]" "_"))
 
 (defn update-expr []

(defn- attr-map [name-or-value key ops]
  (->> ops
       (map (juxt name-or-value key))
       ;; (remove #(some nil? %))
       (into {})))

(defn expr [{:keys [ops] :as expr}]

       (group-by :op)
       (into (sorted-map))
       (reduce (fn [ex [op ops]]
                 (->> ops
                      (keep :expr-part)
                      (st/join ", ")
                      (str ex (when ex " ") (st/upper-case (name op)) " ")))
               nil)))
