Django

Code

Show
Ignore:
Timestamp:
07/04/08 15:16:22 (5 months ago)
Author:
jbronn
Message:

gis: Merged revisions 7772-7808,7811-7814,7816-7823,7826-7829,7831-7833,7835 via svnmerge from trunk. Modified GeoWhereNode accordingly for changes in r7835.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis

    • Property svnmerge-integrated changed from /django/trunk:1-7767 to /django/trunk:1-7835
  • django/branches/gis/django/contrib/gis/db/backend/mysql/query.py

    r7699 r7836  
    3939MYSQL_GIS_TERMS  = MYSQL_GIS_FUNCTIONS.keys() 
    4040MYSQL_GIS_TERMS += MISC_TERMS 
    41 MYSQL_GIS_TERMS = tuple(MYSQL_GIS_TERMS) # Making immutable 
     41MYSQL_GIS_TERMS = dict((term, None) for term in MYSQL_GIS_TERMS) # Making dictionary  
    4242 
    43 def get_geo_where_clause(lookup_type, table_prefix, field, value): 
     43def get_geo_where_clause(table_alias, name, lookup_type, geo_annot): 
    4444    "Returns the SQL WHERE clause for use in MySQL spatial SQL construction." 
    4545    # Getting the quoted field as `geo_col`. 
    46     geo_col = '%s.%s' % (qn(table_prefix), qn(field.column)) 
     46    geo_col = '%s.%s' % (qn(table_alias), qn(name)) 
    4747 
    4848    # See if a MySQL Geometry function matches the lookup type next 
     
    5555    # geometries in its spatial indices. 
    5656    if lookup_type == 'isnull': 
    57         return "%s IS %sNULL" % (geo_col, (not value and 'NOT ' or '')) 
     57        return "%s IS %sNULL" % (geo_col, (not geo_annot.value and 'NOT ' or '')) 
    5858 
    5959    raise TypeError("Got invalid lookup_type: %s" % repr(lookup_type))