Skip to content

docs: Add section on DSL buildStatement() and prepareSQL() #2563

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bog-walk
Copy link
Member

Description

Summary of the change: Add subsection to DSL root about statement builder

Detailed description:

  • Why:

    • Minimal documentation about Query.prepareSQL() except in FAQ
    • New V1 buildStatement() functionality not documented yet
  • What:

    • Add new file under DSL section
      • Reroute FAQ answer to this file
    • Add content about prepareSQL() with queries
    • Add content about buildStatement() introduced in V1
    • Add details on how to use non-executed statement withexec()

Type of Change

Please mark the relevant options with an "X":

  • Documentation update

@bog-walk
Copy link
Member Author

@vnikolova This is sort of a draft following a TODO I'm resolving, in that I'm willing to have any of the following changed depending on your advice:

  • Location (and name) of new file
  • Whether file should be .md or .topic
  • All samples are hard-coded at the moment. Please let me know, based on the final location of this section, which snippets could/should be used to store samples.

I just wanted to lay out the content for the final api, so feel free to push any changes you think are best.

Comment on lines 115 to 104
Alternatively, if the statement being used is sourced from the Exposed API, `Statement.toExecutable()` can be used to
resolve the appropriate executable class instance for the calling statement type:
Copy link
Member Author

Choose a reason for hiding this comment

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

No api link as it doesn't exist yet; not sure the proper protocol for this, but maybe it's possible to guess url based on pattern?
New API is in PR #2562

Copy link
Collaborator

@vnikolova vnikolova left a comment

Choose a reason for hiding this comment

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

Thanks for this addition @bog-walk!
Looks great - I only suggest a different title and using second person whenever possible.

bog-walk and others added 3 commits July 25, 2025 00:01
- Docs currently missing section about prepareSQL()
- New V1 functionality not documented anywhere
- Add review suggestion
- Add new example file in exposed-dsl snippets project
- Replace hard-coded examples with reference to new file
@bog-walk bog-walk force-pushed the bog-walk/add-statement-builder-docs branch from c8050d9 to b96b8bc Compare July 25, 2025 04:43
@bog-walk bog-walk requested a review from vnikolova July 25, 2025 04:45
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.

4 participants