File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1938,7 +1938,7 @@ with <conn>: # Exits the block with commit() o
19381938from sqlalchemy import create_engine, text
19391939< engine> = create_engine(' <url>' ) # Url: 'dialect://user:password@host/dbname'.
19401940< conn> = < engine> .connect() # Creates a connection. Also <conn>.close().
1941- < cursor> = < conn> .execute(text(' <query>' ), …) # Replaces ':<key>'s with keyword arguments .
1941+ < cursor> = < conn> .execute(text(' <query>' ), …) # `<dict>`. Replaces ':<key>'s with values .
19421942with < conn> .begin(): ... # Exits the block with commit or rollback.
19431943```
19441944
Original file line number Diff line number Diff line change 5555
5656< body >
5757 < header >
58- < aside > December 4 , 2024</ aside >
58+ < aside > December 5 , 2024</ aside >
5959 < a href ="https://gto76.github.io " rel ="author "> Jure Šorn</ a >
6060 </ header >
6161
16021602< span class ="hljs-keyword "> from</ span > sqlalchemy < span class ="hljs-keyword "> import</ span > create_engine, text
16031603<engine> = create_engine(< span class ="hljs-string "> '<url>'</ span > ) < span class ="hljs-comment "> # Url: 'dialect://user:password@host/dbname'.</ span >
16041604<conn> = <engine>.connect() < span class ="hljs-comment "> # Creates a connection. Also <conn>.close().</ span >
1605- <cursor> = <conn>.execute(text(< span class ="hljs-string "> '<query>'</ span > ), …) < span class ="hljs-comment "> # Replaces ':<key>'s with keyword arguments .</ span >
1605+ <cursor> = <conn>.execute(text(< span class ="hljs-string "> '<query>'</ span > ), …) < span class ="hljs-comment "> # `<dict>`. Replaces ':<key>'s with values .</ span >
16061606< span class ="hljs-keyword "> with</ span > <conn>.begin(): ... < span class ="hljs-comment "> # Exits the block with commit or rollback.</ span >
16071607</ code > </ pre > </ div >
16081608
@@ -2924,7 +2924,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
29242924
29252925
29262926 < footer >
2927- < aside > December 4 , 2024</ aside >
2927+ < aside > December 5 , 2024</ aside >
29282928 < a href ="https://gto76.github.io " rel ="author "> Jure Šorn</ a >
29292929 </ footer >
29302930
You can’t perform that action at this time.
0 commit comments