PyDal doen't implements *is_null,* but you can try something like that t = db.yourtable exp = "column2 is null" print(db(t).select(t.column1, exp))
Il giorno mer 21 giu 2023 alle ore 19:47 Dragan Matic < perakojotgen...@gmail.com> ha scritto: > Postgresql allows this syntax: > > SELECT column1, column2 is null FROM table WHERE... > > Which returns the value from column one and a true/false for column2 like > this: > > column1 column2 > value1 true > value2 false > > To summarize, I just want for database to tell me whether column2 is null > or not, I do not want to read the whole column2 and check it in program as > it may contain a lot of text and will slow down execution. Can I translate > this select to DAL? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/b5d1573f-a5dc-4aad-8394-c2de75640cffn%40googlegroups.com > <https://groups.google.com/d/msgid/web2py/b5d1573f-a5dc-4aad-8394-c2de75640cffn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Massimiliano -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CANPTPx%2BA3WK%2B7bHX-nz7o6jbW7cmKjFcz93nc%3DdRXoNCr%2BPuAQ%40mail.gmail.com.