本文整理匯總了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 {}