mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-19 21:50:45 +00:00
Add count distinct option to count action
This commit is contained in:
@ -37,7 +37,8 @@ public class CountInput extends AbstractTableActionInput
|
||||
{
|
||||
private QQueryFilter filter;
|
||||
|
||||
private List<QueryJoin> queryJoins = null;
|
||||
private List<QueryJoin> queryJoins = null;
|
||||
private Boolean includeDistinctCount = false;
|
||||
|
||||
|
||||
|
||||
@ -120,4 +121,35 @@ public class CountInput extends AbstractTableActionInput
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for includeDistinctCount
|
||||
*******************************************************************************/
|
||||
public Boolean getIncludeDistinctCount()
|
||||
{
|
||||
return (this.includeDistinctCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for includeDistinctCount
|
||||
*******************************************************************************/
|
||||
public void setIncludeDistinctCount(Boolean includeDistinctCount)
|
||||
{
|
||||
this.includeDistinctCount = includeDistinctCount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for includeDistinctCount
|
||||
*******************************************************************************/
|
||||
public CountInput withIncludeDistinctCount(Boolean includeDistinctCount)
|
||||
{
|
||||
this.includeDistinctCount = includeDistinctCount;
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import com.kingsrook.qqq.backend.core.model.actions.AbstractActionOutput;
|
||||
public class CountOutput extends AbstractActionOutput
|
||||
{
|
||||
private Integer count;
|
||||
private Integer distinctCount;
|
||||
|
||||
|
||||
|
||||
@ -52,4 +53,47 @@ public class CountOutput extends AbstractActionOutput
|
||||
{
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for distinctCount
|
||||
*******************************************************************************/
|
||||
public Integer getDistinctCount()
|
||||
{
|
||||
return (this.distinctCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for distinctCount
|
||||
*******************************************************************************/
|
||||
public void setDistinctCount(Integer distinctCount)
|
||||
{
|
||||
this.distinctCount = distinctCount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for distinctCount
|
||||
*******************************************************************************/
|
||||
public CountOutput withDistinctCount(Integer distinctCount)
|
||||
{
|
||||
this.distinctCount = distinctCount;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for count
|
||||
*******************************************************************************/
|
||||
public CountOutput withCount(Integer count)
|
||||
{
|
||||
this.count = count;
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user