Don't call 'encode_parameter' no-op
This commit is contained in:
parent
d9cc5de9e5
commit
1692dc019d
|
@ -167,10 +167,6 @@ class LoggingTransaction(object):
|
||||||
sql = self.database_engine.convert_param_style(sql)
|
sql = self.database_engine.convert_param_style(sql)
|
||||||
|
|
||||||
if args and args[0]:
|
if args and args[0]:
|
||||||
args = list(args)
|
|
||||||
args[0] = [
|
|
||||||
self.database_engine.encode_parameter(a) for a in args[0]
|
|
||||||
]
|
|
||||||
try:
|
try:
|
||||||
sql_logger.debug(
|
sql_logger.debug(
|
||||||
"[SQL values] {%s} " + ", ".join(("<%r>",) * len(args[0])),
|
"[SQL values] {%s} " + ", ".join(("<%r>",) * len(args[0])),
|
||||||
|
|
|
@ -36,9 +36,6 @@ class PostgresEngine(object):
|
||||||
def convert_param_style(self, sql):
|
def convert_param_style(self, sql):
|
||||||
return sql.replace("?", "%s")
|
return sql.replace("?", "%s")
|
||||||
|
|
||||||
def encode_parameter(self, param):
|
|
||||||
return param
|
|
||||||
|
|
||||||
def on_new_connection(self, db_conn):
|
def on_new_connection(self, db_conn):
|
||||||
db_conn.set_isolation_level(
|
db_conn.set_isolation_level(
|
||||||
self.module.extensions.ISOLATION_LEVEL_REPEATABLE_READ
|
self.module.extensions.ISOLATION_LEVEL_REPEATABLE_READ
|
||||||
|
|
|
@ -26,9 +26,6 @@ class Sqlite3Engine(object):
|
||||||
def convert_param_style(self, sql):
|
def convert_param_style(self, sql):
|
||||||
return sql
|
return sql
|
||||||
|
|
||||||
def encode_parameter(self, param):
|
|
||||||
return param
|
|
||||||
|
|
||||||
def on_new_connection(self, db_conn):
|
def on_new_connection(self, db_conn):
|
||||||
self.prepare_database(db_conn)
|
self.prepare_database(db_conn)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue