Class ReportQuery
- Namespace
- Dynamicweb.Tracking.Reporting
- Assembly
- Dynamicweb.Tracking.dll
Represents a report query.
public class ReportQuery
- Inheritance
-
ReportQuery
- Inherited Members
Constructors
ReportQuery()
Initializes a new instance of the ReportQuery class.
public ReportQuery()
ReportQuery(DateTime, DateTime)
Initializes a new instance of the ReportQuery class.
public ReportQuery(DateTime dateFrom, DateTime dateTo)
Parameters
Properties
Aggregates
Gets or sets the aggregates.
public List<QueryAggregate> Aggregates { get; set; }
Property Value
- List<QueryAggregate>
- The aggregates.
DateFrom
Gets or sets the date from.
public DateTime DateFrom { get; set; }
Property Value
- DateTime
- The date from.
DateTo
Gets or sets the date to.
public DateTime DateTo { get; set; }
Property Value
- DateTime
- The date to.
Filters
Gets or sets the filters.
public List<QueryCondition> Filters { get; set; }
Property Value
- List<QueryCondition>
- The filters.
Groups
Gets or sets the groups.
public List<Grouping> Groups { get; set; }
Property Value
QueryAggregates
Gets or sets the aggregates.
public List<QueryAggregateReport> QueryAggregates { get; set; }
Property Value
- List<QueryAggregateReport>
- The aggregates.
Sorting
Gets or sets the sorting.
public List<string> Sorting { get; set; }
Property Value
Sources
Gets or sets the sources.
public List<DataSource> Sources { get; set; }
Property Value
- List<DataSource>
- The sources.
Methods
AddAggregate<T>(AggregateType, string, bool)
Adds the aggregate.
public QueryAggregate AddAggregate<T>(AggregateType aggregate, string name, bool allowUnsafe = false)
Parameters
aggregate
AggregateType- The aggregate.
name
string- The name.
allowUnsafe
bool- if set to
true
[allow unsafe].
Returns
Type Parameters
T
AddAggregateWithAlias<T>(AggregateType, string, string, bool)
Adds the aggregate.
public QueryAggregate AddAggregateWithAlias<T>(AggregateType aggregate, string name, string alias, bool allowUnsafe = false)
Parameters
aggregate
AggregateType- The aggregate.
name
string- The name.
alias
string- The alias of the aggregate allowing it to be referenced in the query.
allowUnsafe
bool- if set to
true
[allow unsafe].
Returns
Type Parameters
T
AddEventSource(string)
Adds the event source.
public DataSource AddEventSource(string alias = "")
Parameters
alias
string- The source alias.
Returns
AddFilter(string, OperatorType, bool)
Adds the filter.
public QueryCondition AddFilter(string name, OperatorType operatorType, bool allowUnsafe = false)
Parameters
name
string- The name.
operatorType
OperatorType- Type of the operator.
allowUnsafe
bool- if set to
true
[allow unsafe].
Returns
AddFilter(string, OperatorType, object, bool)
Adds the filter.
public QueryCondition AddFilter(string name, OperatorType operatorType, object value, bool allowUnsafe = false)
Parameters
name
string- The name.
operatorType
OperatorType- Type of the operator.
value
object- The value.
allowUnsafe
bool- if set to
true
[allow unsafe].
Returns
AddFilter(string, string, OperatorType)
Adds the filter.
public QueryCondition AddFilter(string name, string foreignName, OperatorType operatorType)
Parameters
name
string- The name.
foreignName
string- The foreign name.
operatorType
OperatorType- Type of the operator.
Returns
AddGrouping(string, Func<string, string>, Func<string[], string>)
Adds the grouping.
public Grouping AddGrouping(string name, Func<string, string> nameMapping, Func<string[], string> concatenation = null)
Parameters
name
string- The name.
nameMapping
Func<string, string>- The name mapping.
concatenation
Func<string[], string>- The concatenation.
Returns
AddGroupings(string[], Func<string, string>, Func<string[], string>, bool?, bool)
Adds the groupings.
[Obsolete("Use AddGroupings(string[], Func<string, string>, DateGrouping?, Func<string[], string>) instead.")]
public Grouping AddGroupings(string[] names, Func<string, string> nameMapping, Func<string[], string> concatenation = null, bool? useWeekPattern = null, bool isDatePattern = false)
Parameters
names
string[]- The names.
nameMapping
Func<string, string>- The name mapping.
concatenation
Func<string[], string>- The concatenation.
useWeekPattern
bool?- The use week pattern.
isDatePattern
bool- if set to
true
[is date pattern].
Returns
AddGroupings(string[], Func<string, string>, DateGrouping?, Func<string[], string>)
Adds the groupings.
public Grouping AddGroupings(string[] names, Func<string, string> nameMapping, DateGrouping? dateGrouping, Func<string[], string> concatenation = null)
Parameters
names
string[]- The names.
nameMapping
Func<string, string>- The name mapping.
dateGrouping
DateGrouping?- The date grouping.
concatenation
Func<string[], string>- The concatenation.
Returns
AddGroupings(string[], Func<string, string>, DateGrouping?, Func<string[], string>, bool)
Adds Groupings for the given named columns.
public Grouping AddGroupings(string[] names, Func<string, string> nameMapping, DateGrouping? dateGrouping, Func<string[], string> concatenation = null, bool allowUnsafeColumnNames = false)
Parameters
names
string[]- The names of the columns to group by.
nameMapping
Func<string, string>- The mapping function to retrieve labels for the given columns.
dateGrouping
DateGrouping?- The DateGrouping
concatenation
Func<string[], string>- The concatenation function.
allowUnsafeColumnNames
boolfalse
if the given column names should be treated as delimited identifiers; otherwisetrue
. Default isfalse
.
Returns
AddGroupingWithoutDelimitedIdentifier(string, Func<string, string>, Func<string[], string>)
Adds a Grouping for the given named column.
public Grouping AddGroupingWithoutDelimitedIdentifier(string name, Func<string, string> nameMapping, Func<string[], string> concatenation = null)
Parameters
name
string- The name of the columns to group by.
nameMapping
Func<string, string>- The mapping function to retrieve labels for the given columns.
concatenation
Func<string[], string>- The concatenation function.
Returns
AddQueryAggregate(ReportQuery, string)
Adds the query aggregate.
public QueryAggregateReport AddQueryAggregate(ReportQuery query, string name)
Parameters
query
ReportQuery- The report query.
name
string- The name.
Returns
AddSessionSource()
Adds the session source.
public string AddSessionSource()
Returns
AddSessionSource(string)
Adds the session source.
public string AddSessionSource(string alias)
Parameters
alias
string- The source alias.
Returns
AddSource(string)
Adds the source.
public DataSource AddSource(string name)
Parameters
name
string- The name.
Returns
AddSource(string, string)
Adds the source.
public DataSource AddSource(string name, string alias)
Parameters
Returns
AddViewSource(bool, string)
Adds the view source.
public string AddViewSource(bool addReferencesToTrackingSession = true, string alias = "")
Parameters
addReferencesToTrackingSession
bool- Add references to traking session table.
alias
string- The source alias.
Returns
GetGroupingNameMapping(int)
Gets the grouping name mapping.
public Func<string, string> GetGroupingNameMapping(int index)
Parameters
index
int- The index.