Ticket #593: fulltext.patch
File fulltext.patch, 3.5 KB (added by , 19 years ago) |
---|
-
core/db/__init__.py
36 36 get_random_function_sql = dbmod.get_random_function_sql 37 37 get_table_list = dbmod.get_table_list 38 38 get_relations = dbmod.get_relations 39 get_fulltext_op_sql = dbmod.get_fulltext_op_sql 39 40 OPERATOR_MAPPING = dbmod.OPERATOR_MAPPING 40 41 DATA_TYPES = dbmod.DATA_TYPES 41 42 DATA_TYPES_REVERSE = dbmod.DATA_TYPES_REVERSE -
core/db/backends/ado_mssql.py
115 115 def get_relations(cursor, table_name): 116 116 raise NotImplementedError 117 117 118 def get_fulltext_op_sql(): 119 raise NotImplementedError 120 118 121 OPERATOR_MAPPING = { 119 122 'exact': '=', 120 123 'iexact': 'LIKE', -
core/db/backends/mysql.py
127 127 def get_relations(cursor, table_name): 128 128 raise NotImplementedError 129 129 130 def get_fulltext_op_sql(**kwargs): 131 return "match (%s%s) against ('%s' in boolean mode)" 132 130 133 OPERATOR_MAPPING = { 131 134 'exact': '=', 132 135 'iexact': 'LIKE', -
core/db/backends/postgresql.py
121 121 continue 122 122 return relations 123 123 124 def get_fulltext_op_sql(): 125 raise NotImplementedError 126 124 127 # Register these custom typecasts, because Django expects dates/times to be 125 128 # in Python's native (standard-library) datetime/time format, whereas psycopg 126 129 # use mx.DateTime by default. -
core/db/backends/sqlite3.py
129 129 def get_relations(cursor, table_name): 130 130 raise NotImplementedError 131 131 132 def get_fulltext_op_sql(): 133 raise NotImplementedError 134 132 135 # Operators and fields ######################################################## 133 136 134 137 OPERATOR_MAPPING = { -
core/meta/__init__.py
1092 1092 return "%s = %%s" % db.get_date_extract_sql(lookup_type, table_prefix + field_name) 1093 1093 elif lookup_type == 'isnull': 1094 1094 return "%s%s IS %sNULL" % (table_prefix, field_name, (not value and 'NOT ' or '')) 1095 elif lookup_type == 'match': 1096 return db.get_fulltext_op_sql() % (table_prefix, field_name, value) 1095 1097 raise TypeError, "Got invalid lookup_type: %s" % repr(lookup_type) 1096 1098 1097 1099 def function_get_object(opts, klass, does_not_exist_exception, **kwargs): -
core/meta/fields.py
171 171 return ["%s%%" % prep_for_like_query(value)] 172 172 elif lookup_type in ('endswith', 'iendswith'): 173 173 return ["%%%s" % prep_for_like_query(value)] 174 elif lookup_type == 'isnull':174 elif lookup_type in ('isnull', 'match'): 175 175 return [] 176 176 raise TypeError, "Field has invalid lookup: %s" % lookup_type 177 177