executesql(fetch=False)
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.0.6 (2012-09-03 10:18:10) stable
|
||||
Version 2.0.6 (2012-09-03 14:34:54) stable
|
||||
|
||||
+3
-1
@@ -7179,7 +7179,7 @@ def index():
|
||||
adapter.close()
|
||||
|
||||
def executesql(self, query, placeholders=None, as_dict=False,
|
||||
fields=None, colnames=None):
|
||||
fields=None, colnames=None, fetch=True):
|
||||
"""
|
||||
placeholders is optional and will always be None.
|
||||
If using raw SQL with placeholders, placeholders may be
|
||||
@@ -7232,6 +7232,8 @@ def index():
|
||||
adapter.execute(query, placeholders)
|
||||
else:
|
||||
adapter.execute(query)
|
||||
if not fetch:
|
||||
return None
|
||||
if as_dict:
|
||||
if not hasattr(adapter.cursor,'description'):
|
||||
raise RuntimeError, "database does not support executesql(...,as_dict=True)"
|
||||
|
||||
+3
-2
@@ -1663,8 +1663,9 @@ class SQLFORM(FORM):
|
||||
session.flash = T('not authorized')
|
||||
redirect(referrer)
|
||||
|
||||
def gridbutton(buttonclass='buttonadd',buttontext='Add',
|
||||
buttonurl=url(args=[]),callback=None,delete=None,trap=True):
|
||||
def gridbutton(buttonclass='buttonadd', buttontext='Add',
|
||||
buttonurl=url(args=[]), callback=None,
|
||||
delete=None, trap=True):
|
||||
if showbuttontext:
|
||||
if callback:
|
||||
return A(SPAN(_class=ui.get(buttonclass)),
|
||||
|
||||
Reference in New Issue
Block a user