carlogtt_python_library.database.database_utils module
This module …
- class carlogtt_python_library.database.database_utils.DatabaseUtils[source]
Bases:
objectA utility class for handling various database-related operations.
- sql_query_reader(file_path: Path | str) str[source]
Reads an SQL query from a file and returns it as a string.
This function simplifies the process of loading SQL queries from files, avoiding the need for manual file handling. It supports both string paths and Pathlib Path objects as input.
- Parameters:
file_path – The path to the SQL file. This can be a string or a Pathlib Path object.
- Returns:
The content of the SQL file as a string.
- carlogtt_python_library.database.database_utils.sql_query_reader(file_path: Path | str) str[source]
Reads an SQL query from a file and returns it as a string.
This function simplifies the process of loading SQL queries from files, avoiding the need for manual file handling. It supports both string paths and Pathlib Path objects as input.
- Parameters:
file_path – The path to the SQL file. This can be a string or a Pathlib Path object.
- Returns:
The content of the SQL file as a string.