# 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):


import sentry.models
from sentry.db import models
from sqlalchemy import Table, Column, Integer, Float, String, Text, \
                       DateTime, MetaData


__all__ = ('metadata', 'model_map', 'model_meta')

column_map = {
    models.String: lambda x: String(255, default=x.default, nullable=True),
    models.Text: lambda x: Text(default=x.default, nullable=True),
    models.Integer: lambda x: Integer(default=x.default, nullable=True),

# 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/db/backends/sqlalchemy/models.py
import sentry.models
from sentry.db import models
from sqlalchemy import Table, Column, Integer, Float, String, Text, \
                       DateTime, MetaData



__all__ = ('metadata', 'model_map', 'model_meta')

column_map = {
    models.String: lambda x: String(255, default=x.default, nullable=True),
    models.Text: lambda x: Text(default=x.default, nullable=True),
    models.Integer: lambda x: Integer(default=x.default, nullable=True),

    models.Float: lambda x: Float(default=x.default, nullable=True),