Conversation
- Add aloha.db.base_aio module with async PasswordVault - Add aloha.db.postgres_aio using asyncpg - Add aloha.db.mysql_aio using aiomysql - Add aloha.db.redis_aio using redis.asyncio - Add aloha.db.mongo_aio using motor (async pymongo) - Add aloha.db.elasticsearch_aio using AsyncElasticsearch - Add aloha.db.kafka_aio using aiokafka - Add aloha.db.sqlite_aio using aiosqlite - Add aloha.db.duckdb_aio using aioduckdb - Add aloha.db.oracle_aio using oracledb async support - Update pkg/aloha/db/__init__.py to export both sync and async modules - Update pyproject.toml with new 'aio' optional dependencies The async modules maintain similar interfaces to their sync counterparts, allowing minimal code changes when migrating existing applications. Co-authored-by: openhands <openhands@all-hands.dev>
|
|
| "authSource": config.get("authSource", db_name), | ||
| } | ||
| msg = {k: ("***" if k == "password" else v) for k, v in _config.items()} | ||
| LOG.debug(msg) |
|
|
||
| try: | ||
| from .postgres import PostgresOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .mysql import MySqlOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .redis import RedisOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .mongo import MongoOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .elasticsearch import ElasticSearchOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .kafka import KafkaOperator, ConsumedMessage | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .sqlite import SqliteOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .duckdb import DuckOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .oracle import OracledbOperator | ||
| except (ImportError, ModuleNotFoundError): |
|
|
||
| try: | ||
| from .postgres_aio import PostgresOperator as PostgresOperatorAio | ||
| except (ImportError, ModuleNotFoundError): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The async modules maintain similar interfaces to their sync counterparts, allowing minimal code changes when migrating existing applications.