uhm.
elif second==[] or second==():
            return '(1=0)'
why this is not reached ?

what is printed when you use 
db(db.tablename.fieldname.belongs([]))._select() ?

Il giorno martedì 6 novembre 2012 17:01:08 UTC+1, Marin Pranjić ha scritto:
>
> The issue is that SQLite allows to do:
> something = []
> db(db.tablename.fieldname.belongs(something)).select()
>
> However this fails on postgres (not sure what about the others).
>
> I am using SQLite for development so I don't notice the error until I move 
> the code into production.
> Not only I have error tickets in production (which should not happen), my 
> code ends up with lots of if-else lines and I don't like it either.
>
> I think DAL should be smarter. Now it passes a query to db and postgres 
> raises a syntax error.
> What do you think?
>
>
>

-- 



Reply via email to