Changes between Version 22 and Version 23 of NonSqlBackends

08/30/2009 07:39:24 AM (9 years ago)
Waldemar Kornewald



  • NonSqlBackends

    v22 v23  
    1212Database 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.
    1313Additionally the backends Query class should not be referenced by sql.Query (cause it can have nothing to do with sql)
     15== Emulation of SQL features ==
     17If we emulate certain SQL features, it must be possible to detect when something gets emulated. This is important because you might mistakenly develop code that doesn't scale when your database grows beyond a certain size. In we could have a flag which specifies whether to throw warnings for emulated features (ENABLE_DB_EMULATION_WARNINGS?). By default, warnings should be enabled, so you never miss potential sources of problems.
    1519= sql.subqueries =
Back to Top