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

Offset to error into the string of SQL when creating procedures and function #91

Open
NielsLiisberg opened this issue Dec 20, 2024 · 0 comments

Comments

@NielsLiisberg
Copy link

NielsLiisberg commented Dec 20, 2024

This is a cross-issue between VSCode - code for i and the Db2 for i extensions and mapepire.

When creating procedures and functions in VScode, and a syntax or semantic error is typed in, it would be appreciated if the cursor could be positioned on the code line and column where the error exists.

The requirement for Db2 for i is posted here:
codefori/vscode-db2i#309

This requires that mapepire has the possibility to query this information.

This information can be obtained with GET DIAGNOSTIC and retrieve the DB2_OFFSET value.

This can be done in run() method "catch" of the ClientRequest module, and return the offset along with the JSON error object along with the sql_state and sql_rc

Alternatively - it could be a separate method getDiagnostics() that Db2 for i (or any other client) could call - perhaps also for other diagnostics info in the future

The feature might also be useful when entering any other complex SQL statements ( that fails)

ACS SQL already has this feature (to some extent)

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

1 participant