protected async override Task <Sqless> GetSqless(SqlessRequest request) { var uid = await SqlessAccess.GetUid(request.AccessParams); SqlessConfig.AuthUid = uid; return(new Sqless(SqlessConfig)); }
public static async Task <T> Post <T>(SqlessRequest request, SqlessApiType sqlessApiType) { var res = await HttpClient.PostAsync("sqless/" + sqlessApiType.ToString(), request); if (!res.IsSuccessStatusCode) { throw new SqlessRequestException(res, await res.GetErrorMessage()); } return(await res.GetContent <T>()); }
protected virtual Task <Sqless> GetSqless(SqlessRequest request) { return(Task.FromResult(new Sqless(SqlessConfig))); }
/// <summary> /// (insure connection is opened) /// </summary> /// <param name="sqless">sqless instance</param> /// <param name="request">sqless request</param> /// <param name="auth">readable or writable</param> protected SqlessSqlBuilder(Sqless sqless, SqlessRequest request, SqlessAuth auth) { Sqless = sqless; SqlessRequest = request; Auth = auth; }