Skip to content

Commit

Permalink
✏️ Fix typo in internal function name get_sqlachemy_type() (#496)
Browse files Browse the repository at this point in the history
Corrected name is get_sqlalchemy_type().
  • Loading branch information
cmarqu committed Nov 12, 2022
1 parent 497270d commit 267cd42
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 @@ -371,7 +371,7 @@ def __init__(
ModelMetaclass.__init__(cls, classname, bases, dict_, **kw)


def get_sqlachemy_type(field: ModelField) -> Any:
def get_sqlalchemy_type(field: ModelField) -> Any:
if issubclass(field.type_, str):
if field.field_info.max_length:
return AutoString(length=field.field_info.max_length)
Expand Down Expand Up @@ -418,7 +418,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_sqlachemy_type(field)
sa_type = get_sqlalchemy_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 267cd42

Please sign in to comment.