Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion Adding hooks to methods that generate SQL in django/core/management.py
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Russell Keith-Magee  
View profile  
 More options Aug 13 2007, 7:53 am
From: "Russell Keith-Magee" <freakboy3...@gmail.com>
Date: Mon, 13 Aug 2007 19:53:20 +0800
Local: Mon, Aug 13 2007 7:53 am
Subject: Re: Adding hooks to methods that generate SQL in django/core/management.py
On 8/12/07, George Vilches <g...@thataddress.com> wrote:

> How about the patch below?  When you create the cursor, if you want
> access to "don't run this SQL, just have playback available", just use
> connection.cursor(playback_only=True), and if you want to roll the

This is a simple approach that would probably suffice for
management.py based problems, but it isn't really practical on a large
scale. For example, QuerySets open their own connections, so it won't
be easy to pass an argument to an ORM call to enable capture of
playback data.

The configuration option will need to be a little more generic - i.e.,
putting the entire backend into a record mode - not just a single
cursor call.

> Something that I found a little irksome while working on this is that
> the DatabaseWrapper class for each backend doesn't inherit from some
> logical parent.  I know that all the db-specific functionality is

Brian Ferring seems to be on top of this one. There's a separate
thread now talking about this refactoring.

Yours,
Russ Magee %-)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.