Commit Graph

2606 Commits

Author SHA1 Message Date
lovasoa acd9beff21 tmp: switch to sqlx-oldapi with named instance discovery
Fixes https://github.com/sqlpage/SQLPage/issues/1082
2025-11-06 10:00:32 +01:00
Christophe CHAUVET 9b6691ab1e fix ipv6 notation (#1084)
On Mac OS, when localhost:8080 is defined and sqlpage config file, the SocketAddr is resolved with ipv6 address if ip V6 is available on the internal network.

```json
{
  "listen_on": "localhost:8080"
}
```

On the terminal we can Ctrl + Click, but the URL is incorrect (ipV6 notation use bracket)

Actually we have 

```shell
View your website at:
🔗 http://::1:8080
```

Instead of 

```
View your website at:
🔗 http://[::1]:8080
```

Regards,
2025-11-05 22:51:54 +01:00
lovasoa 0d0bd84290 better form documentation 2025-11-05 10:13:02 +01:00
lovasoa 3bd58baf47 update input field docs
fixes https://github.com/sqlpage/SQLPage/discussions/1081
2025-11-04 17:25:21 +01:00
lovasoa c4b398b21c simplify icon _img helper 2025-11-04 16:51:16 +01:00
lovasoa 5c41f16481 Simlplify icon generation in build.rs 2025-11-04 16:46:42 +01:00
lovasoa bb3e75615b build.rs: raise on missing icon id 2025-11-04 16:07:27 +01:00
lovasoa e7726b53fb Refactor icon extraction logic in build.rs to improve performance and memory usage. The download_tabler_icons function now directly processes sprite content in memory, eliminating the need for temporary file storage. Updated extract_icons_from_sprite to handle byte slices instead of strings, enhancing efficiency. 2025-11-04 15:09:28 +01:00
lovasoa df1e6c2184 IconImgHelper: use raw string literals for SVG output 2025-11-04 14:00:02 +01:00
lovasoa 923cb6262f icon image helper: logging and error handling
- Changed debug logs to warning logs for invalid icon names and missing icons in the IconImgHelper.
- Updated the way icons are retrieved from the ICON_MAP for better clarity and performance.
2025-11-04 13:57:36 +01:00
lovasoa 1db0868d77 Update tabler icons to version 3.35 and refactor icon extraction logic for improved performance 2025-11-04 13:51:35 +01:00
lovasoa 52e11df5b6 Implement faster icon loading by inlining icons from the Tabler sprite. The previous method required downloading and parsing a large file, causing delays in icon rendering. Now, icons are generated and cached, improving page load times. Update the icon helper to utilize the new inline method. 2025-11-04 13:38:05 +01:00
lovasoa cec270e1ee In the table component, allow simple objects in custom_actions instead of requiring arrays of objects.
fix https://github.com/sqlpage/SQLPage/issues/1079
2025-11-04 10:32:50 +01:00
lovasoa 26e091a699 fix handling of one-element arrays in doc code generator
see https://github.com/sqlpage/SQLPage/issues/1079
2025-11-04 00:40:23 +01:00
lovasoa 843d9701ce Update dependencies and version for sqlpage to 0.39.1
- Bump versions of several dependencies including `aho-corasick`, `cc`, `clap`, `icu_collections`, and others to their latest releases.
- Update `Cargo.toml` to reflect the new version of sqlpage.
- Ensure compatibility with updated dependencies and improve overall project stability.
2025-11-03 23:56:21 +01:00
Ophir LOJKINE 6b57c4abee Document nginx streaming and compression for sqlpage (#1080)
* Docs: Add Nginx streaming and compression configuration

Co-authored-by: contact <contact@ophir.dev>

* Add NGINX streaming and compression configuration

Co-authored-by: contact <contact@ophir.dev>

* Refactor NGINX proxy settings documentation for clarity

Co-authored-by: contact <contact@ophir.dev>

* Refine NGINX proxy buffering recommendations for streaming

Co-authored-by: contact <contact@ophir.dev>

* Update NGINX proxy buffering settings for improved streaming performance

Revised the documentation to clarify the impact of enabling and disabling proxy buffering in NGINX for SQLPage. Added concise recommendations for handling slow SQL queries and emphasized the importance of adjusting `compress_responses` in `sqlpage.json` when using a reverse proxy.

Co-authored-by: contact <contact@ophir.dev>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-03 23:53:48 +01:00
lovasoa c4ffc0dda3 clippy 2025-11-03 09:53:46 +01:00
lovasoa 44fd2e1cca disable response compression by default 2025-11-02 19:05:41 +01:00
Ophir LOJKINE 73044e7016 nice visual error messages for invalid header values
* Feat: Sanitize header values to prevent injection attacks

Co-authored-by: contact <contact@ophir.dev>

* Refactor sanitize_header_value to use Cow and remove test file

Co-authored-by: contact <contact@ophir.dev>

* refactor header error handling in render.rs

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-10-28 23:50:18 +01:00
lovasoa 2e71702c42 clear json in docs 2025-10-28 22:55:47 +01:00
lovasoa a7f05a4328 formatting 2025-10-28 22:54:53 +01:00
lovasoa ee3bad7eeb Enhance SQLPage documentation for execution process and function handling
- Clarify the execution flow of SQL statements in SQLPage, detailing the decision-making process for handling statements.
- Expand on the role of `sqlpage.*` functions and their execution context.
- Improve explanations and examples to illustrate the differences between local handling and database execution.
- Update section titles for better readability and understanding.
2025-10-28 22:53:23 +01:00
lovasoa 034b8485ca Update SQL documentation to clarify SQLPage's execution process and variable handling
- Refactor content for better clarity on how SQLPage processes SQL statements.
- Introduce sections on static simple selects, variable handling, and the execution of `sqlpage.*` functions.
- Improve examples to illustrate the differences between handled and sent queries.
- Enhance explanations regarding performance and data types in SQLPage.
2025-10-28 22:30:08 +01:00
lovasoa c803214766 Add server timing for parameter binding in query execution
- Recorded server timing for the parameter binding process in the query execution flow.
- Updated tests to verify the inclusion of the new timing event in the server timing header.
2025-10-28 16:18:05 +01:00
lovasoa 1e396ac095 Fix missing server timing in some cases
- Updated response handling to use a builder pattern for better clarity and consistency.
- Enhanced server timing format to include microseconds in the output.
- Added a new test for server timing in redirect responses to ensure proper header inclusion.
2025-10-28 16:08:40 +01:00
lovasoa c38a1098d5 changelog
CI / compile_and_lint (push) Has been cancelled
CI / test (mssql, mssql, mssql://root:Password123!@127.0.0.1/sqlpage) (push) Has been cancelled
CI / test (mysql, mysql, mysql://root:Password123!@127.0.0.1/sqlpage) (push) Has been cancelled
CI / test (postgres, odbc, Driver=PostgreSQL Unicode;Server=127.0.0.1;Port=5432;Database=sqlpage;UID=root;PWD=Password123!, true) (push) Has been cancelled
CI / test (postgres, postgres, postgres://root:Password123!@127.0.0.1/sqlpage) (push) Has been cancelled
CI / windows_test (push) Has been cancelled
CI / docker_build (linux/amd64) (push) Has been cancelled
CI / docker_build (linux/arm/v7) (push) Has been cancelled
CI / docker_build (linux/arm64) (push) Has been cancelled
CI / docker_push (push) Has been cancelled
Create Release / Build sqlpage binaries (macOS & Windows) (.exe, , windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
Create Release / Build sqlpage binaries (macOS & Windows) (odbc-static, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
Create Release / Build sqlpage binaries (Linux) (push) Has been cancelled
Create Release / Build AWS Lambda Serverless zip image (push) Has been cancelled
Create Release / Create Github Release (push) Has been cancelled
Create Release / Publish to crates.io (push) Has been cancelled
v0.39.0
2025-10-28 00:16:15 +01:00
lovasoa abe136d095 fix labels semantics in login component 2025-10-28 00:06:04 +01:00
lovasoa 5ee781cf40 use the login component in the user auth example 2025-10-27 23:36:29 +01:00
lovasoa d542a8ae79 update changelog 2025-10-27 23:23:44 +01:00
lovasoa 5a6192fcfa Merge olivierauverlot/login: combine local defaults with error_message and improved docs 2025-10-27 23:19:21 +01:00
lovasoa cc95ae25de Improve login component documentation and usability
Add complete example with database schema, credential processing, and page protection. Update authentication migration to reference new login component. Enhance login template with default icons and autocomplete attributes. Make validate parameter optional with sensible default.
2025-10-27 23:13:38 +01:00
Olivier Auverlot 3d7f780fbd Documentation improved 2025-10-27 23:13:38 +01:00
Olivier Auverlot 5aa6acb8a0 Documentation improved 2025-10-27 23:13:38 +01:00
Olivier Auverlot 36ab34f827 Fixing a regression with the class attribute. 2025-10-27 23:13:38 +01:00
Olivier Auverlot eb1f43c6e1 username_icon and password_icon attributes 2025-10-27 23:13:38 +01:00
Olivier Auverlot cfea904e5d The login component is an authentication form for users of an application. 2025-10-27 23:13:38 +01:00
lovasoa 722dc740fa add an error_message property to the login component
- Updated SQL queries in `create_session_token.sql` and `login.sql` to use consistent parameter naming conventions.
- Enhanced the login form in `login.sql` to include an error message for failed login attempts.
- Added a new parameter `error_message` in the migration file for better user feedback.
- Modified the Handlebars template to display the error message when applicable, improving user experience during authentication.
2025-10-27 23:07:57 +01:00
lovasoa c28cf2a46d Merge branch 'main' into login 2025-10-27 22:50:56 +01:00
lovasoa 7f7fdd6f57 update deps 2025-10-27 22:49:28 +01:00
lovasoa 74a2c8b1e7 Fix docker image references in README
Update docker image names from sqlpage/SQLPage to lovasoa/sqlpage and update example port mapping to use port 80
2025-10-27 18:14:42 +01:00
Ophir LOJKINE 5f15df3bd0 Merge pull request #1069 from sqlpage/set-odbc-rpath-linux
fix: detect system odbc drivers on debian
2025-10-27 15:24:40 +01:00
lovasoa afde9e1f09 fmt 2025-10-27 15:12:39 +01:00
lovasoa 4dba824727 Enhance ODBC support for Debian-based systems by setting the library search path in build.rs. Update CI configuration to use the correct PostgreSQL driver name. Document changes in CHANGELOG.md. 2025-10-27 14:56:17 +01:00
lovasoa 6f96213269 my odbc-sys patch was merged upstream 2025-10-25 23:53:43 +02:00
lovasoa be5eb4cd06 fix odbc memory corruption
make it harder to miss such issues in the future thanks to malloc instrumentation on ci

fixes https://github.com/pacman82/odbc-api/issues/793
2025-10-25 01:21:13 +02:00
Ophir LOJKINE 8ff9f7ef99 Add image reference to CHANGELOG.md
Added an image to the changelog for visual reference.
2025-10-24 14:50:20 +02:00
Olivier Auverlot ce4ffd3394 Documentation improved 2025-10-24 08:45:57 +02:00
Olivier Auverlot 2570bda545 Documentation improved 2025-10-24 08:29:35 +02:00
Olivier Auverlot cb8fa2dc16 Fixing a regression with the class attribute. 2025-10-24 08:09:32 +02:00
Olivier Auverlot b356cc8904 username_icon and password_icon attributes 2025-10-24 08:04:39 +02:00