On Thursday, September 16, 2010 08:18:20 am Jacek Kałucki wrote:
> Użytkownik John Fabiani napisał:
> > First I did not know you could pass 'param' to gather data. So my
> > understanding of the use of scan maybe completely wrong.  Is that param
> > used by the function/method to place data into?
> > 
> > I thought the second parameter of the scan method was to determine the
> > direction of the scan (forward vs reverse).  And I have only used the
> > scan method as simple way to reiterate over the bizojb records.  With
> > that in mind what would the return value represent?  That I completed
> > the scan.  But I don't always completely scan all records.
> > 
> > So I guess I could use some enlightment on this subject.
> 
> This method has the following declaration:
>      def scan(self, func, *args, **kwargs)
> 
> It means, that you can pass to 'func' any parameter except named
> parameter 'reverse'.
> Of course, scan() can be used to execute some operations on rows - I
> think it was primary Ed's goal.
> But why don't use it for something more practical, like calculations or
> testing for some conditions?
> It would be a pity to waste its potential.
> So, we are at the beginning, how to retrieve result?
Ah!  Now I see what you are after.  But first let me say you made me think 
outside my comfort zone - and thanks for that.

I'm old school.  If I need a subset of my data I turn to SQL almost 
immediately.  Years ago when Dabo added the ability to execute sql statements 
against datasets was a very good day for me.  But there are times that SQL 
will not meet the requirements.  To be honest I haven't run across very many 
times where SQL was not enough to get my data into the shape I wanted.  So 
when I can't use SQL I have used the basic methods of filter and scan to get 
that done.  I have also used deep.copy() and then executed multi- SQL 
statement against the copied data.  


Johnf

_______________________________________________
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]

Reply via email to