Skip to content

Commit b4db23f

Browse files
committed
Add constant types via PHPDocs
1 parent 7a2be35 commit b4db23f

File tree

7 files changed

+67
-0
lines changed

7 files changed

+67
-0
lines changed

src/Manipulation/Delete.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,17 @@ class Delete extends Statement
2525
use Traits\OrderBy;
2626
use Traits\Where;
2727

28+
/**
29+
* @var string
30+
*/
2831
public const OPT_LOW_PRIORITY = 'LOW_PRIORITY';
32+
/**
33+
* @var string
34+
*/
2935
public const OPT_QUICK = 'QUICK';
36+
/**
37+
* @var string
38+
*/
3039
public const OPT_IGNORE = 'IGNORE';
3140

3241
protected function renderOptions() : ?string

src/Manipulation/Insert.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,28 @@ class Insert extends Statement
2626

2727
/**
2828
* @see https://mariadb.com/kb/en/library/insert-delayed/
29+
*
30+
* @var string
2931
*/
3032
public const OPT_DELAYED = 'DELAYED';
3133
/**
3234
* Convert errors to warnings, which will not stop inserts of additional rows.
3335
*
3436
* @see https://mariadb.com/kb/en/library/insert-ignore/
37+
*
38+
* @var string
3539
*/
3640
public const OPT_IGNORE = 'IGNORE';
3741
/**
3842
* @see https://mariadb.com/kb/en/library/high_priority-and-low_priority/
43+
*
44+
* @var string
3945
*/
4046
public const OPT_HIGH_PRIORITY = 'HIGH_PRIORITY';
4147
/**
4248
* @see https://mariadb.com/kb/en/library/high_priority-and-low_priority/
49+
*
50+
* @var string
4351
*/
4452
public const OPT_LOW_PRIORITY = 'LOW_PRIORITY';
4553

src/Manipulation/LoadData.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@ class LoadData extends Statement
2525

2626
/**
2727
* @see https://mariadb.com/kb/en/library/high_priority-and-low_priority/
28+
*
29+
* @var string
2830
*/
2931
public const OPT_LOW_PRIORITY = 'LOW_PRIORITY';
3032
/**
3133
* @see https://mariadb.com/kb/en/load-data-infile/#priority-and-concurrency
34+
*
35+
* @var string
3236
*/
3337
public const OPT_CONCURRENT = 'CONCURRENT';
3438
/**
3539
* @see https://mariadb.com/kb/en/load-data-infile/#load-data-local-infile
40+
*
41+
* @var string
3642
*/
3743
public const OPT_LOCAL = 'LOCAL';
3844

src/Manipulation/Replace.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ class Replace extends Statement
2626

2727
/**
2828
* @see https://mariadb.com/kb/en/library/insert-delayed/
29+
*
30+
* @var string
2931
*/
3032
public const OPT_DELAYED = 'DELAYED';
3133
/**
3234
* @see https://mariadb.com/kb/en/library/high_priority-and-low_priority/
35+
*
36+
* @var string
3337
*/
3438
public const OPT_LOW_PRIORITY = 'LOW_PRIORITY';
3539

