Skip to content

Commit d1807d5

Browse files
committed
Add UUID to PRIMARY_KEY type union
Include UUID as a valid type for PRIMARY_KEY to support use cases requiring UUIDs. This ensures broader compatibility and type safety in key definitions.
1 parent 6d1ca0a commit d1807d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlalchemy_bind_manager/_repository/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
# DEALINGS IN THE SOFTWARE.
2020

2121
from typing import Generic, List, TypeVar, Union
22+
from uuid import UUID
2223

2324
from pydantic import BaseModel, StrictInt, StrictStr
2425

2526
MODEL = TypeVar("MODEL")
26-
PRIMARY_KEY = Union[str, int, tuple, dict]
27+
PRIMARY_KEY = Union[str, int, tuple, dict, UUID]
2728

2829

2930
class PageInfo(BaseModel):

0 commit comments

Comments
 (0)