Hi Luca,
Keep in mind that contains will not map to 'like'. Hence if you want your
query to have a 'like' clause, you'll have to use the 'like' method (the
end result of 'contains' will be the same though as 'like' beginning and
ending with a percent sign).
 On Sep 27, 2013 5:06 PM, "pyArchInit ArcheoImagineers" <
pyarchi...@gmail.com> wrote:

> Thanks a lot...sorry for my prevous post that I delete beacause I didn't
> undestand I must to use this  ~
>
> def test_not_like(self):
> Session = sessionmaker(bind=self.engine, autoflush=True, autocommit=True)
> session = Session()
> res = session.query(MAPPER).filter(and_(~MAPPER.field.contains('Value1'),
> ~US.field.contains('Value2'),
> ~US.field.contains('Value3'),~US.field.contains('Value4')))
>
> return res
>
> This appear to run properly now I test with my little dataset and I'll try
> to understand is what I must to find.
>
> Thank you very much and sorry for the unnecessary my old replies.
> Bye
> Luca
>
> --
> 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 group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to