Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Take and Paginate, also removed += #56

Closed
wants to merge 1 commit into from

Conversation

ThePoShWolf
Copy link

I have a use case where I want to retrieve just 1 record from a table based on how they are sorted, so I implemented the Take parameter of the TableQuery and added the option to disable pagination so it only retrieves the first page of items.

Also, the += operator is quite slow when dealing with large arrays, so I reworked that section as well so it just outputs instead of storing the data to a variable and then outputting.

@paulomarquesc
Copy link
Owner

@PaulCheng and @sakash279 , can one of you please take a look at this?

)
# Internal function
# Executes query in async mode

if ($TableQuery -ne $null)
{
$token = $null
$AllRows = @()
do
if ($Paginate)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general guideline is to always use continuation token while invoking Segmented Query, and it's recommended to always use Segmented Query.
The reason is when server (both storage and cosmosdb) clusters data into multiple physical partitions, the first page may contain no results but a continuation token.
I don't think we need this change, and I don't see any benefit of doing this change either. User may get confused what value to give to the Paginate parameter and ends up using true anyways.

@paulomarquesc
Copy link
Owner

As per current maintainers of the SDK recommendation we're closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants