fix merge conflict artifacts making library unusable
This commit is contained in:
parent
94faac8863
commit
a127c88159
3 changed files with 11 additions and 13 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.5.2
|
||||||
|
|
||||||
|
- Fixed poorly handled merge conflict leaving `.sqlalchemy` modulem unusable
|
||||||
|
|
||||||
## 0.5.1
|
## 0.5.1
|
||||||
|
|
||||||
- Fixed return types for `.sqlalchemy` module
|
- Fixed return types for `.sqlalchemy` module
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ from .validators import matches
|
||||||
from .redact import redact_url_password
|
from .redact import redact_url_password
|
||||||
from .http import WantsContentType
|
from .http import WantsContentType
|
||||||
|
|
||||||
__version__ = "0.5.1"
|
__version__ = "0.5.2"
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,8 @@ from abc import ABCMeta, abstractmethod
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from typing import Callable, Iterable, Never, TypeVar
|
from typing import Callable, Iterable, Never, TypeVar
|
||||||
import warnings
|
import warnings
|
||||||
<<<<<<< HEAD
|
|
||||||
from sqlalchemy import BigInteger, Boolean, CheckConstraint, Date, Dialect, ForeignKey, LargeBinary, Column, MetaData, SmallInteger, String, create_engine, select, text
|
from sqlalchemy import BigInteger, Boolean, CheckConstraint, Date, Dialect, ForeignKey, LargeBinary, Column, MetaData, SmallInteger, String, create_engine, select, text
|
||||||
from sqlalchemy.orm import DeclarativeBase, InstrumentedAttribute, Session, declarative_base as _declarative_base, relationship
|
from sqlalchemy.orm import DeclarativeBase, InstrumentedAttribute, Relationship, Session, declarative_base as _declarative_base, relationship
|
||||||
from sqlalchemy.types import TypeEngine
|
|
||||||
=======
|
|
||||||
from sqlalchemy import BigInteger, CheckConstraint, Date, Dialect, ForeignKey, LargeBinary, Column, MetaData, SmallInteger, String, create_engine, select, text
|
|
||||||
from sqlalchemy.orm import DeclarativeBase, Relationship, Session, declarative_base as _declarative_base, relationship
|
|
||||||
>>>>>>> a66f591 (update changelog, add lazy= to parent_children())
|
|
||||||
|
|
||||||
from .snowflake import SnowflakeGen
|
from .snowflake import SnowflakeGen
|
||||||
from .itertools import kwargs_prefix, makelist
|
from .itertools import kwargs_prefix, makelist
|
||||||
|
|
@ -41,7 +35,7 @@ _T = TypeVar('_T')
|
||||||
|
|
||||||
# SIQs are 14 bytes long. Storage is padded for alignment
|
# SIQs are 14 bytes long. Storage is padded for alignment
|
||||||
# Not to be confused with SiqType.
|
# Not to be confused with SiqType.
|
||||||
IdType = LargeBinary(16)
|
IdType: type[LargeBinary] = LargeBinary(16)
|
||||||
|
|
||||||
@not_implemented
|
@not_implemented
|
||||||
def sql_escape(s: str, /, dialect: Dialect) -> str:
|
def sql_escape(s: str, /, dialect: Dialect) -> str:
|
||||||
|
|
@ -114,7 +108,7 @@ match_constraint.TEXT_DIALECTS = {
|
||||||
'mariadb': ':n RLIKE :re'
|
'mariadb': ':n RLIKE :re'
|
||||||
}
|
}
|
||||||
|
|
||||||
def match_column(length: int, regex: str, /, case: StringCase = StringCase.AS_IS, *args, constraint_name: str | None = None, **kwargs):
|
def match_column(length: int, regex: str, /, case: StringCase = StringCase.AS_IS, *args, constraint_name: str | None = None, **kwargs) -> Incomplete[Column[str]]:
|
||||||
"""
|
"""
|
||||||
Syntactic sugar to create a String() column with a check constraint matching the given regular expression.
|
Syntactic sugar to create a String() column with a check constraint matching the given regular expression.
|
||||||
|
|
||||||
|
|
@ -126,7 +120,7 @@ def match_column(length: int, regex: str, /, case: StringCase = StringCase.AS_IS
|
||||||
constraint_name=constraint_name or f'{x.__tablename__}_{n}_valid')), *args, **kwargs)
|
constraint_name=constraint_name or f'{x.__tablename__}_{n}_valid')), *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def bool_column(value: bool = False, nullable: bool = False, **kwargs):
|
def bool_column(value: bool = False, nullable: bool = False, **kwargs) -> Column[bool]:
|
||||||
"""
|
"""
|
||||||
Column for a single boolean value.
|
Column for a single boolean value.
|
||||||
|
|
||||||
|
|
@ -232,7 +226,7 @@ def parent_children(keyword: str, /, *, lazy='selectin', **kwargs) -> tuple[Inco
|
||||||
return parent, child
|
return parent, child
|
||||||
|
|
||||||
|
|
||||||
def unbound_fk(target: str | Column | InstrumentedAttribute, typ: TypeEngine | None = None, **kwargs):
|
def unbound_fk(target: str | Column | InstrumentedAttribute, typ: _T | None = None, **kwargs) -> Column[_T | IdType]:
|
||||||
"""
|
"""
|
||||||
Shorthand for creating a "unbound" foreign key column from a column name, the referenced column.
|
Shorthand for creating a "unbound" foreign key column from a column name, the referenced column.
|
||||||
|
|
||||||
|
|
@ -252,7 +246,7 @@ def unbound_fk(target: str | Column | InstrumentedAttribute, typ: TypeEngine | N
|
||||||
|
|
||||||
return Column(typ, ForeignKey(target_name, ondelete='SET NULL'), nullable=True, **kwargs)
|
return Column(typ, ForeignKey(target_name, ondelete='SET NULL'), nullable=True, **kwargs)
|
||||||
|
|
||||||
def bound_fk(target: str | Column | InstrumentedAttribute, typ: TypeEngine | None = None, **kwargs):
|
def bound_fk(target: str | Column | InstrumentedAttribute, typ: _T = None, **kwargs) -> Column[_T | IdType]:
|
||||||
"""
|
"""
|
||||||
Shorthand for creating a "bound" foreign key column from a column name, the referenced column.
|
Shorthand for creating a "bound" foreign key column from a column name, the referenced column.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue