Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
database system
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
25 Sep 2008 at 04:52 UTC
Updated:
7 Mar 2009 at 18:47 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedThis is all sound.
Just one little thing:
This could become:
Comment #2
Crell commentedDoes array_map() preserve associative arrays? *checks PHP manual* Hey, it looks like it does! Sweet, I like array_map() even more now. :-) Unless webchick has an objection I'm in favor of using the array_map idiom in these cases.
The alternative is to have a fetchAllKeyed() parameter that is a callback, but I think that's pushing just too much functionality into the DB system when the array_map above works just as well and is easier to grok, too.
Comment #3
webchickarray_map() looks *much* more legible. +1!
Comment #4
lilou commentedarray_map()is more effective.Comment #5
Crell commentedSpiffy, thanks lilou! Per http://drupal.org/node/313152#comment-1031542 , can you also break the db_delete() in variable_set() across multiple lines? If not, I'll get to it later tonight. Thanks!
Comment #6
lilou commentedComment #7
moshe weitzman commentedcode looks good to me. nice work.
Comment #8
Crell commentedgrumble grumble windows line breaks.
The patch in #6 also breaks the variable_init() query, so this version fixes it and the line breaks. All bootstrap tests pass.
Comment #9
dries commentedIs this chunck correct?
The
AND type = '%s'"stuff seem to be missing?Comment #10
Crell commentedI believe it is, yes. At least it passes all tests. :-) One of the nice things about DBTNG is that a lot of the things you used to have to loop on are now consolidated into primitive actions. You're right, though, that it looks like the type part went missing. That should be just another condition call. I'll roll a new patch after I finish fighting with simpletest over another patch. :-)
Comment #11
Crell commentedAnd back again, now with the type restored.
Comment #12
dries commentedCommitted to CVS HEAD. Thanks.
Comment #13
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #14
Crell commentedTagging.