Thank you Michael you perfectly answered the question ! I just removed the
custom primaryjoin condition and it works as expected
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send
I'm having some difficulty using SQLAlchemy's jsonb operators to produce my
desired SQL.
Intended SQL:
SELECT *
FROM foo
WHERE foo.data-'key1' ? 'a'
...where `foo.data` is formatted like this:
{
'key1': ['a', 'b', 'c'],
'key2': ['d', 'e', 'f']
}
So, I'm
Brian Findlay brian.m.find...@gmail.com wrote:
I'm having some difficulty using SQLAlchemy's jsonb operators to produce my
desired SQL.
Intended SQL:
SELECT *
FROM foo
WHERE foo.data-'key1' ? 'a'
...where `foo.data` is formatted like this:
{
'key1':
Test data attached. Perhaps I'm doing something else wrong?
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this
`type_coerce()` did the trick. Thanks, Mike!
On Wednesday, March 18, 2015 at 12:55:57 PM UTC-4, Michael Bayer wrote:
try using the type_coerce() function instead of cast, it should give you
the
has_key() but won’t change the SQL. (type_cast(Foo.data[‘key’],
JSONB).has_key())
just a