
This is a weird bug.
if (0) then doc('asdasda') else element b{}
will return <b/>
while
if (doc-available('asdasda')) then doc('lala') else element b{}
will return the shred error.
On Thu, May 14, 2009 at 12:43 PM, Floris Ouwendijk (DT)
Hi,
Given the following code, I'd assume to get an empty b element (for a database not containing the given document).
if (doc-available('asdasda')) then doc('asdasda') else element b{}
The result happens to be QUERY = if (doc-available('asdasda')) ERROR = !ERROR: [shred_url]: 1 times inserted nil due to errors at tuples 0@0. !ERROR: [shred_url]: first error was: !ERROR: shred: cannot stat `asdasda': No such file or directory !ERROR: CMDshred_url: operation failed. !ERROR: interpret_params: leftfetchjoin(param 2): evaluation error.
If I do if (doc-available('asdasda')) then element a{} else element b{}
Then i get b.
What is the proper way to return some default value when a document is not available in the database? Or is this the proper way and should this be reported as a bug?
Kind regards,
Floris
------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users