diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 119ae183..c5411e59 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -1,3 +1,4 @@ +# .devcontainer docker-compose configuration version: '3.8' services: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f78c94c..028ed468 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Latest Changes +### Improving SQLAlchemy Queries and Improved Documentation ([v2025.4.17.1](https://github.com/devsetgo/devsetgo_lib/releases/tag/v2025.4.17.1)) + +![DSG Logo](https://raw.githubusercontent.com/devsetgo/devsetgo_lib/refs/heads/main/images/devsetgo_lib_logo_white_bg.svg) +Read the Full Documentation [here](https://devsetgo.github.io/devsetgo_lib/). +#### What's Changed +* fixing sonar issue (#494) @devsetgo +* updating release drafter (#493) @devsetgo +* Improving Examples (#492) @devsetgo +* Fix of issue with distinct queries in read queries (#491) @devsetgo +* updating footer (#490) @devsetgo +* adding raw link to release drafter (#489) @devsetgo +* Improving documentation (#488) @devsetgo +* adding 3.13 testing (#486) @devsetgo + +Built to help reduce copy/paste from multiple projects and uses calendar versioning (year.month.day.build) from [BumpCalver](https://github.com/devsetgo/bumpcalver). + + +Published Date: 2025 April 17, 15:47 + ### New Functions and Updated Documentation ([v2025.4.5.1](https://github.com/devsetgo/devsetgo_lib/releases/tag/v2025.4.5.1)) #### What's Changed diff --git a/coverage.xml b/coverage.xml index 5ef22829..2ec5a7e8 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -68,15 +68,15 @@ - - + + - - - - - - + + + + + + @@ -123,7 +123,7 @@ - + @@ -134,27 +134,27 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + @@ -169,22 +169,22 @@ - - - - - - - - - + + + + + + + + + - - + + @@ -193,264 +193,264 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - + @@ -461,43 +461,43 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -516,7 +516,7 @@ - + @@ -530,184 +530,184 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - + @@ -719,65 +719,65 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -787,7 +787,7 @@ - + @@ -799,50 +799,50 @@ - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - + @@ -856,68 +856,68 @@ - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + @@ -929,7 +929,7 @@ - + @@ -939,22 +939,22 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -962,8 +962,8 @@ - - + + @@ -979,7 +979,7 @@ - + @@ -1001,33 +1001,33 @@ - - + + - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -1639,7 +1639,7 @@ - + @@ -1701,117 +1701,117 @@ - + - - - - - - - - - + + + + + + + + + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + - + @@ -1820,22 +1820,22 @@ - - - + + + - - + + - - - + + + - + @@ -1843,40 +1843,40 @@ - - + + - - + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - + - + @@ -1885,38 +1885,38 @@ - - - - + + + + - - + + - - - - + + + + - - + + - - - - + + + + - - - + + + - + @@ -1924,21 +1924,21 @@ - - - - + + + + - - - - - + + + + + - + @@ -1948,58 +1948,58 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - + @@ -2009,44 +2009,44 @@ - - - + + + - + - - - - - - - - + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - + @@ -2056,24 +2056,24 @@ - - + + - + - - + + - - + + - - + + - + @@ -2087,45 +2087,45 @@ - - + + - - - + + + - - - - - + + + + + - + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - + + + - + @@ -2134,54 +2134,54 @@ - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - - - - + + + + + + + - + @@ -2189,28 +2189,28 @@ - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - + @@ -2220,43 +2220,43 @@ - - - + + + - + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - + - + @@ -2270,79 +2270,79 @@ - - - - - - - - - + + + + + + + + + - + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - + - + @@ -2355,24 +2355,24 @@ - - - - - + + + + + - + - - - - + + + + - - + + - + @@ -2384,51 +2384,51 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + - + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - + @@ -2439,26 +2439,26 @@ - - + + - + - - - + + + - - - + + + - - - - + + + + - + @@ -2471,34 +2471,34 @@ - - - + + + - + - - + + - - + + - - - - - + + + + + - + - + @@ -2521,493 +2521,493 @@ - - + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - + + + - - + + - - - - - - + + + + + + - + @@ -3023,31 +3023,31 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + @@ -3055,34 +3055,34 @@ - - - - + + + + - - - + + + - - - - + + + + - - - + + + - + - + @@ -3094,45 +3094,45 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - + @@ -3146,27 +3146,27 @@ - - - + + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + diff --git a/docs/database/database_configuration.md b/docs/database/database_configuration.md index a673860f..14831850 100644 --- a/docs/database/database_configuration.md +++ b/docs/database/database_configuration.md @@ -1,4 +1,15 @@ # Reference +## Supported Databases + +| Database | Library (with link) | Supported Database Versions (via library) | +|---------------|-------------------------------------------------------------------------------------|-----------------------------------------------| +| PostgreSQL | [asyncpg](https://pypi.org/project/asyncpg/) `>=0.21.0`
[SQLAlchemy](https://pypi.org/project/SQLAlchemy/) `>=2.0.10,<2.0.99` | asyncpg supports PostgreSQL 9.2+ | +| SQLite | [aiosqlite](https://pypi.org/project/aiosqlite/) `>=0.17.0`
[SQLAlchemy](https://pypi.org/project/SQLAlchemy/) `>=2.0.10,<2.0.99` | SQLite 3.x | +| Oracle | [oracledb](https://pypi.org/project/oracledb/) `>=2.4.1,<2.5.0`
[SQLAlchemy](https://pypi.org/project/SQLAlchemy/) `>=2.0.10,<2.0.99` | Oracle Database 11.2+ | +| MS SQL Server | [aioodbc](https://pypi.org/project/aioodbc/) `>=0.4.1`
[SQLAlchemy](https://pypi.org/project/SQLAlchemy/) `>=2.0.10,<2.0.99` | SQL Server 2008+ (via ODBC driver) | +| CockroachDB | [sqlalchemy-cockroachdb](https://pypi.org/project/sqlalchemy-cockroachdb/) `<2.0.2`
[SQLAlchemy](https://pypi.org/project/SQLAlchemy/) `>=2.0.10,<2.0.99`
[asyncpg](https://pypi.org/project/asyncpg/) `>=0.21.0` | CockroachDB v19.2+ | +| MySQL | [asyncmy](https://pypi.org/project/asyncmy/) `>=0.2.10`
[SQLAlchemy](https://pypi.org/project/SQLAlchemy/) `>=2.0.10,<2.0.99` | MySQL 5.7+, MariaDB 10.2+ | + ::: dsg_lib.async_database_functions.database_config handler: python diff --git a/docs/release-notes.md b/docs/release-notes.md index 5f78c94c..028ed468 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Latest Changes +### Improving SQLAlchemy Queries and Improved Documentation ([v2025.4.17.1](https://github.com/devsetgo/devsetgo_lib/releases/tag/v2025.4.17.1)) + +![DSG Logo](https://raw.githubusercontent.com/devsetgo/devsetgo_lib/refs/heads/main/images/devsetgo_lib_logo_white_bg.svg) +Read the Full Documentation [here](https://devsetgo.github.io/devsetgo_lib/). +#### What's Changed +* fixing sonar issue (#494) @devsetgo +* updating release drafter (#493) @devsetgo +* Improving Examples (#492) @devsetgo +* Fix of issue with distinct queries in read queries (#491) @devsetgo +* updating footer (#490) @devsetgo +* adding raw link to release drafter (#489) @devsetgo +* Improving documentation (#488) @devsetgo +* adding 3.13 testing (#486) @devsetgo + +Built to help reduce copy/paste from multiple projects and uses calendar versioning (year.month.day.build) from [BumpCalver](https://github.com/devsetgo/bumpcalver). + + +Published Date: 2025 April 17, 15:47 + ### New Functions and Updated Documentation ([v2025.4.5.1](https://github.com/devsetgo/devsetgo_lib/releases/tag/v2025.4.5.1)) #### What's Changed diff --git a/dsg_lib/async_database_functions/database_config.py b/dsg_lib/async_database_functions/database_config.py index 3eacf072..c919dadd 100644 --- a/dsg_lib/async_database_functions/database_config.py +++ b/dsg_lib/async_database_functions/database_config.py @@ -131,6 +131,42 @@ class DBConfig: "pool_recycle", "pool_timeout", }, + "cockroachdb": { # experimental support for CockroachDB + "echo", + "future", + "pool_pre_ping", + "pool_size", + "max_overflow", + "pool_recycle", + "pool_timeout", + }, + "mysql": { # experimental support for MySQL + "echo", + "future", + "pool_pre_ping", + "pool_size", + "max_overflow", + "pool_recycle", + "pool_timeout", + }, + "mssql": { # experimental support for Microsoft SQL Server + "echo", + "future", + "pool_pre_ping", + "pool_size", + "max_overflow", + "pool_recycle", + "pool_timeout", + }, + "oracle": { # experimental support for Oracle + "echo", + "future", + "pool_pre_ping", + "pool_size", + "max_overflow", + "pool_recycle", + "pool_timeout", + }, # Add other engines here... } diff --git a/pyproject.toml b/pyproject.toml index 544fb97f..85dc0bef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,8 +32,10 @@ postgres = [ "asyncpg>=0.21.0", "sqlalchemy>=2.0.10,<2.0.99",] sqlite = [ "aiosqlite>=0.17.0", "sqlalchemy>=2.0.10,<2.0.99",] oracle = [ "oracledb>=2.4.1,<2.5.0", "sqlalchemy>=2.0.10,<2.0.99",] mssql = [ "aioodbc>=0.4.1", "sqlalchemy>=2.0.10,<2.0.99",] +cockroachdb = [ "sqlalchemy-cockroachdb<2.0.2", "sqlalchemy>=2.0.10,<2.0.99", "asyncpg>=0.21.0",] +mysql = [ "asyncmy>=0.2.10", "sqlalchemy>=2.0.10,<2.0.99",] fastapi = [ "fastapi>=0.100.0", "pydantic[email]>=2.0",] -all = [ "asyncpg>=0.21.0", "sqlalchemy>=2.0.10,<2.0.99", "aiosqlite>=0.17.0", "oracledb>=2.4.1,<2.5.0", "fastapi>=0.100.0", "pydantic[email]>=2.0", "aioodbc>=0.4.1",] +all = [ "asyncpg>=0.21.0", "sqlalchemy>=2.0.10,<2.0.99", "aiosqlite>=0.17.0", "oracledb>=2.4.1,<2.5.0", "fastapi>=0.100.0", "pydantic[email]>=2.0", "aioodbc>=0.4.1", "sqlalchemy-cockroachdb<2.0.0", "asyncmy>=0.2.10",] [project.scripts] diff --git a/report.xml b/report.xml index 505cf43f..8b25e30c 100644 --- a/report.xml +++ b/report.xml @@ -1 +1 @@ - + diff --git a/tests/test_file_functions.py b/tests/test_common_functions/test_file_functions/test_file_functions.py similarity index 100% rename from tests/test_file_functions.py rename to tests/test_common_functions/test_file_functions/test_file_functions.py