Changes between Version 14 and Version 15 of NonSqlBackends
- Timestamp:
- Aug 13, 2009, 1:35:39 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NonSqlBackends
v14 v15 2 2 3 3 Database query operations (get, count, ... entities) are provided to Django models via managers. Managers basically wrap around QuerySet methods. Internally Django's QuerySet class uses sql.Query whose default is sql.BaseQuery. sql.Query can be overridden to use a custom Query class (the backend). So we end up writting a Query class in order to provide a specific backend. So anything done in Django's Model methods or QuerySet methods which cannot be done for a specific backend should be moved into the Query in order to allow backends to specify what to do in such cases. 4 Additionally the backends Query class should not be referenced by sql.Query (cause it can have nothing to do with sql) 4 5 5 6 = sql.subqueries = … … 7 8 The query classes defined in this module are used by QuerySet and Model, but it's not possible to override the subquery classes. 8 9 9 TODO: Is this necessary, at all? Probably yes if you want a clean port .10 TODO: Is this necessary, at all? Probably yes if you want a clean port so provide functionality to override subquery classes. 10 11 11 12 = Fields =