[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Re: Patch: handle NULL values in EPrints::Search::Condition::Comparison

On Tue, 2012-06-26 at 18:44 +0200, Alexander 'Leo' Bergolth wrote:
> Hi!
> The attached patch changes SQL output to use "IS" instead of "=" when
> comparing for equality against undefined values.
> This fixes a problem (at least with Oracle databases) when using views
> to browse by creators that have an empty givenname. (The SQL that was
> created contained something like
> ... which will never match.
> I believe it could also correct several other problems concerning empty
> fields, however, I did only stumble across the browse view issue yet.

I think the creators_name_given should contain "" instead of NULL,
exactly to avoid this problem. There was an EPrints version that started
writing NULLs but that was a bug.

Otherwise, a search for "IS NULL" should be using EXact and will create
an "IsNull" field condition?

All the best,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120726/07e4122e/attachment.bin