Module Expr Str ImportFrom alias Import alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad Str TupleLoad body If BoolOpAnd CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num UnaryOpNot BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Raise NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr CompareLt NameLoad Num orelse Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr CompareLt NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Assign NameStore Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore NameLoad While NameLoad body If BoolOpOr BoolOpAnd NameLoad CompareGtE NameLoad NameLoad BoolOpAnd NameLoad CompareGtE NameLoad NameLoad body Break Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Dict BinOpMod Str AttributeLoad NameLoad attr NameLoad orelse If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Dict BinOpMod Str AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad For NameStore NameLoad body If CompareEq NameLoad NameLoad body Continue Expr Yield NameLoad AugAssignAdd NameStore Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Break Assign NameStore CompareGt NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot NameLoad body Return Call NameLoad ListLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr Return Call NameLoad Call NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If BoolOpAnd CompareIs NameLoad NameLoad Call NameLoad NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad BoolOpOr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body If CompareNotEq AttributeLoad NameLoad attr Num body Assign NameStore ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Yield NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body If NameLoad body Assign NameStore ListComp Call NameLoad NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad If NameLoad body For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Lambda arguments args NameParam defaults NameLoad Str body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr ListLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot NameLoad body If CompareEq NameLoad NameLoad body Continue Raise Call NameLoad BinOpMod Str NameLoad For NameStore NameLoad body Assign NameStore UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict For NameStore NameLoad body If CompareEq Call NameLoad NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad If UnaryOpNot NameLoad body If CompareEq NameLoad NameLoad body Continue Raise Call NameLoad Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad NameLoad TryExcept body With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr keyword AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr keyword AttributeLoad NameLoad attr attr If NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad kwarg body Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str Call NameLoad keyword Call AttributeLoad Str attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad orelse If Call AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str Call NameLoad keyword Call AttributeLoad Str attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad orelse If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad For NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Slice NameLoad body Expr Call AttributeLoad NameLoad attr Assign NameStore NameLoad Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return CompareGt AttributeLoad NameLoad attr Num decorator_list
N/A N/A 
sentry.utils.query
~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
 __future__ absolute_import N/A progressbar django.db connections IntegrityError router transaction django.db.models ForeignKey django.db.models.deletion Collector django.db.models.signals pre_delete pre_save post_save post_delete sentry.utils db InvalidQuerySetError N/A ValueError N/A N/A N/A RangeQuerySetWrapper N/A object N/A N/A 
    Iterates through a queryset by chunking results by ``step`` and using GREATER THAN
    and LESS THAN queries on the primary key.

    Very efficient, but ORDER BY statements will not work.
     __init__ N/A N/A self queryset step limit min_id order_by callbacks N/A 1000 None None pk N/A N/A N/A N/A N/A N/A N/A queryset query low_mark 0 N/A N/A N/A N/A queryset query order_by N/A N/A queryset query extra_order_by N/A N/A N/A limit None N/A N/A limit N/A N/A queryset query high_mark N/A N/A N/A N/A queryset query clear_limits N/A N/A InvalidQuerySetError N/A N/A self limit limit N/A limit N/A N/A N/A self step N/A min limit N/A abs step N/A N/A self desc N/A step 0 N/A N/A N/A self step N/A abs step N/A N/A self desc N/A step 0 N/A N/A self queryset queryset N/A N/A self min_value min_id N/A N/A self order_by order_by N/A N/A self callbacks callbacks N/A __iter__ N/A N/A self N/A N/A N/A max_value None N/A N/A N/A self min_value None N/A N/A cur_value N/A self min_value N/A N/A cur_value None N/A num 0 N/A limit N/A self limit N/A queryset N/A self queryset N/A N/A self desc N/A N/A queryset N/A N/A queryset order_by N/A -%s N/A self order_by N/A N/A queryset N/A N/A queryset order_by N/A self order_by N/A last_object None N/A has_results True N/A has_results N/A N/A N/A N/A max_value N/A cur_value max_value N/A limit N/A num limit N/A N/A N/A start num N/A N/A cur_value None N/A N/A results queryset N/A N/A N/A self desc N/A N/A results N/A N/A queryset filter N/A N/A %s__lte N/A self order_by cur_value N/A N/A N/A N/A self desc N/A N/A results N/A N/A queryset filter N/A N/A %s__gte N/A self order_by cur_value N/A results N/A list N/A results N/A 0 N/A self step N/A cb N/A self callbacks N/A N/A N/A cb results N/A result results N/A N/A N/A result last_object N/A N/A N/A N/A result N/A num 1 N/A cur_value N/A getattr result N/A self order_by N/A last_object result N/A N/A cur_value None N/A N/A N/A has_results N/A num start N/A N/A RangeQuerySetWrapperWithProgressBar N/A RangeQuerySetWrapper N/A __iter__ N/A N/A self N/A N/A N/A total_count N/A N/A N/A self queryset count N/A N/A total_count N/A N/A N/A iter N/A N/A iterator N/A N/A N/A super RangeQuerySetWrapperWithProgressBar self __iter__ N/A label N/A N/A N/A N/A N/A N/A self queryset model _meta verbose_name_plural title N/A N/A iter N/A WithProgressBar iterator total_count label N/A N/A WithProgressBar N/A object N/A __init__ N/A N/A self iterator count caption N/A None None N/A N/A N/A N/A count None N/A hasattr iterator __len__ N/A N/A count N/A len iterator N/A N/A self iterator iterator N/A N/A self count count N/A N/A self caption N/A unicode N/A caption Progress N/A __iter__ N/A N/A self N/A N/A N/A N/A N/A self count 0 N/A N/A widgets N/A N/A %s:  N/A N/A self caption N/A N/A progressbar Percentage N/A N/A progressbar Bar N/A N/A progressbar ETA N/A pbar N/A N/A progressbar ProgressBar widgets widgets maxval N/A self count N/A N/A N/A pbar start N/A N/A idx item N/A enumerate N/A self iterator N/A N/A N/A item N/A N/A N/A pbar update idx N/A N/A N/A pbar finish N/A N/A EverythingCollector N/A Collector N/A N/A 
    More or less identical to the default Django collector except we always
    return relations (even when they shouldn't matter).
     collect N/A N/A self objs source nullable collect_related source_attr reverse_dependency N/A None False True None False N/A N/A new_objs N/A N/A self add objs N/A N/A new_objs N/A N/A N/A model N/A type N/A new_objs N/A 0 N/A concrete_model N/A N/A model _meta concrete_model N/A ptr N/A N/A N/A N/A concrete_model _meta parents iteritems N/A N/A ptr N/A N/A parent_objs N/A N/A getattr obj N/A ptr name N/A obj new_objs N/A N/A N/A self collect parent_objs source model source_attr N/A N/A ptr rel related_name collect_related False reverse_dependency True N/A collect_related N/A N/A related N/A N/A N/A model _meta get_all_related_objects include_hidden True include_proxy_eq True N/A N/A sub_objs N/A N/A self related_objects related new_objs N/A N/A N/A self add sub_objs N/A relation N/A N/A model _meta many_to_many N/A N/A N/A N/A N/A relation rel through N/A N/A sub_objs N/A N/A relation bulk_related_objects new_objs N/A self using N/A N/A N/A self collect sub_objs source model source_attr N/A N/A relation rel related_name nullable True N/A N/A merge_into N/A N/A self other callback using N/A N/A N/A N/A x N/A x default N/A N/A 
    Collects objects related to ``self`` and updates their foreign keys to
    point to ``other``.

    If ``callback`` is specified, it will be executed on each collected chunk
    before any changes are made, and should return a modified list of results
    that still need updated.

    NOTE: Duplicates (unique constraints) which exist and are bound to ``other``
    are preserved, and relations on ``self`` are discarded.
     N/A s_model N/A type self N/A collector N/A EverythingCollector using using N/A N/A N/A collector collect N/A self N/A N/A model objects N/A N/A N/A collector data iteritems N/A N/A fields N/A set N/A N/A f name N/A f N/A N/A model _meta fields N/A N/A isinstance f ForeignKey N/A N/A N/A f rel to s_model N/A N/A f rel to N/A N/A fields N/A N/A N/A model s_model N/A N/A N/A N/A TypeError N/A Unable to determine related keys on %r model N/A obj objects N/A N/A send_signals N/A N/A N/A model _meta auto_created N/A update_kwargs N/A N/A f_name fields N/A N/A N/A N/A getattr obj f_name self N/A N/A N/A update_kwargs N/A f_name other N/A N/A update_kwargs N/A N/A N/A obj self N/A N/A N/A N/A ValueError Mismatched row present in related results N/A signal_kwargs N/A sender instance using migrated model obj using True N/A send_signals N/A N/A N/A N/A pre_delete send signal_kwargs N/A N/A N/A post_delete send signal_kwargs N/A N/A k v N/A N/A update_kwargs iteritems N/A N/A N/A setattr obj k v N/A send_signals N/A N/A N/A N/A pre_save send created True signal_kwargs N/A N/A N/A N/A N/A transaction atomic using using N/A N/A N/A N/A N/A N/A N/A N/A N/A model objects using using filter pk N/A obj pk update update_kwargs N/A N/A N/A IntegrityError N/A N/A N/A N/A N/A N/A N/A N/A N/A model objects using using filter pk N/A obj pk delete N/A send_signals N/A N/A N/A N/A post_save send created True signal_kwargs N/A bulk_delete_objects N/A N/A model limit logger N/A 10000 None filters N/A N/A connection N/A connections N/A N/A N/A router db_for_write model N/A quote_name N/A N/A connection ops quote_name N/A query N/A N/A params N/A N/A N/A column value N/A N/A filters items N/A N/A N/A N/A query append N/A %s = %%s N/A N/A quote_name column N/A N/A N/A params append value N/A N/A logger None N/A N/A N/A N/A logger info Removing %r objects where %s=%r model column value N/A N/A N/A db is_postgres N/A N/A query N/A 
            delete from %(table)s
            where id = any(array(
                select id
                from %(table)s
                where (%(query)s)
                limit %(limit)d
            ))
         N/A dict query N/A N/A  AND  join query table N/A N/A model _meta db_table limit limit N/A N/A N/A N/A db is_mysql N/A N/A query N/A 
            delete from %(table)s
            where (%(query)s)
            limit %(limit)d
         N/A dict query N/A N/A  AND  join query table N/A N/A model _meta db_table limit limit N/A N/A N/A logger None N/A N/A N/A N/A logger warning Using slow deletion strategy due to unknown database N/A has_more False N/A obj N/A N/A N/A N/A model objects filter filters N/A limit N/A N/A N/A N/A obj delete N/A has_more True N/A has_more N/A cursor N/A N/A connection cursor N/A N/A N/A cursor execute query params N/A N/A N/A cursor rowcount 0 N/A