Skip to content

Commit

Permalink
Added allowing overriding the pagesize in GetAllByQueryAsync using a …
Browse files Browse the repository at this point in the history
…table name
  • Loading branch information
danielabbatt committed Feb 22, 2023
1 parent 70503be commit 1adb46a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ServiceNow.Api.Test/GetAllByQueryToleranceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public async Task AnotherPagingTestAsync()
fieldList,
extraQueryString,
"wss_sys_updated_on",
3,
default).ConfigureAwait(false);
Assert.NotNull(result);
Assert.NotEmpty(result);
Expand Down
3 changes: 2 additions & 1 deletion ServiceNow.Api/ServiceNowClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public async Task<List<JObject>> GetAllByQueryAsync(
List<string>? fieldList = null,
string? extraQueryString = null,
string? customOrderByField = null,
int? pageSize = null,
CancellationToken cancellationToken = default)
{
_logger.LogDebug($"Calling {nameof(GetAllByQueryAsync)}" +
Expand All @@ -227,7 +228,7 @@ public async Task<List<JObject>> GetAllByQueryAsync(
query,
fieldList,
extraQueryString,
_options.PageSize,
pageSize ?? _options.PageSize,
customOrderByField,
cancellationToken
).ConfigureAwait(false);
Expand Down

0 comments on commit 1adb46a

Please sign in to comment.