Interface IQueryableType
A type of items that can be queried within the lemonedge platform.
The standard implementation for this are entities (via EntityDescriptorQueryableType), audit history (via AuditHistoryQueryableType), and all existing sql wrappers (via QueriesQueryableType)
However implementing this and the IQueryableItem interface for each item means the system can generate the sql to query custom information you want to add for itNamespace: LemonEdge.API.Queries
Assembly: API.dll
Syntax
public interface IQueryableType
Properties
TypeName
The key for this Queryable Type
Declaration
string TypeName { get; }
Property Value
Type | Description |
---|---|
System.String |
UserFriendlyName
The user friendly name for the type of information that can be queried by this Queryable Type
Declaration
string UserFriendlyName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CanBeDisplayedInUI(IQueryableItem)
Returns true if an instance of this Queryable Item can be displayed in the UI client application.
This is true for queryable items from QueriesQueryableType as these are all ISQLWrapper which can be opened individually.
The entities, and audit queryable items do not have a ui to display information about them. An entity descriptor can not be displayed in the UI, just instances of an entity themselves canDeclaration
bool CanBeDisplayedInUI(IQueryableItem item)
Parameters
Type | Name | Description |
---|---|---|
IQueryableItem | item | The queryable item to see if it can be displayed in the UI |
Returns
Type | Description |
---|---|
System.Boolean | true if an instance of this Queryable Item can be displayed in the UI client application. |
GetAll(IReadOnlyCache)
Returns a list of all QueryableItems that belong to this type of data that can be queried
For instance the QueriesQueryableType returns a Queryable Item for each ISQLWrapper,
and the EntityDescriptorQueryableType returns a Queryable Item for each EntityDescriptor in the systemDeclaration
Task<IEnumerable<IQueryableItem>> GetAll(IReadOnlyCache cache)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCache | cache | The local cache |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IQueryableItem>> | A task returning all queryable items from this type |
GetItemInfoToDisplayInUI(IQueryableItem)
Given a Queryable Item that can be displayed in the ui (CanBeDisplayedInUI(IQueryableItem)) this returns the type and id of the entity that can be opened in the UI that represents that queryable item
In the case if a QueriesQueryableType this will return the ISQLWrapper the Queryable Item represents
Declaration
(Type EntityType, Guid ID) GetItemInfoToDisplayInUI(IQueryableItem item)
Parameters
Type | Name | Description |
---|---|---|
IQueryableItem | item | The queryable item to return the system entity that can be opened from it that it represents |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Type, System.Guid> | The unique Entity Type and ID for a system entity that can be opened from this Queryable Item |
LoadFromID(IReadOnlyCache, IEntityRetriever, String, String)
Given the specific ID of a QueryableItem this returns an instance of that Queryable Item for the query tools to work with
Declaration
Task<IQueryableItem> LoadFromID(IReadOnlyCache cache, IEntityRetriever retriever, string id, string subID = null)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCache | cache | A local cache |
IEntityRetriever | retriever | A context for retrieving information from the lemonedge system |
System.String | id | The id of a Queryable Item |
System.String | subID | A sub id for the Queryable Item |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IQueryableItem> | An instance of the Queryable Item specified from an ID for the query tools to work with |