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

Initialize columnNameToIndexMap when accessed by client code #116

Merged
merged 1 commit into from Jan 31, 2013

Conversation

danieldickison
Copy link
Contributor

Lazily create and populate the dictionary when calling -columnNameToIndexMap so that it can be used directly before column values have been accessed. Among other things, this makes it possible to check whether a column exists in a results set (see issue #79).

This does change the property from (atomic, retain) to (readonly), so it will break code that sets this property directly instead of modifying the fmdb-provided dictionary. That seems like a strange use-case to me, but perhaps there's a situation where it is useful that I'm missing.

…an use the value without causing setupColumns to be called first.
@ccgus ccgus merged commit d72cbb0 into ccgus:master Jan 31, 2013
@ccgus
Copy link
Owner

ccgus commented Jan 31, 2013

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants