# Path: sentry/interfaces.py
# def unserialize(klass, data):
#     value = _EmptyClass()
#     value.__class__ = klass
#     value.__setstate__(data)
#     return value
# 
# Path: sentry/db/models.py
# def to_db(model, values):
#     def __init__(self, manager):
#     def __get__(self, instance, type=None):
#     def __init__(self, model, order_by=None, filter_by=None):
#     def __repr__(self):
#     def __getitem__(self, key):
#     def __len__(self):
#     def __iter__(self):
#     def _get_results(self, start, num, index, desc=False):
#     def order_by(self, index):
#     def __init__(self, model):
#     def count(self):
#     def get_query_set(self):
#     def filter(self, **kwargs):
#     def all(self):
#     def order_by(self, index):
#     def get(self, pk):
#     def create(self, **values):
#     def set_meta(self, pk, **values):
#     def get_meta(self, pk):
#     def remove_from_index(self, pk, index):
#     def add_to_index(self, pk, index, score):
#     def get_or_create(self, defaults=None, **index):
#     def __init__(self, meta, attrs):
#     def __new__(cls, name, bases, attrs):
#     def __init__(self, pk=None, **kwargs):
#     def __eq__(self, other):
#     def __setattr__(self, key, value):
#     def __repr__(self):
#     def __unicode__(self):
#     def decr(self, key, amount=1):
#     def incr(self, key, amount=1):
#     def save(self):
#     def update(self, **values):
#     def delete(self):
#     def set_meta(self, **values):
#     def get_meta(self):
#     def add_relation(self, instance, score):
#     def get_relations(self, model, offset=0, limit=100, desc=True):
#     def _get_data(self):
#     def __init__(self, default=None, **kwargs):
#     def get_default(self):
#     def to_db(self, value=None):
#     def to_python(self, value=None):
#     def __init__(self, to_model):
#     def to_python(self, value=None):
#     def to_python(self, value=None):
#     def to_python(self, value=None):
#     def to_db(self, value=None):
#     def to_python(self, value=None):
#     def to_db(self, value=None):
#     def to_python(self, value=None):
# class DoesNotExist(Exception):
# class DuplicateKeyError(Exception):
# class ManagerDescriptor(object):
# class QuerySet(object):
# class Manager(object):
# class Options(object):
# class ModelDescriptor(type):
# class Model(object):
# class Field(object):
# class ForeignKey(object):
# class String(Field):
# class Text(String):
# class Integer(Field):
# class Float(Field):
# class DateTime(Field):
# class List(Field):
# 
# Path: sentry/utils/compat.py



import datetime
import hashlib
from sentry.interfaces import unserialize
from sentry.db import models
from sentry.utils.compat import math
"""
sentry.models
~~~~~~~~~~~~~

:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from __future__ import absolute_import



class Group(models.Model):
    """
    Stores an aggregate (summary) of Event's for a combination of tags
    given a slice.
    """

    # key is (type, hash)

    # this is the combination of md5(' '.join(tags)) + md5(event)
    type            = models.String() # length 32
    hash            = models.String() # length 32
    # one line summary used for rendering

# Path: sentry/interfaces.py
# def unserialize(klass, data):
#     value = _EmptyClass()
#     value.__class__ = klass
#     value.__setstate__(data)
#     return value
# 
# Path: sentry/db/models.py
# def to_db(model, values):
#     def __init__(self, manager):
#     def __get__(self, instance, type=None):
#     def __init__(self, model, order_by=None, filter_by=None):
#     def __repr__(self):
#     def __getitem__(self, key):
#     def __len__(self):
#     def __iter__(self):
#     def _get_results(self, start, num, index, desc=False):
#     def order_by(self, index):
#     def __init__(self, model):
#     def count(self):
#     def get_query_set(self):
#     def filter(self, **kwargs):
#     def all(self):
#     def order_by(self, index):
#     def get(self, pk):
#     def create(self, **values):
#     def set_meta(self, pk, **values):
#     def get_meta(self, pk):
#     def remove_from_index(self, pk, index):
#     def add_to_index(self, pk, index, score):
#     def get_or_create(self, defaults=None, **index):
#     def __init__(self, meta, attrs):
#     def __new__(cls, name, bases, attrs):
#     def __init__(self, pk=None, **kwargs):
#     def __eq__(self, other):
#     def __setattr__(self, key, value):
#     def __repr__(self):
#     def __unicode__(self):
#     def decr(self, key, amount=1):
#     def incr(self, key, amount=1):
#     def save(self):
#     def update(self, **values):
#     def delete(self):
#     def set_meta(self, **values):
#     def get_meta(self):
#     def add_relation(self, instance, score):
#     def get_relations(self, model, offset=0, limit=100, desc=True):
#     def _get_data(self):
#     def __init__(self, default=None, **kwargs):
#     def get_default(self):
#     def to_db(self, value=None):
#     def to_python(self, value=None):
#     def __init__(self, to_model):
#     def to_python(self, value=None):
#     def to_python(self, value=None):
#     def to_python(self, value=None):
#     def to_db(self, value=None):
#     def to_python(self, value=None):
#     def to_db(self, value=None):
#     def to_python(self, value=None):
# class DoesNotExist(Exception):
# class DuplicateKeyError(Exception):
# class ManagerDescriptor(object):
# class QuerySet(object):
# class Manager(object):
# class Options(object):
# class ModelDescriptor(type):
# class Model(object):
# class Field(object):
# class ForeignKey(object):
# class String(Field):
# class Text(String):
# class Integer(Field):
# class Float(Field):
# class DateTime(Field):
# class List(Field):
# 
# Path: sentry/utils/compat.py



# Path: sentry/models.py
import datetime
import hashlib
from sentry.interfaces import unserialize
from sentry.db import models
from sentry.utils.compat import math

"""
sentry.models
~~~~~~~~~~~~~

:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from __future__ import absolute_import



class Group(models.Model):
    """
    Stores an aggregate (summary) of Event's for a combination of tags
    given a slice.
    """

    # key is (type, hash)

    # this is the combination of md5(' '.join(tags)) + md5(event)
    type            = models.String() # length 32
    hash            = models.String() # length 32
    # one line summary used for rendering

    message         = models.Text()