> I gues my question is, can users safely rely on _ methods?
>
The change revert is due this concern about api reliability, so adapters
behave as specified in
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=_insert#Raw-SQL
What is w2p's "policy" regar
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._de
> 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-d
> But it works fine. I will definitally use this.
Ok. If you can, it would be useful if you could share your tests about
supported features for records lacking id values and any issue you find
with setters and getters using key names. Note that the Rows class supports
defining objects using dic
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.
;-))
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.
> Works great!
>
> On Thursday, January 9, 2014 7:21:45 PM UTC+1, Quint wrote:
> Excellent!
>
>
> I already included it to try it out but how do i use it?
Your message is confusing, does it work or it does not? It worked for my
environment (recent release of gae sdk and development server)
Please Ignore that.
I got it.
Works great!
On Thursday, January 9, 2014 7:21:45 PM UTC+1, Quint wrote:
>
> Excellent!
>
> I already included it to try it out but how do i use it?
>
> When I use your example I get:
>
> AttributeError: 'DAL' object has no attribute '_insert'
> (obviously because t
Excellent!
I already included it to try it out but how do i use it?
When I use your example I get:
AttributeError: 'DAL' object has no attribute '_insert'
(obviously because there is no _select() in DAL)
When i try:
db._adapter._insert(props)
I get:
File "C:\Users\Quint*\gluon\dal.py
>
> How about adding support in dal.py for the following:
>
> # processes the field input and add defaults, computes, etc. (does not
> make actual insertion).
> >>> values = db._insert(spam="alot", ...)
> {"spam": "alot", ...}
>
I made a pr about supporting _insert for processing values without
How about adding support in dal.py for the following:
# processes the field input and add defaults, computes, etc. (does not make
actual insertion).
>>> values = db._insert(spam="alot", ...)
{"spam": "alot", ...}
So one can use the output for storing named keys (with app specific logic
or maybe
>
> Compatible with what?
>
With any web2py feature expecting entity keys (web2py records) with integer
ids.
But you would know that you don't need those functionalities if you would
> decide to use a key_name
>
I think this is usually called a "corner case". I would't add the feature
for th
Sorry, I don't understand this line.
although I belive storing records without id assignment would be
> restrictive for apps
Do you mean web2py apps or GAE apps? What did you mean by "restrictive"
(and I doubt it will be actually compatible at all
Compatible with what?
Sure, when you would
> But does that mean you should not allow it to be inserted that way?
> Nothing restricts users from operating (using web2py api) on rows
inserted with GAE api
There's no restriction on the use of the datastore, since it is not a
service reserved for web2py apps, although I belive storing re
Yes,
Your post reminds me, I forgot something. I thought that when a key_name is
used, it could simply return that as an id.
But if you say that DAL requires that it returns an integer id, than yes,
that would break it.
When you use a key_name, the records do not have an numeric id.
But does tha
> I would like to be able to do this using web2py. I could also choose to
> use the GAE API directly to do this but then a could not make use thing
> like calculated Fields etc in my web2py tables.
>
One issue about forcing key names is that there's no guarantee that the new
key will provide
15 matches
Mail list logo