FileQueryStore class
Represents the implementation of IQueryStore which store queries on the file system. Implements the Korzh.EasyQuery.Services.IQueryStore
public class Korzh.EasyQuery.Services.FileQueryStore : IQueryStorePackage: Korzh.EasyQuery (targets: netstandard2.0)
Assembly: Korzh.EasyQuery.dll
Constructors
Section titled “Constructors”| Name | Type | Description |
|---|---|---|
| FileQueryStore(FileQueryStoreSettings settings) | void | Initializes a new instance of the Korzh.EasyQuery.Services.FileQueryStore class. |
FileQueryStore(string dataPath) | void | Initializes a new instance of the Korzh.EasyQuery.Services.FileQueryStore class. |
FileQueryStore(IOptions<FileQueryStoreSettings> options) | void | Initializes a new instance of the Korzh.EasyQuery.Services.FileQueryStore class. |
Methods
Section titled “Methods”| Name | Type | Description |
|---|---|---|
| AddQueryAsync(Query query) | Task<bool> | Adds a new query to the storage. |
FilterFileNames(IEnumerable<string> fileNames) | IEnumerable<string> | Filters files on Korzh.EasyQuery.Services.FileQueryStore.GetAllQueriesAsync(System.String) |
FilterQueryItems(IEnumerable<QueryListItem> queries) | IEnumerable<QueryListItem> | Filters queries on Korzh.EasyQuery.Services.FileQueryStore.GetAllQueriesAsync(System.String) |
GetAllQueriesAsync(string modelId) | Task<IEnumerable<QueryListItem>> | Returns the list of all queries for specified model. |
GetFileNameByQueryId(string queryId) | string | Gets the file name by queryId |
GetQueryFileText(string modelId, string queryId) | string | Read the content of the query file and returns it as a string. |
GetQueryIdByFileName(string fileName) | string | Gets queryId by file name. |
LoadQueryAsync(Query query, string queryId) | Task<bool> | Loads the query’s content from the storage |
RemoveQueryAsync(string modelId, string queryId) | Task<bool> | Removes from the storage the query specified by model ID and query ID. |
SaveQueryAsync(Query query, bool createIfNotExists = True) | Task<bool> | Saves the query to the storage. |
TuneQuery(Query query, bool isAdding) | void | Tunes query before adding or saving |