16
16
class Table
17
17
{
18
18
/**
19
- * Column type boolean
20
- * @api
19
+ * Types of columns
21
20
*/
22
21
const TYPE_BOOLEAN = 'boolean ' ;
23
22
24
- /**
25
- * Column type smallint
26
- * @api
27
- */
28
23
const TYPE_SMALLINT = 'smallint ' ;
29
24
30
- /**
31
- * Column type integer
32
- * @api
33
- */
34
25
const TYPE_INTEGER = 'integer ' ;
35
26
36
- /**
37
- * Column type bigint
38
- * @api
39
- */
40
27
const TYPE_BIGINT = 'bigint ' ;
41
28
42
- /**
43
- * Column type float
44
- * @api
45
- */
46
29
const TYPE_FLOAT = 'float ' ;
47
30
48
- /**
49
- * Column type numeric
50
- * @api
51
- */
52
31
const TYPE_NUMERIC = 'numeric ' ;
53
32
54
- /**
55
- * Column type decimal
56
- * @api
57
- */
58
33
const TYPE_DECIMAL = 'decimal ' ;
59
34
60
- /**
61
- * Column type date
62
- * @api
63
- */
64
35
const TYPE_DATE = 'date ' ;
65
36
66
- /**
67
- * Column type timestamp
68
- * @api
69
- */
70
37
const TYPE_TIMESTAMP = 'timestamp ' ;
71
38
72
- /**
73
- * Column type datetime, capable to support date-time from 1970 + auto-triggers in some RDBMS
74
- * @api
75
- */
39
+ // Capable to support date-time from 1970 + auto-triggers in some RDBMS
76
40
const TYPE_DATETIME = 'datetime ' ;
77
41
78
- /**
79
- * Column type text, capable to support long date-time before 1970
80
- * @api
81
- */
42
+ // Capable to support long date-time before 1970
82
43
const TYPE_TEXT = 'text ' ;
83
44
84
- /**
85
- * Column type blob
86
- * @api
87
- */
88
45
const TYPE_BLOB = 'blob ' ;
89
46
90
- /**
91
- * Column type varbinary, used for back compatibility, when query param can't use statement options
92
- * @api
93
- */
47
+ // Used for back compatibility, when query param can't use statement options
94
48
const TYPE_VARBINARY = 'varbinary ' ;
95
49
50
+ // A real blob, stored as binary inside DB
51
+
96
52
/**
97
- * Default TEXT columns sizes
98
- * @api
53
+ * Default and maximal TEXT and BLOB columns sizes we can support for different DB systems.
99
54
*/
100
55
const DEFAULT_TEXT_SIZE = 1024 ;
101
56
102
- /**
103
- * Maximal TEXT columns sizes
104
- * @api
105
- */
106
57
const MAX_TEXT_SIZE = 2147483648 ;
107
58
108
- /**
109
- * Maximal BLOB columns sizes
110
- * @api
111
- */
112
59
const MAX_VARBINARY_SIZE = 2147483648 ;
113
60
114
61
/**
115
- * Default value for timestamps - fill with current timestamp on inserting record, on changing and both cases
116
- * @api
62
+ * Default values for timestampses - fill with current timestamp on inserting record, on changing and both cases
117
63
*/
118
64
const TIMESTAMP_INIT_UPDATE = 'TIMESTAMP_INIT_UPDATE ' ;
119
65
120
- /**
121
- * Default value for timestamps - fill with current timestamp only on inserting record
122
- * @api
123
- */
124
66
const TIMESTAMP_INIT = 'TIMESTAMP_INIT ' ;
125
67
126
- /**
127
- * Default value for timestamps - fill with current timestamp only on changing record
128
- * @api
129
- */
130
68
const TIMESTAMP_UPDATE = 'TIMESTAMP_UPDATE ' ;
131
69
132
70
/**
133
- * Cascade action used for foreign keys
134
- * @api
71
+ * Actions used for foreign keys
135
72
*/
136
73
const ACTION_CASCADE = 'CASCADE ' ;
137
74
138
- /**
139
- * Set null action used for foreign keys
140
- * @api
141
- */
142
75
const ACTION_SET_NULL = 'SET NULL ' ;
143
76
144
- /**
145
- * No action action used for foreign keys
146
- * @api
147
- */
148
77
const ACTION_NO_ACTION = 'NO ACTION ' ;
149
78
150
- /**
151
- * Restrict action used for foreign keys
152
- * @api
153
- */
154
79
const ACTION_RESTRICT = 'RESTRICT ' ;
155
80
156
- /**
157
- * Set default action used for foreign keys
158
- * @api
159
- */
160
81
const ACTION_SET_DEFAULT = 'SET DEFAULT ' ;
161
82
162
83
/**
@@ -261,7 +182,6 @@ class Table
261
182
*
262
183
* @param string $name
263
184
* @return $this
264
- * @api
265
185
*/
266
186
public function setName ($ name )
267
187
{
@@ -277,7 +197,6 @@ public function setName($name)
277
197
*
278
198
* @param string $name
279
199
* @return $this
280
- * @api
281
200
*/
282
201
public function setSchema ($ name )
283
202
{
@@ -290,7 +209,6 @@ public function setSchema($name)
290
209
*
291
210
* @param string $comment
292
211
* @return $this
293
- * @api
294
212
*/
295
213
public function setComment ($ comment )
296
214
{
@@ -303,7 +221,6 @@ public function setComment($comment)
303
221
*
304
222
* @return string
305
223
* @throws \Zend_Db_Exception
306
- * @api
307
224
*/
308
225
public function getName ()
309
226
{
@@ -317,7 +234,6 @@ public function getName()
317
234
* Get schema name
318
235
*
319
236
* @return string|null
320
- * @api
321
237
*/
322
238
public function getSchema ()
323
239
{
@@ -328,7 +244,6 @@ public function getSchema()
328
244
* Return comment for table
329
245
*
330
246
* @return string
331
- * @api
332
247
*/
333
248
public function getComment ()
334
249
{
@@ -358,7 +273,6 @@ public function getComment()
358
273
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
359
274
* @SuppressWarnings(PHPMD.NPathComplexity)
360
275
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
361
- * @api
362
276
*/
363
277
public function addColumn ($ name , $ type , $ size = null , $ options = [], $ comment = null )
364
278
{
@@ -495,7 +409,6 @@ public function addColumn($name, $type, $size = null, $options = [], $comment =
495
409
* @return $this
496
410
* @throws \Zend_Db_Exception
497
411
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
498
- * @api
499
412
*/
500
413
public function addForeignKey ($ fkName , $ column , $ refTable , $ refColumn , $ onDelete = null , $ onUpdate = null )
501
414
{
@@ -547,7 +460,6 @@ public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete
547
460
* @return $this
548
461
* @throws \Zend_Db_Exception
549
462
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
550
- * @api
551
463
*/
552
464
public function addIndex ($ indexName , $ fields , $ options = [])
553
465
{
@@ -615,7 +527,6 @@ public function addIndex($indexName, $fields, $options = [])
615
527
* @param bool $normalized
616
528
* @see $this->_columns
617
529
* @return array
618
- * @api
619
530
*/
620
531
public function getColumns ($ normalized = true )
621
532
{
@@ -631,7 +542,6 @@ public function getColumns($normalized = true)
631
542
* @param array $column
632
543
* @see $this->_columns
633
544
* @return $this
634
- * @api
635
545
*/
636
546
public function setColumn ($ column )
637
547
{
@@ -645,7 +555,6 @@ public function setColumn($column)
645
555
*
646
556
* @see $this->_indexes
647
557
* @return array
648
- * @api
649
558
*/
650
559
public function getIndexes ()
651
560
{
@@ -657,7 +566,6 @@ public function getIndexes()
657
566
*
658
567
* @see $this->_foreignKeys
659
568
* @return array
660
- * @api
661
569
*/
662
570
public function getForeignKeys ()
663
571
{
@@ -670,7 +578,6 @@ public function getForeignKeys()
670
578
* @param string $key
671
579
* @param string $value
672
580
* @return $this
673
- * @api
674
581
*/
675
582
public function setOption ($ key , $ value )
676
583
{
@@ -684,7 +591,6 @@ public function setOption($key, $value)
684
591
*
685
592
* @param string $key
686
593
* @return null|string
687
- * @api
688
594
*/
689
595
public function getOption ($ key )
690
596
{
@@ -698,7 +604,6 @@ public function getOption($key)
698
604
* Retrieve array of table options
699
605
*
700
606
* @return array
701
- * @api
702
607
*/
703
608
public function getOptions ()
704
609
{
0 commit comments