postgres added

This commit is contained in:
2025-01-13 20:55:05 +03:00
parent 8b263a3a5c
commit 3bc0146767
15 changed files with 1120 additions and 37 deletions

View File

@@ -69,7 +69,9 @@ class RedisActions:
return arrow.now().shift(seconds=expiry_time).format(MainConfig.DATETIME_FORMAT)
@classmethod
def get_json(cls, list_keys: List[Union[str, bytes]]) -> RedisResponse:
def get_json(
cls, list_keys: List[Union[Optional[str], Optional[bytes]]]
) -> RedisResponse:
"""Get JSON values from Redis using pattern matching."""
try:
list_of_rows = []
@@ -80,8 +82,10 @@ class RedisActions:
redis_row = RedisRow()
redis_row.set_key(key=row)
redis_row.expires_at = cls.resolve_expires_at(redis_row=redis_row)
redis_row.feed(redis_cli.get(redis_row.redis_key))
redis_value = redis_cli.get(redis_row.redis_key)
redis_row.feed(redis_value)
list_of_rows.append(redis_row)
return RedisResponse(
status=True,
message="Value is get successfully.",