On Mar 12, 2012, at 1:04 PM, Paul McNett wrote:
> If you don't think this is horrible, I want to hear why:
>
> dabo/dabo/db/dCursorMixin.py
> 2072 def moveToPK(self, pk):
> 2073 """
> 2074 Find the record with the passed primary key, and make it active.
> 2075
> 2076 If the record is not found, the position is set to the first record.
> 2077 """
> 2078 row, rec = self._getRecordByPk(pk, raiseRowNotFound=False)
> 2079 if row is None:
> 2080 row = 0
> 2081 self.RowNumber = row
I think that this is horrible. The very name of the method suggests
that you should be supplying a valid PK. If it doesn't exist, it should raise a
RowNotFoundException. The calling method should then decide how to handle an
invalid PK.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]