1 | <?php |
||
5 | class DecimalColumn extends AbstractColumnDefinition implements NumericColumnInterface |
||
6 | { |
||
7 | /** |
||
8 | * @var int |
||
9 | */ |
||
10 | protected $numericPrecision = null; |
||
11 | |||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | protected $numericScale = null; |
||
16 | |||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | protected $numericUnsigned = null; |
||
21 | |||
22 | /** |
||
23 | * @return bool |
||
24 | */ |
||
25 | public function getNumericUnsigned() |
||
29 | |||
30 | 1 | /** |
|
31 | * @param bool $numericUnsigned |
||
32 | 1 | * |
|
33 | * @return DecimalColumn |
||
34 | */ |
||
35 | public function setNumericUnsigned($numericUnsigned) |
||
41 | 1 | ||
42 | 1 | /** |
|
43 | * @return bool |
||
44 | */ |
||
45 | public function isNumericUnsigned() |
||
49 | 1 | ||
50 | /** |
||
51 | 1 | * Return the precision, for example |
|
52 | * salary DECIMAL(5,2) |
||
53 | * In this example, 5 is the precision and 2 is the scale. |
||
54 | * Standard SQL requires that DECIMAL(5,2) be able to store any value |
||
55 | * with five digits and two decimals, so values that can be stored in |
||
56 | * the salary column range from -999.99 to 999.99. |
||
57 | * |
||
58 | * @return int the $numericPrecision |
||
59 | */ |
||
60 | public function getNumericPrecision() |
||
64 | 1 | ||
65 | /** |
||
66 | 1 | * @param int $numericPrecision the $numericPrevision to set |
|
67 | * |
||
68 | * @return DecimalColumn |
||
69 | */ |
||
70 | public function setNumericPrecision($numericPrecision) |
||
76 | 1 | ||
77 | /** |
||
78 | * Return the scale (number of decimal digits) |
||
79 | * salary DECIMAL(5,2) |
||
80 | * In this example, 5 is the precision and 2 is the scale. |
||
81 | * Standard SQL requires that DECIMAL(5,2) be able to store any value |
||
82 | * with five digits and two decimals, so values that can be stored in |
||
83 | * the salary column range from -999.99 to 999.99. |
||
84 | * |
||
85 | * @return int the $numericScale |
||
86 | */ |
||
87 | public function getNumericScale() |
||
91 | 1 | ||
92 | /** |
||
93 | * @param int $numericScale the $numericScale to set |
||
94 | * |
||
95 | * @return DecimalColumn |
||
96 | */ |
||
97 | public function setNumericScale($numericScale) |
||
103 | } |
||
104 |