On 3/15/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
...

> Looking at the code I've written, I think the only potential problem
> tnhat jumps out is that constructing some of these things is
> database-engine specific (some of the text matching options,
> potentially), so having access to the db backend is necessary. But I'll
> have a look at whether I can just transplant them easily to the Field
> class.

Yeah, that occurred to me.  I guess I could make the get_where_clause
take backend as a parameter.

> Tough to see how you could do it otherwise
> without also dragging the rest along (well, one way would be to
> conditionally call the field if it had a particular method, but that
> feels icky in some ways, too).

Yeah, the current as-yet-uncommitted branch code is copying
get_where_clause, parse_lookup, and lookup_inner with minor changes,
and I don't think that's any better.  :)

> I would probably call out to another function somewhere to do the real
> registration,

Sorry, can you pseudo-code this?  I'm not sure what you mean by
another function for real registration.

> As an aside on the sample you jotted down: any big reason why you want
> it to be a class method here?

No, in fact I considered making it an instance method which would not
take table_prefix or field_name, but realized this was a somewhat
larger change and didn't handle aliasing, which you'll likely be
addressing in the QS refactor, so I was trying to stay out of the way
for that.

I don't mind doing an instance method at all, if that's what you prefer.

...
> Having thought about it for a whole 10 minutes, I'd say try that path
> out and if I think of anything, I'll sing out and help you port it.

Just waiting for enlightenment on the real registration, and I'll be on my way.

Thanks for the fast response.  :)
  -Jeremy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to