Skip to main 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

Assembly: Korzh.EasyQuery.dll

Constructors

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.

Properties

NameTypeDescription
SettingsFileQueryStoreSettings

Methods

NameTypeDescription
AddQueryAsync(Query query, CancellationToken ct = null)Task<bool>Adds a new query to the storage.
FilterFileNames(IEnumerable<string> fileNames)IEnumerable<string>Filters files on
FilterQueryItems(IEnumerable<QueryListItem> queries)IEnumerable<QueryListItem>Filters queries on
GetAllQueriesAsync(string modelId, CancellationToken ct = null)Task<IEnumerable<QueryListItem>>Returns the list of all queries for specified model.
GetFileNameByQueryId(string queryId)stringGets the file name by queryId
GetModelFolderPath(string modelId)string
GetQueryFilePathById(string modelId, string queryId, string format = json)string
GetQueryFileText(string modelId, string queryId)stringRead the content of the query file and returns it as a string.
GetQueryFolderPath(string modelId)string
GetQueryIdByFileName(string fileName)stringGets queryId by file name.
LoadQueryAsync(Query query, string queryId, CancellationToken ct = null)Task<bool>Loads the query's content from the storage
RemoveQueryAsync(string modelId, string queryId, CancellationToken ct = null)Task<bool>Removes from the storage the query specified by model ID and query ID.
SaveQueryAsync(Query query, bool createIfNotExists = True, CancellationToken ct = null)Task<bool>Saves the query to the storage.
TuneQuery(Query query, bool isNew)voidTunes query before adding or saving