Class GetCanvasItems
A helper class for executing the system default GetCanvasItems query
See https://help.lemonedge.com/getcanvasitems/ for more information.
Inheritance
Inherited Members
Namespace: LemonEdge.API.Entities.Helpers.Queries
Assembly: LemonEdge.API.dll
Syntax
public class GetCanvasItems : SQLWrapperExecuter<ICanvasItem>
Constructors
GetCanvasItems(IEntityRetriever, IReadOnlyCache)
Creates a new SQLWrapperExecuter for the GetCanvasItems standard SQL Wrapper query
Declaration
public GetCanvasItems(IEntityRetriever retriever, IReadOnlyCache cache)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
IReadOnlyCache | cache | A local cache |
Fields
PARAM_CANVASID
The parameter for the canvas to run this query against
Declaration
public static readonly string PARAM_CANVASID
Field Value
Type | Description |
---|---|
string |
QUERYNAME
Global name of the SQLWrapper query that returns all entities that have been modified within a canvas
Declaration
public const string QUERYNAME = "GetCanvasItems"
Field Value
Type | Description |
---|---|
string |
Methods
AddCanvasID(Guid)
Adds the id of a canvas for running the sql wrapper query in. If this is not set, it is automatically determined from the context in Retriever
Declaration
public override BaseSQLWrapperExecuter<SQLWrapperExecuter<ICanvasItem>, ICanvasItem> AddCanvasID(Guid canvasID)
Parameters
Type | Name | Description |
---|---|---|
Guid | canvasID | The canvas to run this sql wrapper in |
Returns
Type | Description |
---|---|
BaseSQLWrapperExecuter<SQLWrapperExecuter<ICanvasItem>, ICanvasItem> | This instance, for chaining commands |
Overrides
AddGetCanvasID(Guid)
Adds the specified canvas id to the parameters for executing this query
Declaration
public GetCanvasItems AddGetCanvasID(Guid canvasID)
Parameters
Type | Name | Description |
---|---|---|
Guid | canvasID | The canvas id to run the GetCanvasItems query with |
Returns
Type | Description |
---|---|
GetCanvasItems | This GetCanvasItems instance for chaining commands |
Execute(IEntityRetriever, IReadOnlyCache, Guid, QueryableExecuter<ICanvasItem>)
Executes the GetCanvasItems system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public static Task<IEnumerable<ICanvasItem>> Execute(IEntityRetriever retriever, IReadOnlyCache cache, Guid canvasID, QueryableExecuter<ICanvasItem> filter = null)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
IReadOnlyCache | cache | A local cache |
Guid | canvasID | The canvas id to run the GetCanvasItems query with |
QueryableExecuter<ICanvasItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
Type | Description |
---|---|
Task<IEnumerable<ICanvasItem>> | A task holding the results of executing the GetCanvasItems query with the specified parameters |
Execute(Guid, QueryableExecuter<ICanvasItem>)
Executes the GetCanvasItems system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public Task<IEnumerable<ICanvasItem>> Execute(Guid canvasID, QueryableExecuter<ICanvasItem> filter = null)
Parameters
Type | Name | Description |
---|---|---|
Guid | canvasID | The canvas id to run the GetCanvasItems query with |
QueryableExecuter<ICanvasItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
Type | Description |
---|---|
Task<IEnumerable<ICanvasItem>> | A task holding the results of executing the GetCanvasItems query with the specified parameters |
ExecuteCount(IEntityRetriever, IReadOnlyCache, Guid, QueryableExecuter<ICanvasItem>)
Executes the GetCanvasItems system SQLWrapper using the specified parameters, and returns the count of the results of that query
Declaration
public static Task<int> ExecuteCount(IEntityRetriever retriever, IReadOnlyCache cache, Guid canvasID, QueryableExecuter<ICanvasItem> filter = null)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
IReadOnlyCache | cache | A local cache |
Guid | canvasID | The canvas id to run the GetCanvasItems query with |
QueryableExecuter<ICanvasItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
Type | Description |
---|---|
Task<int> | A task holding the count of executing the GetCanvasItems query with the specified parameters |
ExecuteCount(Guid, QueryableExecuter<ICanvasItem>)
Executes the GetCanvasItems system SQLWrapper using the specified parameters, and returns the count of the results of that query
Declaration
public Task<int> ExecuteCount(Guid canvasID, QueryableExecuter<ICanvasItem> filter = null)
Parameters
Type | Name | Description |
---|---|---|
Guid | canvasID | The canvas id to run the GetCanvasItems query with |
QueryableExecuter<ICanvasItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
Type | Description |
---|---|
Task<int> | A task holding the count of executing the GetCanvasItems query with the specified parameters |
ParametersAreValid()
Indicates if the parameters are valid for executing the query
Declaration
protected override bool ParametersAreValid()
Returns
Type | Description |
---|---|
bool | True if the parameters contain a value for @canvasID |