We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de155c3 commit 8b4574eCopy full SHA for 8b4574e
src/templates/routes.py.ejs
@@ -195,6 +195,11 @@ endpoints.forEach(function(endpoint) {
195
@router.get('<%- path %>')
196
def <%- pythonMethodName %>(<%- methodArgs.join(', ') %>):
197
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
+-%>
203
with conn:
204
<% if (hasGetOne) {
205
if (queries.length > 1) { /* we can omit cursor_factory but in this case we might get an unused import */-%>
0 commit comments