Implement PostgreSQL Installer Module for Rhai #6

Merged
MahmoudEmad merged 2 commits from development_psgl_installer into main 2025-05-09 14:12:57 +00:00
Member

Description

The PostgreSQL installer module for Rhai has been successfully implemented. This module provides functionality to:

  • Install PostgreSQL using nerdctl
  • Create databases
  • Execute SQL scripts
  • Check if PostgreSQL is running

All unit tests and integration tests are passing. The implementation follows the requirements to use SAL as much as possible and nerdctl underneath.

Changes

  • Added PostgresInstallerConfig struct with builder pattern for configuration
  • Implemented install_postgres function to create and start PostgreSQL containers
  • Added create_database function to create new databases
  • Added execute_sql function to run SQL scripts
  • Implemented the is_postgres_running function to check the container status
  • Added comprehensive unit tests for all functionality
  • Created Rhai integration tests with mock implementations
  • Updated documentation with usage examples
### Description The PostgreSQL installer module for Rhai has been successfully implemented. This module provides functionality to: - Install PostgreSQL using nerdctl - Create databases - Execute SQL scripts - Check if PostgreSQL is running All unit tests and integration tests are passing. The implementation follows the requirements to use SAL as much as possible and nerdctl underneath. ### Changes - Added PostgresInstallerConfig struct with builder pattern for configuration - Implemented install_postgres function to create and start PostgreSQL containers - Added create_database function to create new databases - Added execute_sql function to run SQL scripts - Implemented the is_postgres_running function to check the container status - Added comprehensive unit tests for all functionality - Created Rhai integration tests with mock implementations - Updated documentation with usage examples ### Related Issues - #4
MahmoudEmad added 2 commits 2025-05-09 13:15:33 +00:00
docs: Enhance PostgreSQL client module documentation
Some checks failed
Rhai Tests / Run Rhai Tests (push) Has been cancelled
49e85ff8e6
- Add details about the new PostgreSQL installer feature.
- Include prerequisites for installer and basic operations.
- Expand test file descriptions with installer details.
- Add descriptions for installer functions.
- Include example usage for both basic operations and installer.
feat: Enhance PostgreSQL installation with image pulling
Some checks failed
Rhai Tests / Run Rhai Tests (pull_request) Has been cancelled
138dce66fa
- Pull the PostgreSQL image before installation to ensure the latest
  version is used. This improves reliability and reduces the chance of
  using outdated images.  Improves the robustness of the installation
  process.
- Added comprehensive unit tests for `PostgresInstallerConfig`,
  `PostgresInstallerError`, `install_postgres`, `create_database`,
  `execute_sql`, and `is_postgres_running` functions to ensure
  correctness and handle potential errors effectively.  Improves code
  quality and reduces the risk of regressions.
MahmoudEmad changed title from development_psgl_installer to Implement PostgreSQL Installer Module for Rhai 2025-05-09 13:20:12 +00:00
MahmoudEmad merged commit 7828f82f58 into main 2025-05-09 14:12:57 +00:00
MahmoudEmad deleted branch development_psgl_installer 2025-05-09 14:13:02 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: herocode/sal#6
No description provided.