GetFileExtentionByContentType(string contentType) | string | Gets the file extention by the content type. |
GetJSVersion() | Version | Gets the version of EasyQuery.JS library that has sent the request. |
GetQueryFileExt(string fileFormat) | string | Gets the extension of the query file for specified file format (json or xml). |
GetValidFileName(string fileName) | string | Gets the valid file name based on the string value passed in the parameter. |
HandleErrorResponseAsync(int statusCode, string message, Func <JsonWriter , CancellationToken , Task > writeContentAction = null, `CancellationToken` ct = null) | Task | Handles exceptions that might occur inside any other EasyQuery API request handler. If the writing to the response content has not started it returns a response with 400 code and the error message. |
HandleExceptionAsync(Exception ex, CancellationToken ct = null) | Task | Handles exceptions that might occur inside any other EasyQuery API request handler. If the writing to the response content has not started it returns a response with 400 code and the error message. |
HandleExportResultAsync(string modelId, string formatType, CancellationToken ct = null) | Task | Handles the ExportResult requests. |
HandleFetchDataAsync(string modelId, CancellationToken ct = null) | Task | Handles the "FetchData" request. This handler receives a query JSON in the request's body, builds a query (SQL or LINQ), executes it and return the result set (again in JSON format). |
HandleGetLicenseKey2Async(CancellationToken ct = null) | Task | Handles the "GetLicenseKey" request as an asynchronous operation. |
HandleGetLicenseKeyAsync(CancellationToken ct = null) | Task | Handles the "GetLicenseKey" request as an asynchronous operation. |
HandleGetModelAsync(string modelId, CancellationToken ct = null) | Task | Handles the "GetModel" request as an asynchronous operation. |
HandleGetQueryAsync(string modelId, string queryId, CancellationToken ct = null) | Task | Handles the "GetQuery" request and writes the response |
HandleGetQueryFileAsync(string modelId, string fileFormat, CancellationToken ct = null) | Task | Handles GetQueryFile request. |
HandleGetQueryListAsync(string modelId, CancellationToken ct = null) | Task | Handles the "GetQueryList" request and returns the list of saved queries for a particular model. |
HandleGetValueListAsync(string modelId, string editorId, CancellationToken ct = null) | Task | Handles the "GetValueList" request. Returs the list of values for a particular value editor. |
HandleNewQueryAsync(string modelId, CancellationToken ct = null) | Task | Handles the "NewQuery" request and returns a JSON representation of a new new empty query for a particular data model. |
HandlePutLicenseKeyAsync(CancellationToken ct = null) | Task | Handles the "PutLicenseKey" request as an asynchronous operation. |
HandleRemoveQueryAsync(string modelId, string queryId, CancellationToken ct = null) | Task | Handles the "RemoveQuery" request and remove the query with the specified ID from the storage. |
HandleSaveQueryAsync(string modelId, string queryId, CancellationToken ct = null) | Task | Handles the "SaveQuery" request for specified model and query. The JSON representation of the query should be passed in the request's body. |
HandleSyncQueryAsync(string modelId, string queryId, CancellationToken ct = null) | Task | Handles the "SyncQuery" request. This action gets a JSON representation of the query in request's body and passes it SyncQuery method of EasyQueryManager. The manager can save the query and/or build it and return SQL statement (depending on options) |
HandleUploadQueryFileAsync(string modelId, CancellationToken ct = null) | Task | Handles UploadQueryFile request. |
LoadQueryFromFormFileAsync(IFormFile file, CancellationToken ct) | Task | Loads query from a form file. |
WriteErrorJsonResponseAsync(HttpContext context, string errorMessage, Func <JsonWriter , CancellationToken , Task > writeContentAction = null, `CancellationToken` ct = null) | Task | Writes an ERROR response in JSON format. This function actually calls Korzh.EasyQuery.AspNetCore.EasyQueryApiHandler.WriteJsonResponseAsync(Microsoft.AspNetCore.Http.HttpContext,System.String,System.Func{Newtonsoft.Json.JsonWriter,System.Threading.CancellationToken,System.Threading.Tasks.Task},System.Threading.CancellationToken) with "error" value for the "result" parameter. It also writes a "message" property to the response object with the value passed in "errorMessage" parameter. |
WriteExportedDataAsync(Stream responseStream, string formatType, CancellationToken ct) | Task | Writes exported data to the response. |
WriteExtraContentAsync(JsonWriter writer, CancellationToken ct = null) | Task | Writes any extra content to the response body. Does nothing but can be overridden in the descendants. |
WriteFetchDataResponseAsync(JsonWriter jsonWriter, IEqResultSet resultSet, CancellationToken ct) | Task | Writes the response for ExecuteQuery request to JsonWriter. Can be overrided in derived classes to add extra data to the response. |
WriteGetModelResponseAsync(JsonWriter jsonWriter, DataModel model, CancellationToken ct) | Task | Writes the model's content to the JsonWriter. Can be overriden in the derived classes to write some extra data to the response for GetModel request . |
WriteGetQueryResponseAsync(JsonWriter jsonWriter, Query query, CancellationToken ct) | Task | Being overriden in the derived classes this method allows to write some extra data to the response for GetQuery request . |
WriteJsonResponseAsync(HttpContext context, string result, Func <JsonWriter , CancellationToken , Task > writeContentAction, CancellationToken ct) | Task | Writes a response in JSON format. This function creates a HttpResponseStreamWriter and invokes the callback function which actually does the job. |
WriteOkJsonResponseAsync(HttpContext context, Func <JsonWriter , CancellationToken , Task > writeContentAction, CancellationToken ct) | Task | Writes an OK response in JSON format. This function actually calls Korzh.EasyQuery.AspNetCore.EasyQueryApiHandler.WriteJsonResponseAsync(Microsoft.AspNetCore.Http.HttpContext,System.String,System.Func{Newtonsoft.Json.JsonWriter,System.Threading.CancellationToken,System.Threading.Tasks.Task},System.Threading.CancellationToken) with "ok" value for the "result" parameter. |
WriteQueryStreamAsync(HttpResponseStreamWriter responseWriter, string fileFormat, CancellationToken ct) | Task | Write query into the response stream. |
WriteSyncQueryResponseAsync(JsonWriter jsonWriter, bool isAuthorized, bool querySaved, CancellationToken ct) | Task | Writes the response for SyncQuery request to JsonWriter. Can be overrided in derived classes to add extra data to the respons |