Skip to content

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
: IQueryStore

Package: Korzh.EasyQuery (targets: netstandard2.0)

Assembly: Korzh.EasyQuery.dll

NameTypeDescription
FileQueryStore(FileQueryStoreSettings settings)voidInitializes a new instance of the Korzh.EasyQuery.Services.FileQueryStore class.
FileQueryStore(string dataPath)voidInitializes a new instance of the Korzh.EasyQuery.Services.FileQueryStore class.
FileQueryStore(IOptions<FileQueryStoreSettings> options)voidInitializes a new instance of the Korzh.EasyQuery.Services.FileQueryStore class.
NameTypeDescription
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)stringGets the file name by queryId
GetQueryFileText(string modelId, string queryId)stringRead the content of the query file and returns it as a string.
GetQueryIdByFileName(string fileName)stringGets 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)voidTunes query before adding or saving