Skip to content

Commit 1adb46a

Browse files
committed
Added allowing overriding the pagesize in GetAllByQueryAsync using a table name
1 parent 70503be commit 1adb46a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

ServiceNow.Api.Test/GetAllByQueryToleranceTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public async Task AnotherPagingTestAsync()
6868
fieldList,
6969
extraQueryString,
7070
"wss_sys_updated_on",
71+
3,
7172
default).ConfigureAwait(false);
7273
Assert.NotNull(result);
7374
Assert.NotEmpty(result);

ServiceNow.Api/ServiceNowClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public async Task<List<JObject>> GetAllByQueryAsync(
206206
List<string>? fieldList = null,
207207
string? extraQueryString = null,
208208
string? customOrderByField = null,
209+
int? pageSize = null,
209210
CancellationToken cancellationToken = default)
210211
{
211212
_logger.LogDebug($"Calling {nameof(GetAllByQueryAsync)}" +
@@ -227,7 +228,7 @@ public async Task<List<JObject>> GetAllByQueryAsync(
227228
query,
228229
fieldList,
229230
extraQueryString,
230-
_options.PageSize,
231+
pageSize ?? _options.PageSize,
231232
customOrderByField,
232233
cancellationToken
233234
).ConfigureAwait(false);

0 commit comments

Comments
 (0)