Re: How best to get a default result from sqlite3, or to use or not use first-result?

2022-06-08 Thread John Cowan
IMO this is an excellent application for folding. On Wed, Jun 8, 2022 at 10:54 AM Matt Welland wrote: > The problem: retrieve one value from a query, if there is no matching > row return a default. > > Method 1: use for-each-row, overwrite the default with found values > Method 2: use

How best to get a default result from sqlite3, or to use or not use first-result?

2022-06-08 Thread Matt Welland
The problem: retrieve one value from a query, if there is no matching row return a default. Method 1: use for-each-row, overwrite the default with found values Method 2: use first-result, on exception return the default Method 3: use fold-row (wasn't an option when I first wrote the code) My