I'm wanting to munge the Rows I get back from the DB when I do my query; kind of a custom group-by. This involves adding an integer field and concatenating a string field. So I was wanting to take the first Row, and put it into another object ... dict or Storage or Rows. I was hoping to use the outwardly simple SQLTABLE to display the results (as I do for the un-munged results).
self.attributes = attributes
self.sqlrows = sqlrows
(components, row) = (self.components, [])
if not sqlrows:
return
REGEX_TABLE_DOT_FIELD = sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD
sqlhtml.py in __init__ at line 3195
(and print rows doesn't show anything about db or adapter.)
If I try to use a Rows object (import from pydal.objects), I can't append, add, or assign a row, which means I can't get far enough to see if the DB problem occurs.
I can munge in place, since a Row object is mutable, but then I have donor rows that I don't want to display. Can I get rid of them without changing the DB? [I'm considering updating the DB with the munge results, but for now I just to do it to the display.] This is perhaps a silly question; it arises from the observation that I don't do the data entry in an optimal way. I pick up item 1, read the values to fill in the form, and submit the form ... and then find I should have done quantity 2 instead of 1, and appended a flag field appropriate to the second item (it indicates the manufacturing plant). So the munging does the combining that should have happened at data entry.
Thanks.
Dave
/dps