Skip to content

Commit

Permalink
🚚 Rename function get_sqlaclhemy_type
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Oct 22, 2023
1 parent cebd3a5 commit 99a837e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlmodel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def __init__(
ModelMetaclass.__init__(cls, classname, bases, dict_, **kw)


def get_sqlachemy_type(field: ModelField) -> Any:
def get_sqlaclhemy_type(field: ModelField) -> Any:
if isinstance(field.type_, type):
if issubclass(field.type_, str):
if field.field_info.max_length:
Expand Down Expand Up @@ -421,7 +421,7 @@ def get_column_from_field(field: ModelField) -> Column: # type: ignore
sa_column = getattr(field.field_info, "sa_column", Undefined)
if isinstance(sa_column, Column):
return sa_column
sa_type = get_sqlalchemy_type(field)
sa_type = get_sqlaclhemy_type(field)
primary_key = getattr(field.field_info, "primary_key", False)
index = getattr(field.field_info, "index", Undefined)
if index is Undefined:
Expand Down

0 comments on commit 99a837e

Please sign in to comment.