<< Back to previous view

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

Status: Closed
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

OS X Clojure 1.5.1 clojure.jdbc 0.3-alpha4


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

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 Sun Jan 21 10:54:20 CST 2018 using JIRA 4.4#649-r158309.