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

Сложности при работе с JSON полем #209

Open
divanovGH opened this issue Nov 2, 2016 · 1 comment
Open

Сложности при работе с JSON полем #209

divanovGH opened this issue Nov 2, 2016 · 1 comment

Comments

@divanovGH
Copy link

divanovGH commented Nov 2, 2016

Предположим, что в поле data в таблице users содержит JSON строку:
'{"email": "name@mail.com"}'

Этот запрос ничего не вернёт.

users = select(
    (u.id, u.data['email']) for u in Users if u.data['email'] in ['name@mail.com'])
)[:]

А вот этот вернёт.

users = select(
    (u.id, u.data['email']) for u in Users if u.data['email'] in ['"name@mail.com"'])
)[:]

Приходится в условии добавлять двойные кавычки в email.
Это неудобно.

@kozlovsky
Copy link
Member

А почему вы закрыли? Сейчас есть более приоритетные баги, но со временем мы и этот баг исправим )

@divanovGH divanovGH reopened this Jan 9, 2017
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