how about whatever.in() -> (whatever and False)
maybe problem with Null then?

On Thursday 12 April 2007 18:23:38 Michael Bayer wrote:
> On Apr 12, 2007, at 9:46 AM, Ants Aasma wrote:
> > On Apr 12, 1:59 am, Michael Bayer <[EMAIL PROTECTED]> 
wrote:
> >> agreed, as long as we know that saying "somecolumn !=
> >> somecolumn" is valid and produces False on all dbs (including
> >> frequent-offenders firebird and ms-sql) ?  (thats how you
> >> interpreted IN (), right ?)
> >
> > It works (almost) ok in MSSQL-8, Sqlite-2/3, PostgreSQL 8.1/8.2,
> > MySQL 5.0, Oracle 10g and Firebird 1.5.3. It works with literals,
> > columns, expressions, subselect expressions, no rows subselects
> > in all of them. It fails when the expression is a volatile
> > function or a function with side effects (e.g.
> > func.random().in_()). The latter two cases will work ok, if you
> > compile it as ((CASE WHEN expr IS NULL THEN NULL ELSE 0 END) = 1)
>
> see, now i am not liking this approach so much.  if someone says
> somecolumn.in_(), and it produces "(CASE WHEN <somecolumn> IS NULL
> THEN NULL ELSE 0 END) = 1", thats a *big* surprise.  i really dont
> want SA to be a very "thick" layer of guessage and
> fixing-the-users- mistakes.
>
> i would almost say we compile somecolumn.in() to just... "0" (if
> that even works, havent tried)...but even then, if someone executes
> a function that is expected to have side effects (extremely rare
> situation), we may be overstepping.
>
> 


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

Reply via email to