|
4 | 4 |
|
5 | 5 | use WhizSid\ArrayBase\AB\DataSet; |
6 | 6 |
|
7 | | -<<<<<<< HEAD |
8 | | -class ReturnSet { |
9 | | - /** |
10 | | - * DataSet that query has returned |
11 | | - * |
12 | | - * @var DataSet |
13 | | - */ |
14 | | - protected $dataSet; |
15 | | - /** |
16 | | - * Count of affected rows |
17 | | - * |
18 | | - * @var int |
19 | | - */ |
20 | | - protected $affectedRows=0; |
21 | | - /** |
22 | | - * Count of rows that in data set |
23 | | - * |
24 | | - * @var int |
25 | | - */ |
26 | | - protected $count=0; |
27 | | - /** |
28 | | - * Query execution time |
29 | | - * |
30 | | - * @var float |
31 | | - */ |
32 | | - protected $time = 0.00; |
33 | | - /** |
34 | | - * Last Index for insert queries |
35 | | - * |
36 | | - * @var integer |
37 | | - */ |
38 | | - protected $lastIndex = 0; |
39 | | - /** |
40 | | - * Setter for data set |
41 | | - * |
42 | | - * @param DataSet $dataSet |
43 | | - * @return void |
44 | | - */ |
45 | | - public function setDataSet($dataSet){ |
46 | | - $this->dataSet = $dataSet; |
47 | | - $this->count = $dataSet->getCount(); |
48 | | - } |
49 | | - /** |
50 | | - * Setter for affected row count |
51 | | - * |
52 | | - * @param int $count |
53 | | - * @return void |
54 | | - */ |
55 | | - public function setAffectedRowsCount($count){ |
56 | | - $this->affectedRows = $count; |
57 | | - } |
58 | | - /** |
59 | | - * Setter for time |
60 | | - * |
61 | | - * @param float $time |
62 | | - * @return void |
63 | | - */ |
64 | | - public function setTime($time){ |
65 | | - $this->time = $time; |
66 | | - } |
67 | | - /** |
68 | | - * Returning the execution time in micro seconds |
69 | | - * |
70 | | - * @return float |
71 | | - */ |
72 | | - public function getTime(){ |
73 | | - return $this->time; |
74 | | - } |
75 | | - /** |
76 | | - * Setter for last index |
77 | | - * |
78 | | - * @param int $index |
79 | | - * @return void |
80 | | - */ |
81 | | - public function setLastIndex($index){ |
82 | | - $this->lastIndex = $index; |
83 | | - } |
84 | | - /** |
85 | | - * Returning the last inserted index for insert queries |
86 | | - * |
87 | | - * @return integer |
88 | | - */ |
89 | | - public function getLastIndex(){ |
90 | | - return $this->lastIndex; |
91 | | - } |
92 | | - /** |
93 | | - * Returning the count of affected rows by the query |
94 | | - * |
95 | | - * @return int |
96 | | - */ |
97 | | - public function getAffectedRowsCount(){ |
98 | | - return $this->affectedRows; |
99 | | - } |
100 | | - /** |
101 | | - * Fetching the data set to associative array |
102 | | - * |
103 | | - * @return void |
104 | | - */ |
105 | | - public function fetchAssoc(){ |
106 | | - $fetched = []; |
107 | | -======= |
108 | 7 | class ReturnSet |
109 | 8 | { |
110 | 9 | /** |
@@ -151,6 +50,16 @@ public function setDataSet($dataSet) |
151 | 50 | $this->count = $dataSet->getCount(); |
152 | 51 | } |
153 | 52 |
|
| 53 | + /** |
| 54 | + * Setter for data set. |
| 55 | + * |
| 56 | + * @return int |
| 57 | + */ |
| 58 | + public function getAffectedRowsCount() |
| 59 | + { |
| 60 | + return $this->affectedRows; |
| 61 | + } |
| 62 | + |
154 | 63 | /** |
155 | 64 | * Setter for affected row count. |
156 | 65 | * |
@@ -215,7 +124,6 @@ public function getLastIndex() |
215 | 124 | public function fetchAssoc() |
216 | 125 | { |
217 | 126 | $fetched = []; |
218 | | ->>>>>>> 6dc8438dcd5eabecaeb38c442615508b46b130ca |
219 | 127 |
|
220 | 128 | if (!isset($this->dataSet)) { |
221 | 129 | return []; |
|
0 commit comments