import os import sys from sqlbuilder.smartsql import warn warn('sqlbuilder.django_sqlbuilder.compilers', 'django_sqlbuilder.dialects') __path__.insert(0, os.path.join( os.path.dirname(os.path.dirname(os.path.realpath(sys.modules[__name__].__file__))), 'dialects' ))
import os import sys from sqlbuilder.smartsql import warn warn('sqlbuilder.smartsql.compilers', 'sqlbuilder.smartsql.dialects') __path__.insert(0, os.path.join( os.path.dirname(os.path.dirname(os.path.realpath(sys.modules[__name__].__file__))), 'dialects' ))
def get_db(alias=None): smartsql.warn('get_db', 'databases') return databases[alias or 'default']
def qs(self): smartsql.warn('Table.qs', 'Table.q') return self._mapper.query
def qs(cls): smartsql.warn("Model.qs", "Model.q") return mapper_registry[cls].query