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

Checking for the existence of a named collection #5

Closed
holopoj opened this issue Feb 10, 2012 · 2 comments
Closed

Checking for the existence of a named collection #5

holopoj opened this issue Feb 10, 2012 · 2 comments

Comments

@holopoj
Copy link

holopoj commented Feb 10, 2012

Is there a proper method of checking whether a named collection already exists in a database? I tried calling DB.getHashMap("name_that_doesnt_exist") thinking it might return null if I haven't previously called DB.createHashMap("name_that_doesnt_exist"). Instead, the database throws an IllegalArgumentException. Is/Will there be a way to check this other than catching the exception?

Sorry if this isn't really an "issue", I couldn't find a mailing list so I posted here.

@jankotek
Copy link
Owner

No there is not, I will add it soon.

Jan

On Friday 10 February 2012 15:34:26 you wrote:

Is there a proper method of checking whether a named collection already
exists in a database? I tried calling
DB.getHashMap("name_that_doesnt_exist") thinking it might return null if I
haven't previously called DB.createHashMap("name_that_doesnt_exist").
Instead, the database throws an IllegalArgumentException. Is/Will there be
a way to check this other than catching the exception?

Sorry if this isn't really an "issue", I couldn't find a mailing list so I
posted here.


Reply to this email directly or view it on GitHub:
#5

@jankotek
Copy link
Owner

Fixed, getXXX now returns null if collection was not found.

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