Re: [RFC] Nullable Return Type Declaration
| From: | Lester Caine | Date: | Mon, 18 Apr 2016 18:39:44 +0000 |
| Subject: | Re: [RFC] Nullable Return Type Declaration | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92422@lists.php.net to get a copy of this message | ||
On 18/04/16 19:24, Stanislav Malyshev wrote:
> If your database died, your DB-bound code is not going
> to fix it. With or without nulls - it has to just fail and wait for
> somebody to fix it. There's no need to overcomplicate that.
If the DB read failed due to the connection being lost, then that is a
case for an exception and out of flow events? The 'null' would be
returned when an active connection has no data to return because a
search or query has produced none. Larry would probably be looking to
check the 'no_of_recs' to see if there were any results but then you
still have to read the result if there is one ... overcomplicating the
simple solution?
( ADOdb check the connection is still valid as part of the query prep
and run and changes the work flow if required )
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk