本文整理汇总了Python中django.db.models.sql.RawQuery方法的典型用法代码示例。如果您正苦于以下问题:Python sql.RawQuery方法的具体用法?Python sql.RawQuery怎么用?Python sql.RawQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类django.db.models.sql
的用法示例。
在下文中一共展示了sql.RawQuery方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from django.db.models import sql [as 别名]
# 或者: from django.db.models.sql import RawQuery [as 别名]
def __init__(self, raw_query, model=None, query=None, params=None,
translations=None, using=None, hints=None):
self.raw_query = raw_query
self.model = model
self._db = using
self._hints = hints or {}
self.query = query or sql.RawQuery(sql=raw_query, using=self.db, params=params)
self.params = params or ()
self.translations = translations or {}
示例2: __init__
# 需要导入模块: from django.db.models import sql [as 别名]
# 或者: from django.db.models.sql import RawQuery [as 别名]
def __init__(self, raw_query, model=None, query=None, params=None,
translations=None, using=None, hints=None):
self.raw_query = raw_query
self.model = model
self._db = using
self._hints = hints or {}
self.query = query or sql.RawQuery(sql=raw_query, using=self.db, params=params)
self.params = params or ()
self.translations = translations or {}
示例3: __init__
# 需要导入模块: from django.db.models import sql [as 别名]
# 或者: from django.db.models.sql import RawQuery [as 别名]
def __init__(self, raw_query, model=None, query=None, params=None,
translations=None, using=None, hints=None):
self.raw_query = raw_query
self.model = model
self._db = using
self._hints = hints or {}
self.query = query or sql.RawQuery(sql=raw_query, using=self.db, params=params)
self.params = params or ()
self.translations = translations or {}
self._result_cache = None
self._prefetch_related_lookups = ()
self._prefetch_done = False
示例4: __init__
# 需要导入模块: from django.db.models import sql [as 别名]
# 或者: from django.db.models.sql import RawQuery [as 别名]
def __init__(self, raw_query, model=None, query=None, params=None,
translations=None, using=None):
self.raw_query = raw_query
self.model = model
self._db = using
self.query = query or sql.RawQuery(sql=raw_query, using=self.db, params=params)
self.params = params or ()
self.translations = translations or {}