|
Re: convenience wrapper for looping through columns?: msg#00012lang.perl.modules.dbi.rose-db-object
On 6/1/06, Jonathan Vanasco <rosedb-GYD5gbT+W3w@xxxxxxxxxxxxxxxx> wrote: > On Jun 1, 2006, at 1:11 PM, John Siracusa wrote: >> That's bad code because it assumes that the column accessor name is >> the same as the column name, which is not always the case. > > in my code it is... i enforce that for simplicity, and then have '_' > prepended accessor names for non-column name accessors Okay, but at least comment the code: # This assumes that column names match method names so your future-self will be reminded of this constraint :) > i want to clone the data/row representation of the db for user and > serialization by non-rosedb code -- the clone methods look like they > will include the object class, meta data, and rosedb associated > items. i really just need a 'dict' / hash of the column_name/ > column_value pairs. Ah, gotcha. -John
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: questions about the manager, John Siracusa |
|---|---|
| Next by Date: | use sql functions in inserts and selects, Ask Bjørn Hansen |
| Previous by Thread: | Re: convenience wrapper for looping through columns?, Jonathan Vanasco |
| Next by Thread: | questions about the manager, Guillermo Roditi |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |