java.jdbc

Both :identifiers and :entities should be ident? -> ident? functions

Details

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

Description

Although originally intended to both be String -> String, the docs are not clear and, up until :qualifiers was added, String -> Keyword worked for :identifiers. @Bronsa pointed this out https://github.com/clojure/java.jdbc/commit/6934d169cc2b4140138ccad8018c858e5c51ba8e#commitcomment-18758345 and the code should be updated so both work. This should be reflected in the new jdbc.spec namespace as well (currently the types of those functions is not specified).

Activity

Hide
Nicola Mometto added a comment - - edited

Two cases that the `qualifier` change has broken:
1-

(jdbc/query conn ["SELECT 1 AS \"foo/bar\""] {:result-set-fn first})

the key for this map is now a keyword with namespace = `nil` and name = `foo/bar` while previously it used to be a keyword with namespace `foo` and name = `bar`

2-

(jdbc/query conn ["SELECT 1 AS x"] {:identifiers keyword})

this used to return correctly but now fails because `(keyword nil :x)` throws an exception while `(keyword :x)` works as expected.

Show
Nicola Mometto added a comment - - edited Two cases that the `qualifier` change has broken: 1-
(jdbc/query conn ["SELECT 1 AS \"foo/bar\""] {:result-set-fn first})
the key for this map is now a keyword with namespace = `nil` and name = `foo/bar` while previously it used to be a keyword with namespace `foo` and name = `bar` 2-
(jdbc/query conn ["SELECT 1 AS x"] {:identifiers keyword})
this used to return correctly but now fails because `(keyword nil :x)` throws an exception while `(keyword :x)` works as expected.
Hide
Sean Corfield added a comment -

Fixed in 0.6.2-alpha3 (coming soon).

Show
Sean Corfield added a comment - Fixed in 0.6.2-alpha3 (coming soon).
Hide
Sean Corfield added a comment -

Release 0.6.2-alpha3.

Show
Sean Corfield added a comment - Release 0.6.2-alpha3.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: