# Path: sqlalchemy_continuum/factory.py
# class ModelFactory(object):
#     model_name = None
# 
#     def __call__(self, manager):
#         """
#         Create model class but only if it doesn't already exist
#         in declarative model registry.
#         """
#         Base = manager.declarative_base
#         try:
#             registry = Base.registry._class_registry
#         except AttributeError:  # SQLAlchemy < 1.4
#             registry = Base._decl_class_registry
#         if self.model_name not in registry:
#             return self.create_class(manager)
#         return registry[self.model_name]


from datetime import datetime
from functools import partial
    from collections import OrderedDict
    from ordereddict import OrderedDict
from sqlalchemy.ext.compiler import compiles
from .dialects.postgresql import (
    CreateTemporaryTransactionTableSQL,
    InsertTemporaryTransactionSQL,
    TransactionTriggerSQL
)
from .exc import ImproperlyConfigured
from .factory import ModelFactory
import six
import sqlalchemy as sa

try:
except ImportError:



@compiles(sa.types.BigInteger, 'sqlite')
def compile_big_integer(element, compiler, **kw):
    return 'INTEGER'


class NoChangesAttribute(Exception):
    pass


class TransactionBase(object):

# Path: sqlalchemy_continuum/factory.py
# class ModelFactory(object):
#     model_name = None
# 
#     def __call__(self, manager):
#         """
#         Create model class but only if it doesn't already exist
#         in declarative model registry.
#         """
#         Base = manager.declarative_base
#         try:
#             registry = Base.registry._class_registry
#         except AttributeError:  # SQLAlchemy < 1.4
#             registry = Base._decl_class_registry
#         if self.model_name not in registry:
#             return self.create_class(manager)
#         return registry[self.model_name]


# Path: sqlalchemy_continuum/transaction.py
from datetime import datetime
from functools import partial
    from collections import OrderedDict
    from ordereddict import OrderedDict
from sqlalchemy.ext.compiler import compiles
from .dialects.postgresql import (
    CreateTemporaryTransactionTableSQL,
    InsertTemporaryTransactionSQL,
    TransactionTriggerSQL
)
from .exc import ImproperlyConfigured
from .factory import ModelFactory
import six
import sqlalchemy as sa


try:
except ImportError:



@compiles(sa.types.BigInteger, 'sqlite')
def compile_big_integer(element, compiler, **kw):
    return 'INTEGER'


class NoChangesAttribute(Exception):
    pass


class TransactionBase(object):

    issued_at = sa.Column(sa.DateTime, default=datetime.utcnow)