# Path: sqlalchemy_continuum/utils.py
# def tx_column_name(obj):
#     return option(obj, 'transaction_column_name')
# 
# def end_tx_column_name(obj):
#     return option(obj, 'end_transaction_column_name')


import operator
import sqlalchemy as sa
from sqlalchemy_utils import get_primary_keys, identity
from .utils import tx_column_name, end_tx_column_name


def parent_identity(obj_or_class):
    return tuple(
        getattr(obj_or_class, column_key)
        for column_key in get_primary_keys(obj_or_class).keys()
        if column_key != tx_column_name(obj_or_class)
    )


def eqmap(callback, iterable):
    for a, b in zip(*map(callback, iterable)):
        yield a == b



# Path: sqlalchemy_continuum/utils.py
# def tx_column_name(obj):
#     return option(obj, 'transaction_column_name')
# 
# def end_tx_column_name(obj):
#     return option(obj, 'end_transaction_column_name')


# Path: sqlalchemy_continuum/fetcher.py
import operator
import sqlalchemy as sa
from sqlalchemy_utils import get_primary_keys, identity
from .utils import tx_column_name, end_tx_column_name



def parent_identity(obj_or_class):
    return tuple(
        getattr(obj_or_class, column_key)
        for column_key in get_primary_keys(obj_or_class).keys()
        if column_key != tx_column_name(obj_or_class)
    )


def eqmap(callback, iterable):
    for a, b in zip(*map(callback, iterable)):
        yield a == b



def parent_criteria(obj, class_=None):