def __init__(self, query_class): """ :param query_class: 要查询的 class 名称或者对象 :type query_class: string_types or leancloud.ObjectMeta """ if isinstance(query_class, six.string_types): if query_class in ('File', '_File'): query_class = File else: query_class = Object.extend(query_class) if not isinstance(query_class, (type, six.class_types)) or not issubclass( query_class, (File, Object)): raise ValueError('Query takes string or LeanCloud Object') self._query_class = query_class self._where = {} self._include = [] self._include_acl = None self._limit = -1 self._skip = 0 self._extra = {} self._order = [] self._select = []
def __init__(self, query_class): """ :param query_class: 要查询的 class 名称或者对象 :type query_class: basestring or leancloud.ObjectMeta """ if isinstance(query_class, basestring): query_class = Object.extend(query_class) self._query_class = query_class self._where = {} self._include = [] self._limit = -1 self._skip = 0 self._extra = {} self._order = [] self._select = []
def __init__(self, query_class): """ :param query_class: 要查询的 class 名称或者对象 :type query_class: basestring or leancloud.ObjectMeta """ if isinstance(query_class, basestring): query_class = Object.extend(query_class) elif not issubclass(query_class, Object): raise ValueError("Query takes string or LeanCloud Object") self._query_class = query_class self._where = {} self._include = [] self._limit = -1 self._skip = 0 self._extra = {} self._order = [] self._select = []
def __init__(self, query_class): """ :param query_class: 要查询的 class 名称或者对象 :type query_class: string_types or leancloud.ObjectMeta """ if isinstance(query_class, string_types): query_class = Object.extend(query_class) if (not isinstance(query_class, (type, class_types))) or (not issubclass(query_class, Object)): raise ValueError('Query takes string or LeanCloud Object') self._query_class = query_class self._where = {} self._include = [] self._limit = -1 self._skip = 0 self._extra = {} self._order = [] self._select = []
def __init__(self, query_class): """ :param query_class: 要查询的 class 名称或者对象 :type query_class: basestring or leancloud.ObjectMeta """ if isinstance(query_class, basestring): query_class = Object.extend(query_class) if (not isinstance(query_class, (type, types.ClassType))) or (not issubclass( query_class, Object)): raise ValueError('Query takes string or LeanCloud Object') self._query_class = query_class self._where = {} self._include = [] self._limit = -1 self._skip = 0 self._extra = {} self._order = [] self._select = []