# Path: solace/database.py
# def get_engine():
# def refresh_engine():
# def atomic_add(obj, column, delta, expire=False):
# def mapper(model, table, **options):
#     def cursor_execute(self, execute, cursor, statement, parameters,
#                        context, executemany):
#     def after_delete(self, mapper, connection, instance):
#     def after_insert(self, mapper, connection, instance):
#     def after_update(self, mapper, connection, instance):
#     def _record(self, model, operation):
#     def before_commit(self, session):
#     def after_commit(self, session):
#     def after_rollback(self, session):
#     def __init__(self):
#     def __init__(self):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def is_mutable(self):
#     def __init__(self):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def is_mutable(self):
# def init():
# def drop_tables():
# def add_query_debug_headers(request, response):
# def request_track_query(cursor, statement, parameters, time):
# class ConnectionQueryTrackingProxy(ConnectionProxy):
# class SignalTrackingMapperExtension(MapperExtension):
# class SignalEmittingSessionExtension(SessionExtension):
# class SignalTrackingSession(Session):
# class LocaleType(TypeDecorator):
# class BadgeType(TypeDecorator):


from sqlalchemy import Table, Column, Integer, String, Text, DateTime, \
     ForeignKey, Boolean, Float
from solace.database import LocaleType, BadgeType, metadata
    Column('upvotes', Integer, nullable=False),
    # the number of downvotes casted
    Column('downvotes', Integer, nullable=False),
    # the number of bronce badges
    Column('bronce_badges', Integer, nullable=False),
    # the number of silver badges
    Column('silver_badges', Integer, nullable=False),
    # the number of gold badges
    Column('gold_badges', Integer, nullable=False),
    # the number of platin badges
    Column('platin_badges', Integer, nullable=False),
    # true if the user is an administrator
    Column('is_admin', Boolean, nullable=False),
    # true if the user is banned
    Column('is_banned', Boolean, nullable=False),
    # the date of the last login
    Column('last_login', DateTime),
    # the user's activation key.  If this is NULL, the user is already
    # activated, otherwise this is the key the user has to enter on the
    # activation page (it's part of the link actually) to activate the
    # account.
    Column('activation_key', String(10))
)

user_activities = Table('user_activities', metadata,
    # the id of the actitity, exists only for the database
    Column('activity_id', Integer, primary_key=True),
    # the user the activity is for
    Column('user_id', Integer, ForeignKey('users.user_id')),
    # the language code for this activity stat

# Path: solace/database.py
# def get_engine():
# def refresh_engine():
# def atomic_add(obj, column, delta, expire=False):
# def mapper(model, table, **options):
#     def cursor_execute(self, execute, cursor, statement, parameters,
#                        context, executemany):
#     def after_delete(self, mapper, connection, instance):
#     def after_insert(self, mapper, connection, instance):
#     def after_update(self, mapper, connection, instance):
#     def _record(self, model, operation):
#     def before_commit(self, session):
#     def after_commit(self, session):
#     def after_rollback(self, session):
#     def __init__(self):
#     def __init__(self):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def is_mutable(self):
#     def __init__(self):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def is_mutable(self):
# def init():
# def drop_tables():
# def add_query_debug_headers(request, response):
# def request_track_query(cursor, statement, parameters, time):
# class ConnectionQueryTrackingProxy(ConnectionProxy):
# class SignalTrackingMapperExtension(MapperExtension):
# class SignalEmittingSessionExtension(SessionExtension):
# class SignalTrackingSession(Session):
# class LocaleType(TypeDecorator):
# class BadgeType(TypeDecorator):


# Path: solace/schema.py
from sqlalchemy import Table, Column, Integer, String, Text, DateTime, \
     ForeignKey, Boolean, Float
from solace.database import LocaleType, BadgeType, metadata

    Column('upvotes', Integer, nullable=False),
    # the number of downvotes casted
    Column('downvotes', Integer, nullable=False),
    # the number of bronce badges
    Column('bronce_badges', Integer, nullable=False),
    # the number of silver badges
    Column('silver_badges', Integer, nullable=False),
    # the number of gold badges
    Column('gold_badges', Integer, nullable=False),
    # the number of platin badges
    Column('platin_badges', Integer, nullable=False),
    # true if the user is an administrator
    Column('is_admin', Boolean, nullable=False),
    # true if the user is banned
    Column('is_banned', Boolean, nullable=False),
    # the date of the last login
    Column('last_login', DateTime),
    # the user's activation key.  If this is NULL, the user is already
    # activated, otherwise this is the key the user has to enter on the
    # activation page (it's part of the link actually) to activate the
    # account.
    Column('activation_key', String(10))
)

user_activities = Table('user_activities', metadata,
    # the id of the actitity, exists only for the database
    Column('activity_id', Integer, primary_key=True),
    # the user the activity is for
    Column('user_id', Integer, ForeignKey('users.user_id')),
    # the language code for this activity stat

    Column('locale', LocaleType, index=True),