[TYPO3-core] RFC #11916: Feature: New TYPO3_DB method for queries that expect just a single result row

Jigal van Hemert jigal at xs4all.nl
Wed Nov 17 12:52:22 CET 2010


Hi,

On 16-11-2010 23:24, Ernesto Baschny [cron IT] wrote:
> No, I was not talking about changing existing API, just about throwing
> an exception in the NEW method (which is not used anywhere yet since it
> doesn't even exist yet). Yes or no? :)

That would form an inconsistency in the "new" API as a whole:
exec_SELECTgetRows() : empty array for empty recordset, NULL for error
exec_SELECTgetSingleRow() : empty array for empty recordset, exception 
for error
(both methods have identical parameters and similar functionality, 
except for the number of rows returned)

If you add exception to all methods (which would be a clean solution) 
then others need to change their code to catch the exceptions.

So, I personally would say no to adding an exception in this method 
only. But the core devs and RMs will decide in the end :-)

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-team-core mailing list