Changes between Initial Version and Version 1 of Ticket #11169


Ignore:
Timestamp:
May 21, 2009, 7:40:03 AM (16 years ago)
Author:
Alex Gaynor
Comment:

Fixed formatting.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11169 – Description

    initial v1  
    22
    33Viz: assume MySQL is the default database as quoted in the project's settings.py file
    4 
     4{{{
    55>>> import MSSQL.model
    66>>> MSSQL.model.RandomTable.get(field__startswith='ticket')
     
    2424    return self.cursor.execute(sql, params)
    2525ProgrammingError: ('42000', '[42000] [FreeTDS][SQL Server]Statement(s) could not be prepared. (8180) (SQLPrepare)')
    26 
     26}}}
    2727
    2828Does anyone know how to find the correct connection in the "as_sql" subroutine in django.db.models.sql.where, or do we need to call django.db.models.sql.where.as_sql with the appropriate "connection" as a parameter?
    2929
    3030Affected lines:
     31{{{
    3132156:            cast_sql = connection.ops.datetime_cast_sql()
    3233166:        if lookup_type in connection.operators:
     
    3738190:            return connection.ops.regex_lookup(lookup_type) % (field_sql, cast_sql), params
    3839205:        return connection.ops.field_cast_sql(db_type) % lhs
    39 
     40}}}
    4041
    4142Just incase it has a bearing on the matter I'm using a DB-Manager for the tables of the form:
    42 
     43{{{
    4344class ODBCManager(models.Manager):
    4445    use_for_related_fields = True
     
    5758          self.cached_connection = True
    5859        return QuerySet(self.model,self.query)
     60}}}
Back to Top