ok, understood. This is really the only thing I need:
def _pre_process(self, table, **fields): """ Takes a w2p table and a dictionary with values and processes the field input and add defaults, computes, etc using the web2py table. """ fields = table._defaults(fields) return dict((f.name,table._db._adapter.represent(v,f.type)) for f,v in table._listify(fields)) At this moment this works for me and I don't need to subclass the adapter. But: In the other thread you spoke about people possibly relying on _<something> functions (for debugging/logging etc.) I guest my question is, can users safely rely on _<something> methods? What is w2p's "policy" regarding underscore-prefixed functions. Are they considered private? So can I use the above function as it is? Oh and, Sorry; however, you could temporarily implement a similar method by > subclassing GoogleDatastoreAdapter so it pre-processes data without > applying changes. What do you mean by "temporarily"? Could the feature be implemented in the future with a different name? Quint On Saturday, January 11, 2014 2:07:56 PM UTC+1, Alan Etkin wrote: > > > Sorry for the confussion.. >> But it works fine. I will definitally use this. >> >> (I posted something stupid and removed the stupid post but left some >> traces. ;-)) >> > > Well there are good reasons not to add the feature, at least with the > current name: > > https://groups.google.com/d/msg/web2py-developers/bN0WS9_skzw/NJq4bs5M8KIJ > > Sorry; however, you could temporarily implement a similar method by > subclassing GoogleDatastoreAdapter so it pre-processes data without > applying changes. > > > http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Note-on-new-DAL-and-adapters > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.