              {(k result) (v result)})))
 
 (defn select-field->id
-  "Select FIELD and `:id` from objects in the database, and return them as a map from FIELD to `:id`.
+  "Select FIELD and `:id` from objects in the database, and return them as a map from `field` to `:id`.
 
      (select-field->id :name 'Database) -> {\"Sample Dataset\" 1, \"test-data\" 2}"
   {:style/indent 2}

(defn simple-select-one
  "Select a single object from the database.

   Like `select-one`, but doesn't offer as many conveniences, so prefer that instead; like `select-one`,
   `simple-select-one` callts `post-select` on the results, but unlike `select-one`, only accepts a single
   raw HoneySQL form as an argument.

     (db/simple-select-one 'User (h/where [:= :first-name \"Cam\"]))"
  ([model]
   (simple-select-one model {}))
  ([model honeysql-form]
   (first (simple-select model (h/limit honeysql-form 1)))))

(defn execute!
  "Compile HONEYSQL-FORM and call `jdbc/execute!` against the application DB.
   OPTIONS are passed directly to `jdbc/execute!` and can be things like `:multi?` (default `false`)
   or `:transaction?` (default `true`)."
  [honeysql-form & {:as options}]
  (jdbc/execute! (connection) (honeysql->sql honeysql-form) options))


  (apply select-field->field field :id model options))

(defn select-id->field
  "Select `field` and `:id` from objects in the database, and return them as a map from `:id` to `field`.

     (select-id->field :name 'Database) -> {1 \"Sample Dataset\", 2 \"test-data\"}"
  {:style/indent 2}
