Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get-document returns database status, not nil or empty map, if key is nil #62

Open
kenrestivo opened this issue May 24, 2012 · 1 comment

Comments

@kenrestivo
Copy link

(get-document db nil)
;; returns
{:disk_format_version 5, :db_name "authtest", :doc_del_count 2, :disk_size 16473, :update_seq 4, :purge_seq 0, :compact_running false, :instance_start_time "1337823661155614", :doc_count 0}
;; and not nil

Some libraries depend upon get-document returning nil if the key is nil, so I ended up with this: kenrestivo/couch-session@145e5b7

@cemerick
Copy link
Contributor

I think that prior behaviour of get-document is wrong. I've changed master to match it (nil or empty keys now return nil from get-document), but I think it should probably throw a NullPointerException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants