Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def execute (self, request):
DBConnect.begin_tran (self, request)
sql = self._compile (request)
if not self.connected:
self.connect ()
self.conn.isolation_level = None
try:
if self.cur is None:
self.cur = self.conn.cursor ()
sql = self._compile (request)
self.cur.execute (sql, *request.params [1:])
self.has_result = True
except:
self.handle_error ()
else:
self.close_case ()
def execute (self, request):
dbconnect.DBConnect.begin_tran (self, request)
self.out_buffer = self._compile (request)
if not self.connected and not self.connecting:
self.connect ()
else:
state = self.poll ()
if state != POLL_OK:
self.reconnect ()
else:
self.create_cursor ()
def execute (self, request):
DBConnect.begin_tran (self, request)
try:
if not self.connected:
self.connect ()
self.prefetch ()
except:
self.handle_error ()
else:
self.close_case ()
def execute (self, request):
dbconnect.DBConnect.begin_tran (self, request)
sql = self._compile (request)
if not self.connected:
self.connect ()
self.conn.isolation_level = None
try:
if self.cur is None:
self.cur = self.conn.cursor ()
if len (request.params) > 1 or sql [:7].lower () == "select ":
self.cur.execute (sql, *request.params [1:])
self.has_result = True
else:
self.cur.executescript (sql)
except: