interesting, i didn't knew that :D
i was using shomething like (for softwares such as st2, which has pep8
checking):
## variables
NULL = None # f**k pep-8
TRUE = True # f**k pep-8
FALSE = False # f**k pep-8
so, "somecol != NULL" is not acused as violating pep8, lol.
well, just for fun :)
On 04/15/2014 02:44 AM, Michael Bayer wrote:
there's an isnot() operator, use that
On Apr 14, 2014, at 7:17 PM, Jonathan Vanasco <jonat...@findmeon.com
<mailto:jonat...@findmeon.com>> wrote:
I'm on postgres and have a boolean column that allows NULL values.
I need to create a relationship between 2 ORM classes , where there
is a filter that states "IS NOT TRUE".
The ORM likes these 2 commands :
photo = sa.orm.relationship("Photo", primaryjoin="and_(
Useraccount.photo_id==Photo.id , Photo.is
<http://Photo.is>_deletion_scheduled != True )")
photo = sa.orm.relationship("Photo", primaryjoin="and_(
Useraccount.photo_id==Photo.id , Photo.is
<http://Photo.is>_deletion_scheduled <> True )")
however they don't compare correct in Postgresql. I need this to
work, however the mapper doesn't like it:
photo = sa.orm.relationship("Photo", primaryjoin="and_(
Useraccount.photo_id==Photo.id , Photo.is
<http://Photo.is>_deletion_scheduled IS NOT True )")
if I were doing a column comparison, I would do
Photo.is <http://Photo.is>_deletion_scheduled.op('IS NOT')(True)
anyone have an idea ?
--
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
<mailto:sqlalchemy+unsubscr...@googlegroups.com>.
To post to this group, send email to sqlalchemy@googlegroups.com
<mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
--
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
<mailto:sqlalchemy+unsubscr...@googlegroups.com>.
To post to this group, send email to sqlalchemy@googlegroups.com
<mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
--
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/d/optout.