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 #309

Closed
NielsLiisberg opened this issue Dec 20, 2024 · 4 comments · Fixed by #307
Closed

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

NielsLiisberg opened this issue Dec 20, 2024 · 4 comments · Fixed by #307

Comments

@NielsLiisberg
Copy link

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 enhancement to mapepire is described here
Mapepire-IBMi/mapepire-server#91

mapepire will then return the offset into the statement entered when an error object is returned, that maps to the position

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

ACS SQL already has this feature (to some extent)

@worksofliam
Copy link
Contributor

@NielsLiisberg what would you know, we are working on a syntax checker PR right now. I will attach the PR to this issue.

@worksofliam worksofliam linked a pull request Dec 20, 2024 that will close this issue
@NielsLiisberg
Copy link
Author

NielsLiisberg commented Dec 20, 2024 via email

@worksofliam
Copy link
Contributor

@NielsLiisberg I tried out your snippet and this is what it gave me:

image

Feel free to paste me an entire script to try as well.

@NielsLiisberg
Copy link
Author

NielsLiisberg commented Dec 20, 2024 via email

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 a pull request may close this issue.

2 participants