Massimo,
Thanks for the reply.
I should have mentioned that am using the update_record as an example.

Basically, I want to figure out the return values for methods that deal 
with the CRUD operations on the database (via the DAL), and how to 
interpret if an operation succeeded or not.
listing it as operation; success; failure
insert; Row of the inserted data; Exception or the value 0
delete; 1; Exception or the value 0 
update; Row of the updated data; Exception or the value 0

Is this assumption, of mine, correct?

I wasn't able to determine these return values easily by looking at the 
code (am in the process of learning python, so maybe am missing something 
here), and neither was I able to see this documented in the api doc. 

Any suggestions?
Thank you,
Kiran


On Saturday, February 15, 2014 9:54:08 AM UTC+5:30, Massimo Di Pierro wrote:
>
> yes. Should return 1 or 0.
>
> On Friday, 14 February 2014 18:09:46 UTC-6, Kiran Subbaraman wrote:
>>
>> Hello, 
>> I was looking at this specific method update_record, and found it to be 
>> useful. I would like to know what its return values are based on whether 
>> the update succeeded or failed. 
>> I realized that on success, the updated Row is returned. Not sure what 
>> happens if there is any sort of failure. 
>>
>> The API document that am using is: 
>> http://127.0.0.1:8000/examples/static/epydoc ... the one that is 
>> accessible once I start a local instance of web2py. 
>> I see that the update_record is handled by Record_Updater(), which 
>> performs a "colset.update()"... and so on. Is there an easier way to 
>> figure out the return value for these functions? 
>> Thanks, 
>> Kiran 
>>
>> -- 
>>
>> ________________________________________ 
>> Kiran Subbaraman 
>> http://subbaraman.wordpress.com/about/ 
>>
>>

-- 
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.

Reply via email to