mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 21:43:44 +00:00
community[minor]: Add Cassandra ByteStore (#22064)
This commit is contained in:
committed by
GitHub
parent
fea6b99b16
commit
74947ec894
@@ -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
|
||||
|
Reference in New Issue
Block a user