Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sl remove "idiomatic" from master #220

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 0 additions & 135 deletions astrapy/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
DEFAULT_JSON_API_PATH,
DEFAULT_JSON_API_VERSION,
DEFAULT_KEYSPACE_NAME,
DEFAULT_NOT_IMPLEMENTED_MESSAGE,
MAX_INSERT_NUM_DOCUMENTS,
)
from astrapy.utils import (
Expand Down Expand Up @@ -1056,58 +1055,6 @@ def upsert_many(

return results

# Mongodb calls not supported by the API
def find_raw_batches(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def aggregate(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def aggregate_raw_batches(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def watch(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def rename(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def create_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def create_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def drop_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def drop_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def list_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def index_information(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def create_search_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def create_search_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def drop_search_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def list_search_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def update_search_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def distinct(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)


class AsyncAstraDBCollection:
def __init__(
Expand Down Expand Up @@ -2044,58 +1991,6 @@ async def concurrent_upsert(doc: API_DOC) -> str:
raise result
return results # type: ignore

# Mongodb calls not supported by the API
async def find_raw_batches(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def aggregate(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def aggregate_raw_batches(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def watch(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def rename(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def create_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def create_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def drop_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def drop_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def list_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def index_information(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def create_search_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def create_search_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def drop_search_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def list_search_indexes(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def update_search_index(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

async def distinct(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)


class AstraDB:
# Initialize the shared httpx client as a class attribute
Expand Down Expand Up @@ -2373,21 +2268,6 @@ def truncate_collection(self, collection_name: str) -> AstraDBCollection:
# return the collection itself
return collection

def aggregate(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def cursor_command(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def dereference(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def watch(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def validate_collection(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)


class AsyncAstraDB:
def __init__(
Expand Down Expand Up @@ -2676,18 +2556,3 @@ async def truncate_collection(self, collection_name: str) -> AsyncAstraDBCollect

# return the collection itself
return collection

def aggregate(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def cursor_command(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def dereference(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def watch(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)

def validate_collection(self) -> None:
raise NotImplementedError(DEFAULT_NOT_IMPLEMENTED_MESSAGE)
1 change: 0 additions & 1 deletion astrapy/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
DEFAULT_AUTH_HEADER = "Token"
DEFAULT_KEYSPACE_NAME = "default_keyspace"
DEFAULT_REGION = "us-east1"
DEFAULT_NOT_IMPLEMENTED_MESSAGE = "This operation is not yet implemented."

MAX_INSERT_NUM_DOCUMENTS = 20
Loading
Loading