Skip to content

Commit 8b4574e

Browse files
committed
chore(python): add a comment with links about using psycopg
Relate to #16
1 parent de155c3 commit 8b4574e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/templates/routes.py.ejs

+5
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ endpoints.forEach(function(endpoint) {
195195
@router.get('<%- path %>')
196196
def <%- pythonMethodName %>(<%- methodArgs.join(', ') %>):
197197
try:
198+
<%#
199+
https://www.psycopg.org/docs/usage.html#with-statement
200+
https://www.psycopg.org/docs/extras.html#dictionary-like-cursor
201+
https://stackoverflow.com/questions/45399347/dictcursor-vs-realdictcursor
202+
-%>
198203
with conn:
199204
<% if (hasGetOne) {
200205
if (queries.length > 1) { /* we can omit cursor_factory but in this case we might get an unused import */-%>

0 commit comments

Comments
 (0)