I believe, that between inserts/updates and selects you should do commit
On Friday, September 1, 2017 at 10:15:00 PM UTC+3, Dave S wrote:
>
>
>
> On Friday, September 1, 2017 at 10:03:48 AM UTC-7, Ben Lawrence wrote:
>>
>> Also, if i am inserting within a for loop, should I place the db.commit()
On Friday, September 1, 2017 at 10:03:48 AM UTC-7, Ben Lawrence wrote:
>
> Also, if i am inserting within a for loop, should I place the db.commit()
> within the for loop too?
>
> On Friday, September 1, 2017 at 9:59:11 AM UTC-7, Ben Lawrence wrote:
>>
>> Good point, but I put the commits after
Also, if i am inserting within a for loop, should I place the db.commit()
within the for loop too?
On Friday, September 1, 2017 at 9:59:11 AM UTC-7, Ben Lawrence wrote:
>
> Good point, but I put the commits after the function returns as there are
> a number of inserts in a variety of tables. So
Good point, but I put the commits after the function returns as there are a
number of inserts in a variety of tables. So is it preferred to do a commit
after every insert instead of grouping them together for one big commit?
TIA Ben
On Friday, September 1, 2017 at 12:35:01 AM UTC-7, Val K wrote:
from the book:
Remember to call db.commit() at the end of every task if it involves
inserts/updates to the database. web2py commits by default at the end of a
successful action but the scheduler tasks are not actions.
On Friday, September 1, 2017 at 8:30:00 AM UTC+3, Ben Lawrence wrote:
>
> Than
Thanks guys for your time. No I do not know what a _before_insert hook is,
so I doubt that there is one here.
here is
def insert_company(valid_name, valid_email):
""" Inserts a company record if there is a new d
As I see, it's a scheduler task - show all code of insert_company
Is there any _before_insert hook?
On Wednesday, August 30, 2017 at 1:22:57 AM UTC+3, Ben Lawrence wrote:
>
> 2.15.3-stable+timestamp.2017.08.07.07.32.04
> (Running on nginx/1.10.3, Python 2.7.12)
>
>
> Hi
> I hesitate to ask this b
def get_company_name(s):
"""Takes out common domain suffixes e.g. com, net
:param s: domain name
:type s: string
:returns: sanitized string
:rtype: unicode string
"""
return (((s.replace('.com',' ')).replace('.net',' '))\
.replace('.org',' '))\
.rep
What does the get_company_name() function look like?
On Tuesday, August 29, 2017 at 6:22:57 PM UTC-4, Ben Lawrence wrote:
>
> 2.15.3-stable+timestamp.2017.08.07.07.32.04
> (Running on nginx/1.10.3, Python 2.7.12)
>
>
> Hi
> I hesitate to ask this because it will betray my stupidity
>
> I have this
9 matches
Mail list logo