Commit Graph

2612 Commits

Author SHA1 Message Date
lovasoa f7a09e36c4 Enhance SQL performance guidance in migration script
- Added detailed recommendations for using primary and foreign keys, including examples for product and sales tables.
- Introduced best practices for indexing, query performance debugging, and database maintenance commands.
- Included advice on lazy loading and reducing the number of queries to optimize SQLPage applications.
2025-11-08 00:28:34 +01:00
Ophir LOJKINE aab67ce9d2 Fix github pr ci cache warnings (#1086)
* feat: Add shared-key to cargo cache action

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

* Refactor: Use matrix-specific cache key in CI

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

* feat: Cache Rust build artifacts only on main branch

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

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-07 22:02:36 +01:00
lovasoa 92cd4deedc Update dependencies in Cargo.lock to latest versions 2025-11-07 22:02:36 +01:00
Christophe CHAUVET f551f1900c 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-07 22:02:36 +01:00
lovasoa 98347a052a better form documentation 2025-11-07 22:02:36 +01:00
lovasoa a4e76fd783 update input field docs
fixes https://github.com/sqlpage/SQLPage/discussions/1081
2025-11-07 22:02:36 +01:00
lovasoa f6c1c6fa9b simplify icon _img helper 2025-11-07 22:02:36 +01:00
lovasoa 1e66ea559e Simlplify icon generation in build.rs 2025-11-07 22:02:36 +01:00
lovasoa a02031f2b8 build.rs: raise on missing icon id 2025-11-07 22:02:36 +01:00
lovasoa 8836c86f77 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-07 22:02:36 +01:00
lovasoa 79fff9b460 IconImgHelper: use raw string literals for SVG output 2025-11-07 22:02:35 +01:00
lovasoa 96a0a791c1 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-07 22:02:35 +01:00
lovasoa 9fcd5f7d75 Update tabler icons to version 3.35 and refactor icon extraction logic for improved performance 2025-11-07 22:02:35 +01:00
lovasoa 7818619939 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-07 22:02:35 +01:00
lovasoa 6130c5bc85 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-07 22:02:35 +01:00
lovasoa cbb5de5129 fix handling of one-element arrays in doc code generator
see https://github.com/sqlpage/SQLPage/issues/1079
2025-11-07 22:02:35 +01:00
lovasoa ab27663298 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-07 22:02:35 +01:00
Ophir LOJKINE de2bcaeb3d 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-07 22:02:35 +01:00
lovasoa 70a261239f Add materialized views section to performance guide
- Introduced a new section on materialized views, explaining their purpose and benefits for optimizing analytical queries.
- Added an example SQL statement for creating a materialized view to compute total sales per store.
- Provided guidance on refreshing materialized views manually or via external scripts.
2025-11-04 09:22:10 +01:00
lovasoa cb2df47bd1 Merge branch 'main' into perf-guide 2025-11-03 09:57:25 +01:00
lovasoa c4ffc0dda3 clippy 2025-11-03 09:53:46 +01:00
lovasoa fb8f8e2419 update guide 2025-11-02 19:37:03 +01:00
lovasoa 44fd2e1cca disable response compression by default 2025-11-02 19:05:41 +01:00
lovasoa b9ddb8da65 wip: perf guide 2025-10-31 23:26:31 +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