Skip to content

Why would Record don't support dot notation? #38

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

Closed
imbolc opened this issue Oct 30, 2016 · 5 comments
Closed

Why would Record don't support dot notation? #38

imbolc opened this issue Oct 30, 2016 · 5 comments

Comments

@imbolc
Copy link

imbolc commented Oct 30, 2016

No description provided.

@elprans
Copy link
Member

elprans commented Oct 31, 2016

See #13 for the rationale of why this is not a good idea.

@imbolc
Copy link
Author

imbolc commented Oct 31, 2016

The reasons look good at the first glance. But sometimes people are already working with Record in dot notation. E.g. jinja or django templates allow to do this. And so people forced to use different syntax in their handlers and templates.

@elprans
Copy link
Member

elprans commented Oct 31, 2016

Both Jinja and Django allow dot notation for getitem access, so this argument is invalid.

@imbolc
Copy link
Author

imbolc commented Oct 31, 2016

Yes, sure. In django views you should use record as a dict, but in templates you should use dot notation. I would prefer use dot notation in both cases.

@elprans
Copy link
Member

elprans commented Oct 31, 2016

That's understandable. One potential solution is to add the ability to specify a cursor factory, like psycopg does. I'll open a separate issue for this.

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

No branches or pull requests

2 participants