We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66e1bfe commit 93e15c1Copy full SHA for 93e15c1
tests/test_declaration_syntax.py
@@ -0,0 +1,18 @@
1
+from typing import Annotated
2
+
3
+from sqlmodel import SQLModel, Field
4
5
6
+def test_declaration_syntax_1():
7
+ class Person1(SQLModel, table=True):
8
+ name: str = Field(primary_key=True)
9
10
11
+def test_declaration_syntax_2():
12
+ class Person2(SQLModel, table=True):
13
+ name: Annotated[str, Field(primary_key=True)]
14
15
16
+def test_declaration_syntax_3():
17
+ class Person3(SQLModel, table=True):
18
+ name: Annotated[str, ...] = Field(primary_key=True)
0 commit comments