Skip to content

Commit

Permalink
add query
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Oct 18, 2023
1 parent 5948f79 commit d318a3d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ public sealed class CohortHoldoutLookupRequest : PipelineUseCase, ICanBeSummaris

public string DescriptionForAuditLog { get; set; }

public string WhereQuery { get; set; }

public string Name { get; set; }

public DateTime MinDate { get; set; }
public DateTime MaxDate { get; set; }
public string DateColumnName { get; set; }
public CohortHoldoutLookupRequest(CohortIdentificationConfiguration cic, string name, int count, bool isPercent, string descriptionForAuditLog,string minDate=null,string maxDate=null,string dateColumnName=null)
public CohortHoldoutLookupRequest(CohortIdentificationConfiguration cic, string name, int count, bool isPercent, string descriptionForAuditLog,string whereQuery,string minDate=null,string maxDate=null,string dateColumnName=null)
{
CIC = cic;
Name = name;
Expand All @@ -46,6 +48,7 @@ public CohortHoldoutLookupRequest(CohortIdentificationConfiguration cic, string
DateTime.TryParseExact(maxDate, "DD/MM/YYYY", new CultureInfo("en-GB"), DateTimeStyles.None, out _MaxDate);
MinDate = _MinDate;
DateColumnName = dateColumnName;
WhereQuery = whereQuery;
AddInitializationObject(this);
}
public string GetSummary(bool includeName, bool includeId)
Expand Down
2 changes: 1 addition & 1 deletion Rdmp.Core/CommandExecution/BasicActivateItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ public virtual CohortHoldoutLookupRequest GetCohortHoldoutLookupRequest(External
else
throw new Exception("User chose not to enter a version number and none was provided");

return new CohortHoldoutLookupRequest(cic, "empty", 1,false,"");
return new CohortHoldoutLookupRequest(cic, "empty", 1,false,"","");
}

/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ private void btnOk_Click(object sender, EventArgs e)
string minDate = textBox2.Text;
string maxDate = textBox3.Text;
string dateColumnName = textBox4.Text;
Result = new CohortHoldoutLookupRequest(_cic, name, Decimal.ToInt32(numericUpDown1.Value), comboBox1.Text == "%", "", minDate, maxDate, dateColumnName);
string whereQuery = textBox1.Text;
Result = new CohortHoldoutLookupRequest(_cic, name, Decimal.ToInt32(numericUpDown1.Value), comboBox1.Text == "%", "", whereQuery, minDate, maxDate, dateColumnName);
//see if it is passing checks
var notifier = new ToMemoryCheckNotifier();

Check warning

Code scanning / CodeQL

Useless assignment to local variable Warning

This assignment to
notifier
is useless, since its value is never read.
//Result.Check(notifier);
Expand Down

0 comments on commit d318a3d

Please sign in to comment.