Skip to content

Documentation: add "Extensions to SQL" page #897

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

ppom0
Copy link
Contributor

@ppom0 ppom0 commented Apr 26, 2025

Closes #877

I'm quite happy with this addition! I hope it'll save some time to newcomers.

However, I'm not convinced that the page belongs in 'Your first SQL website' directory.
Would you agree to move it up?

Documenting already took quite some time, and I don't have much energy to update this PR if you have suggestions.
So don't hesitate to rephrase and rework things if you don't like them!

Copy link
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

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

Thank you very much !

I made a few suggestions, feel free to accept or reject them, then I'll merge :)

@ppom0 ppom0 force-pushed the doc-extensions-to-sql branch from 2b1cf1f to bf0336c Compare April 27, 2025 15:07
@ppom0
Copy link
Contributor Author

ppom0 commented Apr 27, 2025

Great additions, I learned new stuff, again :)

What do you think about moving the page to the website's root directory?

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 27, 2025

Yes, I'm ok with moving to the root!

@ppom0 ppom0 force-pushed the doc-extensions-to-sql branch from bf0336c to cd509b2 Compare April 27, 2025 19:52
@ppom0
Copy link
Contributor Author

ppom0 commented Apr 27, 2025

Done :D

@lovasoa lovasoa merged commit 10d4c69 into sqlpage:main Apr 28, 2025
10 checks passed
@lovasoa
Copy link
Collaborator

lovasoa commented Apr 28, 2025

Thank you very much!

@ppom0
Copy link
Contributor Author

ppom0 commented Apr 28, 2025

Just found out about the $id::integer syntax by reading this code.

Should it be added as well, or is it plain SQL? I don't know anymore 😅

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 28, 2025

The ::type syntax is specific to postgres: https://neon.tech/postgresql/postgresql-tutorial/postgresql-cast#postgresql-cast-operator

If you want to learn more about sqlpage internals, this ai-generated wiki is quite helpful: https://deepwiki.com/sqlpage/SQLPage

@ppom0
Copy link
Contributor Author

ppom0 commented Apr 28, 2025

Ok, I wondered because I saw this syntax in the following example, which is flagged as SQLite on the website.
Maybe its db engine category is a typo then?

https://github.com/sqlpage/SQLPage/blob/main/examples/corporate-conundrum/wait.sql

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 28, 2025

We have a special compatibility tweak, but it comes with a warning: https://github.com/sqlpage/SQLPage/blob/main/src/webserver/database/sql.rs#L910-L917

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 28, 2025

The sqlite examples that rely on it should be updated

ppom0 pushed a commit to ppom0/SQLPage that referenced this pull request Apr 29, 2025
lovasoa pushed a commit that referenced this pull request Apr 29, 2025
According to discussion here
#897 (comment)

Co-authored-by: ppom <>
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.

Questions on the SET command
2 participants