Chris Angelico writes:
> On Thu, Feb 11, 2016 at 6:59 PM, dieter wrote:
>> In my context (web applications), I strongly discourage this use - at least
>> when "conn" does not handle subtransactions properly.
>>
>> In a web application, the main transaction should in general be controlled
>> at t
On Feb 10, 2016, at 8:06 PM, Frank Millman wrote:
>
> "Israel Brewster" wrote in message
> news:92d3c964-0323-46ee-b770-b89e7e7e6...@ravnalaska.net...
>
>> I am working on implementing a Python DB API module, and am hoping I can get
>> some help with figuring out the workflow of handling tran
On Feb 10, 2016, at 8:14 PM, Chris Angelico wrote:
>
> On Thu, Feb 11, 2016 at 4:06 PM, Frank Millman wrote:
>> A connection has 2 possible states - 'in transaction', or 'not in
>> transaction'. When you create the connection it starts off as 'not'.
>>
>> When you call cur.execute(), it checks
On Thu, Feb 11, 2016 at 6:59 PM, dieter wrote:
> In my context (web applications), I strongly discourage this use - at least
> when "conn" does not handle subtransactions properly.
>
> In a web application, the main transaction should in general be controlled
> at the request level: a request shou
Israel Brewster writes:
> I am working on implementing a Python DB API module, and am hoping I can get
> some help with figuring out the workflow of handling transactions. In my
> experience (primarily with psycopg2) the workflow goes like this:
>
> - When you open a connection (or is it when y
Chris Angelico writes:
> ...
> When I advise my students on basic databasing concepts, I recommend
> this structure:
>
> conn = psycopg2.connect(...)
>
> with conn, conn.cursor() as cur:
> cur.execute(...)
>
> The transaction block should always start at the 'with' block and end
> when it exit
On Thu, Feb 11, 2016 at 4:28 PM, Frank Millman wrote:
> "Chris Angelico" wrote in message
> news:captjjmphjvtckub6qr-vp_1epewxbgqxmfkepmohqp3papg...@mail.gmail.com...
>>
>>
>> When I advise my students on basic databasing concepts, I recommend
>> this structure:
>>
>> conn = psycopg2.connect(...)
"Chris Angelico" wrote in message
news:captjjmphjvtckub6qr-vp_1epewxbgqxmfkepmohqp3papg...@mail.gmail.com...
When I advise my students on basic databasing concepts, I recommend
this structure:
conn = psycopg2.connect(...)
with conn, conn.cursor() as cur:
cur.execute(...)
Does this auto
On Thu, Feb 11, 2016 at 4:06 PM, Frank Millman wrote:
> A connection has 2 possible states - 'in transaction', or 'not in
> transaction'. When you create the connection it starts off as 'not'.
>
> When you call cur.execute(), it checks to see what state it is in. If the
> state is 'not', it silent
"Israel Brewster" wrote in message
news:92d3c964-0323-46ee-b770-b89e7e7e6...@ravnalaska.net...
I am working on implementing a Python DB API module, and am hoping I can
get some help with figuring out the workflow of handling transactions. In
my experience (primarily with
psycopg2) the workfl
I am working on implementing a Python DB API module, and am hoping I can get
some help with figuring out the workflow of handling transactions. In my
experience (primarily with psycopg2) the workflow goes like this:
- When you open a connection (or is it when you get a cursor? I *think* it is
o
11 matches
Mail list logo