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

Capture and prettify <STORE> error when result set is too big #4

Open
bdeboe opened this issue Oct 27, 2020 · 2 comments
Open

Capture and prettify <STORE> error when result set is too big #4

bdeboe opened this issue Oct 27, 2020 · 2 comments

Comments

@bdeboe
Copy link
Collaborator

bdeboe commented Oct 27, 2020

I ran into a error when executing a SELECT * from a somewhat bigger table. While the regular table browse function uses some form of paging to limit the result set to be returned, it's probably not appropriate to fiddle with user-supplied queries in the same way, even if it's a blunt a SELECT *, so let's maybe detect if the returned error is a one as in the snippet below and return something nicer such as "Query result set is too big. Please use a TOP clause or change the statement to retrieve fewer rows"

ERROR #5002: ObjectScript error: <STORE>^%Api.Atelier.v1.1 [^%Api.Atelier.v1.1:USER]

if (data.result.status && data.result.status !== "") {

@bdeboe
Copy link
Collaborator Author

bdeboe commented Jan 3, 2023

A change to the server-side API (Atelier API v6) to limit the number of rows to return is on its way to 2023.1, due for preview release in the next month or so. Taking advantage of this on the SQLTools side should significantly lower the risk of running into this error.

CC @isc-bsaviano

@isc-bsaviano
Copy link

Atelier API v6 adds support for a new max query parameter that accepts a positive integer and restricts the number of rows returned for each result set to that value. If the value is not a positive integer or the parameter was not passed, all rows will be returned. This extension should expose a setting that controls this parameter for all requests and the default should probably be between 500-1000.

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

No branches or pull requests

2 participants