Summary | DISTINCT sql query feature in Horde/Rdo/Query.php |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | lfbm.andamentos (at) gmail (dot) com |
Created | 09/20/2011 (5051 days ago) |
Due | |
Updated | 10/07/2011 (5034 days ago) |
Assigned | |
Resolved | 10/07/2011 (5034 days ago) |
Milestone | |
Patch | Yes |
State ⇒ Resolved
[jan] Add Horde_Rdo_Query#distinct() (
Request #10535).2 files changed, 13 insertions(+), 9 deletions(-)
http://git.horde.org/horde-git/-/commit/1445e10b285786be126616888f7fbb1b1cfdffde
Optimize
request 10535.1 files changed, 8 insertions(+), 13 deletions(-)
http://git.horde.org/horde-git/-/commit/206a971165a455b00ff27ad0d54bdbbf42725813
Added sql DISTINCT query feature.
Request: 10535Signed-off-by: Jan Schneider <jan@horde.org>
1 files changed, 29 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/16e4609273a3a1df23f585b4a7527146b03d83a0
New Attachment: 0003-Added-sql-DISTINCT-query-feature.patch
Adapter/Base delegating calls to the Schema.
Attached is another patch.
The adapter->distinct() method should be called with proper arguments,
so it knows when ORDER BY clause is also present in the query (which
changes the DISTINCT clause a little bit for postgresql, for example).
But it's really as easy as using $this->mapper->adapter->distinct() in
Horde_Rdo_Query.
http://dev.horde.org/api/framework/Db/
I guess the solution is more complex than I was thinking. Anyway, I
suggest leaving this ticket open for future implementation.
distinct() method to add the DISTINCT to the query.
New Attachment: 0002-Added-sql-DISTINCT-query-feature.patch
$query->distinct() or $query->distinct(true) // Turns on distinct query
$query->distinct(false) // Turns off distinct query
State ⇒ Feedback
flag, e.g. adding a boolean argument to the distinct() method that
defaults to true.
State ⇒ New
New Attachment: 0001-Added-sql-DISTINCT-query-feature.patch
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ DISTINCT sql query feature in Horde/Rdo/Query.php
Type ⇒ Enhancement
Priority ⇒ 1. Low
instead that makes a query DISTINCT.
Jan.
- - - - - - - - - -
Attached is a suggestion.
Luis Felipe