Table of Contents

Class QueryDefinition

Namespace
ToSic.Eav.DataSource.Query
Assembly
ToSic.Eav.DataSources.dll

This contains the structure / definition of a query, which was originally stored in an IEntity

[InternalApi_DoNotUse_MayChangeWithoutNotice("this is just fyi")]
public class QueryDefinition : EntityBasedWithLog, IHasDecorators<IEntity>, IHasLog
Inheritance
EntityBasedWithLog
QueryDefinition
Implements

Fields

AppId

The appid inside which the query will run, not where it is stored!
This can differ, because certain global queries (stored in the global app) will run in a specific app - for example to retrieve all ContentTypes of that app.

public int AppId

Field Value

int

ParamRegex

Regex to detect key=value.
Keys must always be the first thing optionally followed by a = and then anything till a newline. Anything that doesn't match will be ignored.
Comments should start with a //

public static Regex ParamRegex

Field Value

Regex

Properties

Connections

Connections used in the query to map various DataSource Out-Streams to various other DataTarget In-Streams

public IList<Connection> Connections { get; }

Property Value

IList<Connection>

Params

The param-dictionary used for the LookUp. All keys will be available in the token [Params:key]

public IDictionary<string, string> Params { get; }

Property Value

IDictionary<string, string>

ParamsLookUp

The ILookUp for the params of this query - based on the Params.

public ILookUp ParamsLookUp { get; }

Property Value

ILookUp

Always returns a valid ILookup, even if no params found.

ParamsRaw

The raw Params used in this query, as stored in the IEntity

public string ParamsRaw { get; }

Property Value

string

Parts

The parts of the query

public List<QueryPartDefinition> Parts { get; }

Property Value

List<QueryPartDefinition>

TestParameters

The test parameters as stored in the IEntity

public string TestParameters { get; }

Property Value

string

Methods

Reset()

Will reset all the parameters so you can run the query again with different parameters.

public void Reset()