Skip to content

Commit 6c01272

Browse files
authored
Update README.md
1 parent adb8d56 commit 6c01272

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ def get_many():
8787
pass
8888

8989
@mb.Insert("INSERT INTO fruits (name, category, price) VALUES (#{name}, #{category}, #{price})")
90-
def insert():
90+
def insert(name:str, category:str, price:int):
9191
pass
9292

9393
@mb.Delete("DELETE FROM fruits WHERE id=#{id}")
9494
def delete(id:int):
9595
pass
9696

97-
@mb.Update("UPDATE fruits SET name='Amazon' WHERE id=#{id}")
98-
def update(id:int):
97+
@mb.Update("UPDATE fruits SET name=#{name} WHERE id=#{id}")
98+
def update(name:str, id:int):
9999
pass
100100

101101
print(get_one(id=1))
@@ -108,7 +108,7 @@ print(insert(name="Dating", category="D", price=20))
108108

109109
print(get_many())
110110

111-
print(update(id=1))
111+
print(update(name='Amazon', id=1))
112112

113113
print(get_many())
114114
```

0 commit comments

Comments
 (0)