community[minor]: Add Cassandra ByteStore (#22064)

This commit is contained in:
Christophe Bornet
2024-05-23 16:46:23 +02:00
committed by GitHub
parent fea6b99b16
commit 74947ec894
4 changed files with 350 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ from enum import Enum
from typing import TYPE_CHECKING, Any, Callable
if TYPE_CHECKING:
from cassandra.cluster import ResponseFuture
from cassandra.cluster import ResponseFuture, Session
async def wrapped_response_future(
@@ -35,6 +35,10 @@ async def wrapped_response_future(
return await asyncio_future
async def aexecute_cql(session: Session, query: str, **kwargs: Any) -> Any:
return await wrapped_response_future(session.execute_async, query, **kwargs)
class SetupMode(Enum):
SYNC = 1
ASYNC = 2