Feature #55793 » generic-persistence-groupings.patch

Implement groupings in generic persistence - Mathias Brodala, 2014-09-02 09:36

View differences:

Classes/TYPO3/Flow/Persistence/Generic/Query.php
57 57
	protected $orderings = array();
58 58

  
59 59
	/**
60
	 * @var array
61
	 */
62
	protected $groupings = array();
63

  
64
	/**
60 65
	 * @var integer
61 66
	 */
62 67
	protected $limit;
......
160 165
	}
161 166

  
162 167
	/**
168
	 * Sets the property names to group the result by. Expected like this:
169
	 * array('foo', 'bar')
170
	 *
171
	 * @param array $groupings The property names to group by
172
	 * @return \TYPO3\Flow\Persistence\QueryInterface
173
	 * @api
174
	 */
175
	public function setGroupings(array $groupings) {
176
		$this->groupings = $groupings;
177
		return $this;
178
	}
179

  
180
	/**
181
	 * Returns the property names to group the result by, like this:
182
	 * array('foo', 'bar')
183
	 *
184
	 * @return array
185
	 * @api
186
	 */
187
	public function getGroupings() {
188
		return $this->groupings;
189
	}
190

  
191
	/**
163 192
	 * Sets the maximum size of the result set to limit. Returns $this to allow
164 193
	 * for chaining (fluid interface)
165 194
	 *
Classes/TYPO3/Flow/Persistence/QueryInterface.php
148 148
	public function getOrderings();
149 149

  
150 150
	/**
151
	 * Sets the property names to group the result by. Expected like this:
152
	 * array('foo', 'bar')
153
	 *
154
	 * @param array $groupings The property names to group by
155
	 * @return \TYPO3\Flow\Persistence\QueryInterface
156
	 * @api
157
	 */
158
	public function setGroupings(array $groupings);
159

  
160
	/**
161
	 * Gets the property names to group the result by, like this:
162
	 * array('foo', 'bar')
163
	 *
164
	 * @return array
165
	 * @api
166
	 */
167
	public function getGroupings();
168

  
169
	/**
151 170
	 * Sets the maximum size of the result set to limit. Returns $this to allow
152 171
	 * for chaining (fluid interface).
153 172
	 *
(2-2/3)