Class GetSafeItems
A helper class for executing the system default GetSafeItems query
See https://help.lemonedge.com/getsafeitems/ for more information.
Inheritance
Inherited Members
Namespace: LemonEdge.API.Entities.Helpers.Queries
Assembly: LemonEdge.API.dll
Syntax
public class GetSafeItems : SQLWrapperExecuter<ISafeItem>Constructors
GetSafeItems(IEntityRetriever, IReadOnlyCache)
Creates a new SQLWrapperExecuter for the GetSafeItems standard SQL Wrapper query
Declaration
public GetSafeItems(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_SAFEID
Declaration
public static readonly string PARAM_SAFEIDField Value
| Type | Description | 
|---|---|
| string | 
QUERYNAME
Declaration
public const string QUERYNAME = "GetSafeItems"Field Value
| Type | Description | 
|---|---|
| string | 
Methods
AddGetSafeID(Guid)
Adds the specified safe id to the parameters for executing this query
Declaration
public GetSafeItems AddGetSafeID(Guid safeID)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | safeID | The safe id to run the GetSafeItems query with | 
Returns
| Type | Description | 
|---|---|
| GetSafeItems | This GetSafeItems instance for chaining commands | 
Execute(IEntityRetriever, IReadOnlyCache, Guid, QueryableExecuter<ISafeItem>)
Executes the GetSafeItems system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public static Task<IEnumerable<ISafeItem>> Execute(IEntityRetriever retriever, IReadOnlyCache cache, Guid safeID, QueryableExecuter<ISafeItem> filter = null)Parameters
| Type | Name | Description | 
|---|---|---|
| IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform | 
| IReadOnlyCache | cache | A local cache | 
| Guid | safeID | The safe id to run the GetSafeItems query with | 
| QueryableExecuter<ISafeItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query | 
Returns
| Type | Description | 
|---|---|
| Task<IEnumerable<ISafeItem>> | A task holding the results of executing the GetSafeItems query with the specified parameters | 
Execute(Guid, QueryableExecuter<ISafeItem>)
Executes the GetSafeItems system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public Task<IEnumerable<ISafeItem>> Execute(Guid safeID, QueryableExecuter<ISafeItem> filter = null)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | safeID | The safeid to run the GetSafeItems query with | 
| QueryableExecuter<ISafeItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query | 
Returns
| Type | Description | 
|---|---|
| Task<IEnumerable<ISafeItem>> | A task holding the results of executing the GetSafeItems query with the specified parameters | 
ExecuteCount(IEntityRetriever, IReadOnlyCache, Guid, QueryableExecuter<ISafeItem>)
Executes the GetSafeItems 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 safeID, QueryableExecuter<ISafeItem> filter = null)Parameters
| Type | Name | Description | 
|---|---|---|
| IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform | 
| IReadOnlyCache | cache | A local cache | 
| Guid | safeID | The safe id to run the GetSafeItems query with | 
| QueryableExecuter<ISafeItem> | 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 GetSafeItems query with the specified parameters | 
ExecuteCount(Guid, QueryableExecuter<ISafeItem>)
Executes the GetSafeItems system SQLWrapper using the specified parameters, and returns the count of the results of that query
Declaration
public Task<int> ExecuteCount(Guid safeID, QueryableExecuter<ISafeItem> filter = null)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | safeID | The safe id to run the GetSafeItems query with | 
| QueryableExecuter<ISafeItem> | 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 GetSafeItems query with the specified parameters | 
ParametersAreValid()
Indicates if the parameters for running this sql wrapper executer are valid.
If invalid the GetQueryArgumentsAndFilter() method will throw an exception
Declaration
protected override bool ParametersAreValid()Returns
| Type | Description | 
|---|---|
| bool | True if the current parameters for this query are valid, false if not |