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

Feature/formatter #279

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft

Feature/formatter #279

wants to merge 32 commits into from

Conversation

worksofliam
Copy link
Contributor

@worksofliam worksofliam commented Sep 21, 2024

Adds the ability to format SQL documents.

Internal notes

Has major change to parser to include scalar functions in getObjectReferences. This might affect Source Orbit. It also fixes some issues with hover.

To format a document:

  1. Open SQL document
  2. Write or add content
  3. F1 -> 'Format Document'

To configure SQL formatter

  1. Open VS Code settingd (Command + Comma)
  2. Navigate to Extension -> Db2 for i -> SQL Formatting (or search 'sql formatting')

How we collect feedback

Reply with:

  • Your SQL code that doesn't format correctly
  • What you expect the code to look like
  • The format settings you used (if not the default)

worksofliam and others added 25 commits March 18, 2024 16:40
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
@worksofliam worksofliam marked this pull request as draft September 21, 2024 19:27
Copy link

👋 A new build is available for this PR based on 296a251.

Copy link

👋 A new build is available for this PR based on 258e6eb.

Signed-off-by: worksofliam <[email protected]>
Copy link

👋 A new build is available for this PR based on d6e287e.

@worksofliam
Copy link
Contributor Author

worksofliam commented Sep 23, 2024

Possible hover bug with getObjectStatistics? It's related to lateral.

select a.*, b.*
from qsys2.exit_program_info a, lateral (
  select *
  from table (
    qsys2.object_statistics(
      exit_program_library,
      '*pgm',
      exit_program
    )
  )
) b
where exit_point_name like 'qibm_qca_%_command%'
order by exit_point_name, exit_program_number;

Copy link

👋 A new build is available for this PR based on 008e435.

Signed-off-by: worksofliam <[email protected]>
Copy link

👋 A new build is available for this PR based on 6c3ee29.

Copy link

👋 A new build is available for this PR based on 04b43eb.

Copy link

github-actions bot commented Oct 3, 2024

👋 A new build is available for this PR based on 9ae112b.

Copy link

github-actions bot commented Oct 3, 2024

👋 A new build is available for this PR based on cda50e7.

@worksofliam worksofliam added this to the 2.0.0 milestone Oct 3, 2024
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.

1 participant