<< Back to previous view

[JDBC-60] insert! is not documented to always return a sequence of generated keys Created: 26/May/13  Updated: 15/Sep/13  Resolved: 15/Sep/13

Status: Resolved
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Trivial
Reporter: Christian Sperandio Assignee: Sean Corfield
Resolution: Declined Votes: 0
Labels: None
Environment:

OS X Clojure 1.5.1 clojure.jdbc 0.3-alpha4



 Description   

The insert! function always returns a sequence of keys even if only one recored is inserted.



 Comments   
Comment by Sean Corfield [ 26/May/13 9:58 AM ]

I think this is more consistent than returning a sequence sometimes and a single value other times. If you want the first key, you know you're always safe to call `first` on the result. I'll probably just update the docstring to make that clearer what happens for different circumstances.

Comment by Christian Sperandio [ 26/May/13 10:21 AM ]

I agree with you about the consistency to return always a sequence.
I was afraid about a future change (closer of the insert-record function) that would break the current behavior.

Comment by Sean Corfield [ 15/Sep/13 4:12 PM ]

This is a documentation issue and the documentation is now editable by the community in its new home on http://clojure-doc.org

Generated at Wed Nov 26 00:42:46 CST 2014 using JIRA 4.4#649-r158309.