On 08/13/2012 08:53 PM, Michael Bayer wrote:
we don't currently have native support for ARRAY operations and there is some 
infrastructure work that should make it easier in 0.8 to add.

for now, when you need custom operators use op():

Model.array_column.op("@>")("somevalue")

I tried that, but that doesn't work because the second operand has to be wrapped in ARRAY[], afaik that's the only way to lookup a value in an array column (which is also gist indexable).


 If I  do

Model.array_column.op("@>")('ARRAY[123]')

I get

SELECT * FROM model_table WHERE array_column @> 'ARRAY[123]'


and I need ARRAY[123] without quotes.

--


.oO V Oo.


Work Hard,
Increase Production,
Prevent Accidents,
and
Be Happy!  ;)

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to