-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathLockMode.php
More file actions
56 lines (50 loc) · 1.02 KB
/
LockMode.php
File metadata and controls
56 lines (50 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
declare(strict_types=1);
namespace Cycle\Database\Query\Enum;
/**
* Row-level lock strength.
*/
enum LockMode
{
/**
* Exclusive lock.
*
* Supports:
* - MSSQL +
* - MySQL +
* - SQLITE -
* - PostgreSQL +
*/
case Update;
/**
* Shared lock.
*
* Supports:
* - MSSQL +
* - MySQL +
* - SQLITE -
* - PostgreSQL +
*/
case Share;
/**
* Weakest lock - blocks only DELETE and PK/FK updates.
*
* Supports:
* - MSSQL - (Will be compiled as self::Share)
* - MySQL - (Will be compiled as self::Share)
* - SQLITE -
* - PostgreSQL +
*/
case KeyShare;
/**
* Like LockMode::Update, but doesn't block PK/FK columns.
* (Use when not modifying PK/FK columns)
*
* Supports:
* - MSSQL - (Will be compiled as self::Update)
* - MySQL - (Will be compiled as self::Update)
* - SQLITE -
* - PostgreSQL +
*/
case NoKeyUpdate;
}