<s> from django . contrib . gis . db . backends . base . adapter import WKTAdapter <EOL> from django . contrib . gis . db . backends . base . operations import BaseSpatialOperations <EOL> from django . contrib . gis . db . backends . utils import SpatialOperator <EOL> from django . contrib . gis . db . models import aggregates <EOL> from django . db . backends . mysql . operations import DatabaseOperations <EOL> from django . utils . functional import cached_property <EOL> class MySQLOperations ( BaseSpatialOperations , DatabaseOperations ) : <EOL> mysql = True <EOL> name = '<STR_LIT>' <EOL> Adapter = WKTAdapter <EOL> @ cached_property <EOL> def select ( self ) : <EOL> if self . connection . mysql_version < ( <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:0> ) : <EOL> return '<STR_LIT>' <EOL> return '<STR_LIT>' <EOL> @ cached_property <EOL> def from_wkb ( self ) : <EOL> if self . connection . mysql_version < ( <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:0> ) : <EOL> return '<STR_LIT>' <EOL> return '<STR_LIT>' <EOL> @ cached_property <EOL> def from_text ( self ) : <EOL> if self . connection . mysql_version < ( <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:0> ) : <EOL> return '<STR_LIT>' <EOL> return '<STR_LIT>' <EOL> gis_operators = { <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> '<STR_LIT>' : SpatialOperator ( func = '<STR_LIT>' ) , <EOL> } <EOL> @ cached_property <EOL> def function_names ( self ) : <EOL> return { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' if self . connection . mysql_version < ( <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:0> ) else '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> disallowed_aggregates = ( <EOL> aggregates . Collect , aggregates . Extent , aggregates . Extent3D , <EOL> aggregates . MakeLine , aggregates . Union , <EOL> ) <EOL> @ cached_property <EOL> def unsupported_functions ( self ) : <EOL> unsupported = { <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> } <EOL> if self . connection . mysql_version < ( <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:1> ) : <EOL> unsupported . update ( { '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' } ) <EOL> return unsupported <EOL> def geo_db_type ( self , f ) : <EOL> return f . geom_type <EOL> def get_geom_placeholder ( self , f , value , compiler ) : <EOL> """<STR_LIT>""" <EOL> if hasattr ( value , '<STR_LIT>' ) : <EOL> placeholder , _ = compiler . compile ( value ) <EOL> else : <EOL> placeholder = '<STR_LIT>' % self . from_text <EOL> return placeholder </s>
