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