[Ur] Checking for equality in SQL expressions fails for None

Istvan Chung istvan at vivatropolis.org
Mon Nov 18 17:54:12 EST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If a value of None is placed in column Bar of table foo, the SQL
expression
    SELECT * FROM foo WHERE foo.Bar={[None]}
will fail to find any rows. This appears to be a consequence of the
fact that in SQL, [NULL=NULL] is false, and the implementation detail
that None is represented with NULL in databases. A workaround is to
use [IS NULL] instead, but it seems to me that this should be fixed in
Ur/Web.

- -- 
Istvan Chung
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlKKmosACgkQM1keTVXkyWzrzwCdHuWRIAiBFU+EWG6UvoaytPyi
J54An1QqjE1DtlXMoJN21uLVc9uKyv8B
=DX8Y
-----END PGP SIGNATURE-----



More information about the Ur mailing list