I believe that it should be supported natively on the database backend where supported, however have a python fallback, that can mimic the function if said database does not support the operation.
This way you still have the "convenience" of using the aggregator if its not supported, and the speed if it is. This also counts for having a different database for development and production. Say you have memcache servers that support avg(), however your local development database does not support it, it will fallback to the python implementation... Without this, we will always be forced to use a "python" version of said aggregator, and always be doing it the hard way. (unless you wanted to write your own SQL, but thats what our dal is for) -Thadeus On Tue, Oct 13, 2009 at 10:48 PM, mr.freeze <nat...@freezable.com> wrote: > > You could put all of them (and more) in the Rows class but you would > take a performance hit since the processing would be handled by the > web server after the select is done and not the database or...put all > of them in Field as well and tweak SQL_DIALECTS to flag operations as > unsupported and throw an error. > > On Oct 13, 10:34 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > > Could we write python wrappers around the functions that are not > supported > > for that particular backend? > > > > -Thadeus > > > > On Tue, Oct 13, 2009 at 10:12 PM, mdipierro <mdipie...@cs.depaul.edu> > wrote: > > > > > On Oct 13, 9:02 pm, "mr.freeze" <nat...@freezable.com> wrote: > > > > This has probably been asked before but why doesn't the Field class > > > > have these?: > > > > > no > > > > > > avg, format, round, mid, len, first, last > > > > > > Is it because they are not common to all databases? > > > > > yes > > > > > probably avg and round should be implemented since they are common. > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---