File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1079,7 +1079,9 @@ def run_transaction(self):
1079
1079
1080
1080
def execute (self , * args , ** kwargs ):
1081
1081
"""Simple passthrough to SQLAlchemy connectable"""
1082
- return self .connectable .execute (* args , ** kwargs )
1082
+ return self .connectable .execution_options (no_parameters = True ).execute (
1083
+ * args , ** kwargs
1084
+ )
1083
1085
1084
1086
def read_table (
1085
1087
self ,
Original file line number Diff line number Diff line change 194
194
"Name"=%(name)s AND "SepalLength"=%(length)s
195
195
""" ,
196
196
},
197
+ "read_no_parameters_with_percent" : {
198
+ "sqlite" : "SELECT * FROM iris WHERE Name LIKE 'Iris-%'" ,
199
+ "mysql" : "SELECT * FROM iris WHERE `Name` LIKE 'Iris-%'" ,
200
+ "postgresql" : "SELECT * FROM iris WHERE \" Name\" LIKE 'Iris-%'" ,
201
+ },
197
202
"create_view" : {
198
203
"sqlite" : """
199
204
CREATE VIEW iris_view AS
@@ -424,6 +429,11 @@ def _read_sql_iris_named_parameter(self):
424
429
iris_frame = self .pandasSQL .read_query (query , params = params )
425
430
self ._check_iris_loaded_frame (iris_frame )
426
431
432
+ def _read_sql_iris_no_parameter_with_percent (self ):
433
+ query = SQL_STRINGS ["read_no_parameters_with_percent" ][self .flavor ]
434
+ iris_frame = self .pandasSQL .read_query (query , params = None )
435
+ self ._check_iris_loaded_frame (iris_frame )
436
+
427
437
def _to_sql (self , method = None ):
428
438
self .drop_table ("test_frame1" )
429
439
@@ -1275,6 +1285,9 @@ def test_read_sql_parameter(self):
1275
1285
def test_read_sql_named_parameter (self ):
1276
1286
self ._read_sql_iris_named_parameter ()
1277
1287
1288
+ def test_read_sql_no_parameter_with_percent (self ):
1289
+ self ._read_sql_iris_no_parameter_with_percent ()
1290
+
1278
1291
def test_to_sql (self ):
1279
1292
self ._to_sql ()
1280
1293
You can’t perform that action at this time.
0 commit comments