SQLpage icon indicating copy to clipboard operation
SQLpage copied to clipboard

Documentation: add "Extensions to SQL" page

Open ppom0 opened this issue 7 months ago • 1 comments

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!

ppom0 avatar Apr 26 '25 23:04 ppom0

Great additions, I learned new stuff, again :)

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

ppom0 avatar Apr 27 '25 15:04 ppom0

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

lovasoa avatar Apr 27 '25 18:04 lovasoa

Done :D

ppom0 avatar Apr 27 '25 19:04 ppom0

Thank you very much!

lovasoa avatar Apr 28 '25 07:04 lovasoa

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 :sweat_smile:

ppom0 avatar Apr 28 '25 14:04 ppom0

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

lovasoa avatar Apr 28 '25 15:04 lovasoa

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

ppom0 avatar Apr 28 '25 15:04 ppom0

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 avatar Apr 28 '25 16:04 lovasoa

The sqlite examples that rely on it should be updated

lovasoa avatar Apr 28 '25 16:04 lovasoa