java.jdbc

Provide global options in the db-spec map

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Now that options processing is much more streamlined, it's worth taking another look at whether it is reasonable to support global default options in the db-spec map itself (assuming it is a map). This would be particularly valuable for :identifiers, :qualifier, and :entities.

Activity

Hide
Sean Corfield added a comment -

This would be pretty straightforward based on adopting an idiom, in each function where both db and options can be passed, like this:

(defn ...
  [... opts]
  (let [{:keys [useful options]} (merge default-opts (when (map? db) db) opts] ..))

It will touch a lot of code tho'...

Show
Sean Corfield added a comment - This would be pretty straightforward based on adopting an idiom, in each function where both db and options can be passed, like this:
(defn ...
  [... opts]
  (let [{:keys [useful options]} (merge default-opts (when (map? db) db) opts] ..))
It will touch a lot of code tho'...
Hide
Sean Corfield added a comment -

Will be 0.6.2.

Show
Sean Corfield added a comment - Will be 0.6.2.
Hide
Sean Corfield added a comment -

Releasing 0.6.2-alpha1 with this change.

Show
Sean Corfield added a comment - Releasing 0.6.2-alpha1 with this change.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: