@@ -44,39 +44,39 @@ protected function initPostgresPdoConnection(): PDO
44
44
45
45
protected function assertPgAdvisoryLockExistsInConnection (
46
46
PDO $ dbConnection ,
47
- PostgresLockKey $ postgresLockId ,
47
+ PostgresLockKey $ postgresLockKey ,
48
48
PostgresLockAccessModeEnum $ mode = PostgresLockAccessModeEnum::Exclusive,
49
49
): void {
50
50
$ row = $ this ->findPostgresAdvisoryLockInConnection (
51
51
$ dbConnection ,
52
- $ postgresLockId ,
52
+ $ postgresLockKey ,
53
53
$ mode ,
54
54
);
55
55
56
- $ lockIdString = $ postgresLockId ->humanReadableValue ;
56
+ $ lockKeyString = $ postgresLockKey ->humanReadableValue ;
57
57
58
58
$ this ->assertTrue (
59
59
$ row !== null ,
60
- "Lock id ` $ lockIdString ` does not exists " ,
60
+ "Lock id ` $ lockKeyString ` does not exists " ,
61
61
);
62
62
}
63
63
64
64
protected function assertPgAdvisoryLockMissingInConnection (
65
65
PDO $ dbConnection ,
66
- PostgresLockKey $ postgresLockId ,
66
+ PostgresLockKey $ postgresLockKey ,
67
67
PostgresLockAccessModeEnum $ mode = PostgresLockAccessModeEnum::Exclusive,
68
68
): void {
69
69
$ row = $ this ->findPostgresAdvisoryLockInConnection (
70
70
$ dbConnection ,
71
- $ postgresLockId ,
71
+ $ postgresLockKey ,
72
72
$ mode ,
73
73
);
74
74
75
- $ lockIdString = $ postgresLockId ->humanReadableValue ;
75
+ $ lockKeyString = $ postgresLockKey ->humanReadableValue ;
76
76
77
77
$ this ->assertTrue (
78
78
$ row === null ,
79
- "Lock id ` $ lockIdString ` is present " ,
79
+ "Lock id ` $ lockKeyString ` is present " ,
80
80
);
81
81
}
82
82
@@ -95,7 +95,7 @@ protected function assertPgAdvisoryLocksCount(
95
95
96
96
private function findPostgresAdvisoryLockInConnection (
97
97
PDO $ dbConnection ,
98
- PostgresLockKey $ postgresLockId ,
98
+ PostgresLockKey $ postgresLockKey ,
99
99
PostgresLockAccessModeEnum $ mode ,
100
100
): object | null {
101
101
$ statement = $ dbConnection ->prepare (
@@ -112,8 +112,8 @@ private function findPostgresAdvisoryLockInConnection(
112
112
);
113
113
$ statement ->execute (
114
114
[
115
- 'lock_class_id ' => $ postgresLockId ->classId ,
116
- 'lock_object_id ' => $ postgresLockId ->objectId ,
115
+ 'lock_class_id ' => $ postgresLockKey ->classId ,
116
+ 'lock_object_id ' => $ postgresLockKey ->objectId ,
117
117
'lock_object_subid ' => 2 , // Using two keyed locks
118
118
'connection_pid ' => $ dbConnection ->pgsqlGetPid (),
119
119
'mode ' => $ mode ->value ,
0 commit comments