[CONTRIB-55] clojure.contrib.sql expects *err* to be a PrintWriter Created: 31/Dec/09 Updated: 24/Apr/11 |
|
| Status: | In Progress |
| Project: | Clojure-Contrib |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | ||
| Reporter: | Anonymous | Assignee: | Stephen C. Gilardi |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The problem is that c.c.sql.internal calls `.println` on a "stream" to print update counts and errors. That method only exists on a `PrintWriter`. This isn't true within Slime, where it's a `StringWriter`. The attached patch binds `out` and uses `println` instead, which does the right thing. I've augmented the docstrings to request a `Writer` as the value of `stream`, which aligns with the docstring for `print`. |
| Comments |
| Comment by Assembla Importer [ 24/Aug/10 8:43 AM ] |
|
Converted from http://www.assembla.com/spaces/clojure/tickets/55 |
| Comment by Assembla Importer [ 24/Aug/10 8:43 AM ] |
|
rnewman said: [file:btl6lW9Mmr3OPceJe5aVNr]: Diff against current head. |
| Comment by Assembla Importer [ 24/Aug/10 8:43 AM ] |
|
stuart.sierra said: Updating tickets (#1, #2, #3, #4, #6, #20, #23, #25, #30, #31, #33, #34, #35, #37, #38, #52, #55, #58, #59, #60, #61, #62, #63, #64) |
| Comment by Assembla Importer [ 24/Aug/10 8:43 AM ] |
|
scgilardi said: Following the discussion in the developer group and as suggested by Stuart Halloway, I'm planning to make these changes: [1] adopt the substance of Richard Newman's patch, changes to sql.internal's print-sql-exception, print-sql-exception-chain, print-update-counts functions |
| Comment by Sean Corfield [ 24/Apr/11 10:49 PM ] |
|
This will be addressed in clojure.java.jdbc and needs to be migrated to the new JIRA project for it once that is created (I don't have permission to do anything beyond comment / clone this issue). |