Python sqlalchemy.types 模块,SchemaType() 实例源码

我们从Python开源项目中,提取了以下10个代码示例,用于说明如何使用sqlalchemy.types.SchemaType()

项目:Flask_Blog    作者:sugarguo    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:chihu    作者:yelongyu    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:ShelbySearch    作者:Agentscreech    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:Price-Comparator    作者:Thejas-1    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:Callandtext    作者:iaora    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if util.sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:webapp    作者:superchilli    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:QualquerMerdaAPI    作者:tiagovizoto    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:gardenbot    作者:GoestaO    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:flask-zhenai-mongo-echarts    作者:Fretice    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )
项目:ngx_status    作者:YoYoAdorkable    | 项目源码 | 文件源码
def _is_type_bound(constraint):
    # this deals with SQLAlchemy #3260, don't copy CHECK constraints
    # that will be generated by the type.
    if sqla_100:
        # new feature added for #3260
        return constraint._type_bound
    else:
        # old way, look at what we know Boolean/Enum to use
        return (
            constraint._create_rule is not None and
            isinstance(
                getattr(constraint._create_rule, "target", None),
                sqltypes.SchemaType)
        )