[development] Extend database abstraction layer, to includetablecreation.

Angela Byron drupal-devel at webchick.net
Fri May 12 19:44:20 UTC 2006


moshe weitzman wrote:

> Pople might misuse it is not a justification for omitting code from
> core. Building a collection from a db recordset an extremely common
> pattern and including this convenience function reduces code and makes
> it more readable. Do you think that improper instances of this will get
> into core? No chance. It won't get into any of the well reviewed contrib
> modules either. So what if people misuse a function in rarely used
> contrib module? Thats likely the least of its worries.

Agreed. But going back to my point, how do we know what field to set the
array key on? Key on the first field selected? Or scrap the idea of
hashes and just chuck them into a numeric array, knowing that in some
(most?) cases you'll need to loop through it again to make the hash what
you want? It would be nice for someone who is in support of a
db_fetch_all() function to maybe grep through core/contrib looking for
examples of this and come up with a sane default behaviour.

-Angie


More information about the development mailing list