Re: [Django] #9049: queryset .extra(tables=[...]) unnecessarily quotes table names

2013-01-17 Thread Django
#9049: queryset .extra(tables=[...]) unnecessarily quotes table names
-+-
 Reporter:  tobias   |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.0
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by akaariai):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Seems like no action in 4 years for a reference point ticket is a good
 reason for closing.

 It would be nice to have an easy way to inject subqueries into ORM
 queries, but .extra() I don't think we want to push .extra() in that
 direction.

 Maybe we would want to add a generic "mark_safe" style way to avoid
 quoting of names. This would be useful for example in:

 {{{
 class SomeView(models.Model):
 cols...

 class Meta:
 db_table = mark_safe("(select * from sometable join othertable)")
 managed = False
 }}}
 Suddenly, you have inlined view! Would also solve this ticket's issue.

 But, not this ticket's issue.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #9049: queryset .extra(tables=[...]) unnecessarily quotes table names

2008-12-25 Thread Django
#9049: queryset .extra(tables=[...]) unnecessarily quotes table names
---+
  Reporter:  tobias| Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by sciyoshi):

 * cc: sciyo...@gmail.com (added)

Comment:

 See also #7907

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9049: queryset .extra(tables=[...]) unnecessarily quotes table names

2008-12-20 Thread Django
#9049: queryset .extra(tables=[...]) unnecessarily quotes table names
---+
  Reporter:  tobias| Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by miracle2k):

 * cc: elsdoer...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9049: queryset .extra(tables=[...]) unnecessarily quotes table names

2008-10-10 Thread Django
#9049: queryset .extra(tables=[...]) unnecessarily quotes table names
---+
  Reporter:  tobias| Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by tobias):

 Looks like there's already a partial solution to this in #7231, though
 having 'tables', 'join', and potentially 'subquery' keyword arguments to
 .extra() might raise unnecessary confusion when they all do virtually the
 same thing.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9049: queryset .extra(tables=[...]) unnecessarily quotes table names

2008-09-16 Thread Django
#9049: queryset .extra(tables=[...]) unnecessarily quotes table names
---+
  Reporter:  tobias| Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This patch isn't going in, it will cause too many difficult-to-diagnose
 bugs in people's code to support something that only worked by accident.

 There's a case for adding a literal-pass-through class to a few places in
 the query code that can be used to avoid any quoting or further processing
 and I've played around with that a bit in code with clients already. It
 mostly works (right now, the way to get what you want is to subclass Query
 and override the `get_from_clause` method). I'm also thinking about how to
 add general support for nested subqueries in the FROM-clause portion of
 the query which will help here. With a good tail-wind, that's likely to be
 ready for 1.1.

 Django's ORM isn't meant to be a total replacement for SQL and this is one
 of those places where you probably can't just use the normal function
 calls right now. Subclassing and overriding the appropriate methods still
 works, however.

 I'll leave this open as the reference point for adding subqueries and
 literals to "FROM".

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates?hl=en
-~--~~~~--~~--~--~---