File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,11 @@ public function createTable(): void
267
267
$ table ->setPrimaryKey ([$ this ->idCol ]);
268
268
269
269
foreach ($ schema ->toSql ($ conn ->getDatabasePlatform ()) as $ sql ) {
270
- $ conn ->exec ($ sql );
270
+ if (method_exists ($ conn , 'executeStatement ' )) {
271
+ $ conn ->executeStatement ($ sql );
272
+ } else {
273
+ $ conn ->exec ($ sql );
274
+ }
271
275
}
272
276
273
277
return ;
@@ -293,7 +297,11 @@ public function createTable(): void
293
297
throw new \DomainException (sprintf ('Creating the lock table is currently not implemented for PDO driver "%s". ' , $ driver ));
294
298
}
295
299
296
- $ conn ->exec ($ sql );
300
+ if (method_exists ($ conn , 'executeStatement ' )) {
301
+ $ conn ->executeStatement ($ sql );
302
+ } else {
303
+ $ conn ->exec ($ sql );
304
+ }
297
305
}
298
306
299
307
/**
@@ -303,7 +311,12 @@ private function prune(): void
303
311
{
304
312
$ sql = "DELETE FROM $ this ->table WHERE $ this ->expirationCol <= {$ this ->getCurrentTimestampStatement ()}" ;
305
313
306
- $ this ->getConnection ()->exec ($ sql );
314
+ $ conn = $ this ->getConnection ();
315
+ if (method_exists ($ conn , 'executeStatement ' )) {
316
+ $ conn ->executeStatement ($ sql );
317
+ } else {
318
+ $ conn ->exec ($ sql );
319
+ }
307
320
}
308
321
309
322
private function getDriver (): string
You can’t perform that action at this time.
0 commit comments