EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #00890


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[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
> "EPRINT_CREATORS_NAME"."CREATORS_NAME_GIVEN" = NULL
> ... 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,
Tim

Attachment: signature.asc
Description: This is a digitally signed message part