src/Manipulation/Select.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,25 @@ class Select extends Statement
3131
* Option to retrieve identical rows.
3232
*
3333
* @see Select::renderOptions()
34+
*
35+
* @var string
3436
*/
3537
public const OPT_ALL = 'ALL';
3638
/**
3739
* Option to not retrieve identical rows. Remove duplicates from the resultset.
3840
*
3941
* @see Select::renderOptions()
4042
* @see https://mariadb.com/kb/en/library/select/#distinct
43+
*
44+
* @var string
4145
*/
4246
public const OPT_DISTINCT = 'DISTINCT';
4347
/**
4448
* Alias of OPT_DISTINCT.
4549
*
4650
* @see Select::renderOptions()
51+
*
52+
* @var string
4753
*/
4854
public const OPT_DISTINCTROW = 'DISTINCTROW';
4955
/**
@@ -53,6 +59,8 @@ class Select extends Statement
5359
*
5460
* @see Select::renderOptions()
5561
* @see https://mariadb.com/kb/en/library/high_priority-and-low_priority/
62+
*
63+
* @var string
5664
*/
5765
public const OPT_HIGH_PRIORITY = 'HIGH_PRIORITY';
5866
/**
@@ -63,19 +71,25 @@ class Select extends Statement
6371
* @see Select::renderOptions()
6472
* @see https://mariadb.com/kb/en/library/join-syntax/
6573
* @see https://mariadb.com/kb/en/library/index-hints-how-to-force-query-plans/#forcing-join-order
74+
*
75+
* @var string
6676
*/
6777
public const OPT_STRAIGHT_JOIN = 'STRAIGHT_JOIN';
6878
/**
6979
* Forces the optimizer to use a temporary table.
7080
*
7181
* @see https://mariadb.com/kb/en/library/optimizer-hints/#sql_small_result-sql_big_result
82+
*
83+
* @var string
7284
*/
7385
public const OPT_SQL_SMALL_RESULT = 'SQL_SMALL_RESULT';
7486
/**
7587
* Forces the optimizer to avoid usage of a temporary table.
7688
*
7789
* @see Select::renderOptions()
7890
* @see https://mariadb.com/kb/en/library/optimizer-hints/#sql_small_result-sql_big_result
91+
*
92+
* @var string
7993
*/
8094
public const OPT_SQL_BIG_RESULT = 'SQL_BIG_RESULT';
8195
/**
@@ -84,6 +98,8 @@ class Select extends Statement
8498
*
8599
* @see Select::renderOptions()
86100
* @see https://mariadb.com/kb/en/library/optimizer-hints/#sql_buffer_result
101+
*
102+
* @var string
87103
*/
88104
public const OPT_SQL_BUFFER_RESULT = 'SQL_BUFFER_RESULT';
89105
/**
@@ -93,6 +109,8 @@ class Select extends Statement
93109
* @see Select::renderOptions()
94110
* @see https://mariadb.com/kb/en/library/server-system-variables/#query_cache_type
95111
* @see https://mariadb.com/kb/en/library/query-cache/
112+
*
113+
* @var string
96114
*/
97115
public const OPT_SQL_CACHE = 'SQL_CACHE';
98116
/**
@@ -102,6 +120,8 @@ class Select extends Statement
102120
* @see Select::renderOptions()
103121
* @see https://mariadb.com/kb/en/library/server-system-variables/#query_cache_type
104122
* @see https://mariadb.com/kb/en/library/query-cache/
123+
*
124+
* @var string
105125
*/
106126
public const OPT_SQL_NO_CACHE = 'SQL_NO_CACHE';
107127
/**
@@ -111,36 +131,50 @@ class Select extends Statement
111131
*
112132
* @see Select::renderOptions()
113133
* @see https://mariadb.com/kb/en/library/found_rows/
134+
*
135+
* @var string
114136
*/
115137
public const OPT_SQL_CALC_FOUND_ROWS = 'SQL_CALC_FOUND_ROWS';
116138
/**
117139
* Clause to set the character of separation between fields. Default is \t.
118140
*
119141
* @see Select::intoOutfile()
142+
*
143+
* @var string
120144
*/
121145
public const EXP_FIELDS_TERMINATED_BY = 'TERMINATED BY';
122146
/**
123147
* Clause to set the enclosure character of the fields. Default is ".
124148
*
125149
* @see Select::intoOutfile()
150+
*
151+
* @var string
126152
*/
127153
public const EXP_FIELDS_ENCLOSED_BY = 'ENCLOSED BY';
128154
/**
129155
* @see Select::intoOutfile()
156+
*
157+
* @var string
130158
*/
131159
public const EXP_FIELDS_OPTIONALLY_ENCLOSED_BY = 'OPTIONALLY ENCLOSED BY';
132160
/**
133161
* @see Select::intoOutfile()
162+
*
163+
* @var string
134164
*/
135165
public const EXP_FIELDS_ESCAPED_BY = 'ESCAPED BY';
136166
/**
137167
* @see Select::intoOutfile()
168+
*
169+
* @var string
138170
*/
139171
public const EXP_LINES_STARTING_BY = 'STARTING BY';
140172
/**
141173
* Clause to set the file End-Of-Line character. Default is \n.
142174
*
143175
* @see Select::intoOutfile()
176+
*
177+
* @var string
144178
*/
145179
public const EXP_LINES_TERMINATED_BY = 'TERMINATED BY';
146180

src/Manipulation/Update.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ class Update extends Statement
3131
* Convert errors to warnings, which will not stop inserts of additional rows.
3232
*
3333
* @see https://mariadb.com/kb/en/library/insert-ignore/
34+
*
35+
* @var string
3436
*/
3537
public const OPT_IGNORE = 'IGNORE';
3638
/**
3739
* @see https://mariadb.com/kb/en/library/high_priority-and-low_priority/
40+
*
41+
* @var string
3842
*/
3943
public const OPT_LOW_PRIORITY = 'LOW_PRIORITY';
4044

src/Manipulation/With.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class With extends Statement
2525
{
2626
/**
2727
* @see https://mariadb.com/kb/en/library/recursive-common-table-expressions-overview/
28+
*
29+
* @var string
2830
*/
2931
public const OPT_RECURSIVE = 'RECURSIVE';
3032

0 commit comments

Comments
 (0)