1 | <?php |
||
5 | class DecimalColumn extends AbstractColumnDefinition implements NumericColumnInterface |
||
6 | { |
||
7 | /** |
||
8 | * |
||
9 | * @var int |
||
10 | */ |
||
11 | protected $numericPrecision = null; |
||
12 | |||
13 | /** |
||
14 | * |
||
15 | * @var int |
||
16 | */ |
||
17 | protected $numericScale = null; |
||
18 | |||
19 | |||
20 | /** |
||
21 | * |
||
22 | * @var boolean |
||
23 | */ |
||
24 | protected $numericUnsigned = null; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * @return bool |
||
29 | */ |
||
30 | public function getNumericUnsigned() |
||
34 | |||
35 | /** |
||
36 | * @param bool $numericUnsigned |
||
37 | * @return DecimalColumn |
||
38 | */ |
||
39 | public function setNumericUnsigned($numericUnsigned) |
||
44 | |||
45 | |||
46 | /** |
||
47 | * @return bool |
||
48 | */ |
||
49 | public function isNumericUnsigned() |
||
53 | |||
54 | /** |
||
55 | * Return the precision, for example |
||
56 | * salary DECIMAL(5,2) |
||
57 | * In this example, 5 is the precision and 2 is the scale. |
||
58 | * Standard SQL requires that DECIMAL(5,2) be able to store any value |
||
59 | * with five digits and two decimals, so values that can be stored in |
||
60 | * the salary column range from -999.99 to 999.99. |
||
61 | * |
||
62 | * @return int the $numericPrecision |
||
63 | */ |
||
64 | public function getNumericPrecision() |
||
68 | |||
69 | /** |
||
70 | * @param int $numericPrecision the $numericPrevision to set |
||
71 | * @return DecimalColumn |
||
72 | */ |
||
73 | public function setNumericPrecision($numericPrecision) |
||
78 | |||
79 | /** |
||
80 | * Return the scale (number of decimal digits) |
||
81 | * salary DECIMAL(5,2) |
||
82 | * In this example, 5 is the precision and 2 is the scale. |
||
83 | * Standard SQL requires that DECIMAL(5,2) be able to store any value |
||
84 | * with five digits and two decimals, so values that can be stored in |
||
85 | * the salary column range from -999.99 to 999.99. |
||
86 | * |
||
87 | * @return integer the $numericScale |
||
88 | */ |
||
89 | public function getNumericScale() |
||
93 | |||
94 | /** |
||
95 | * @param integer $numericScale the $numericScale to set |
||
96 | * @return DecimalColumn |
||
97 | */ |
||
98 | public function setNumericScale($numericScale) |
||
103 | } |
||
104 |