Skip to content

Fix incorrect type stubs for Query class. Add test coverage for return value of Query API methods #792

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

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
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
10 changes: 6 additions & 4 deletions aerospike-stubs/aerospike.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ class Client:
def index_cdt_create(self, *args, **kwargs) -> Any: ...
def index_geo2dsphere_create(self, ns: str, set: str, bin: str, name: str, policy: dict = ...) -> None: ...
def index_integer_create(self, ns: str, set: str, bin: str, name: str, policy: dict = ...) -> None: ...
def index_expr_create(self, ns: str, set: str, index_type: int, index_datatype: int, expressions: list, name: str, policy: dict = ...) -> None: ...
def index_list_create(self, ns: str, set: str, bin: str, index_datatype, name: str, policy: dict = ...) -> None: ...
def index_map_keys_create(self, ns: str, set: str, bin: str, index_datatype, name: str, policy: dict = ...) -> None: ...
def index_map_values_create(self, ns: str, set: str, bin: str, index_datatype, name: str, policy: dict = ...) -> None: ...
Expand Down Expand Up @@ -421,17 +422,18 @@ class Query:
records_per_second: int
ttl: int
def __init__(self, *args, **kwargs) -> None: ...
def add_ops(self, ops: list) -> None: ...
def apply(self, module: str, function: str, arguments: list = ...) -> Any: ...
def add_ops(self, ops: list) -> Query: ...
def apply(self, module: str, function: str, arguments: list = ...) -> Query: ...
def execute_background(self, policy: dict = ...) -> int: ...
def foreach(self, callback: Callable, policy: dict = ..., options: dict = ...) -> None: ...
def get_partitions_status(self) -> tuple: ...
def is_done(self) -> bool: ...
def paginate(self) -> None: ...
def results(self, policy: dict = ..., options: dict = ...) -> list: ...
# TODO: this isn't an infinite list of bins
def select(self, *args, **kwargs) -> None: ...
def where(self, predicate: tuple, ctx: list = ...) -> None: ...
def select(self, *args, **kwargs) -> Query: ...
def where(self, predicate: tuple, ctx: list = ...) -> Query: ...
def where_with_expr(self, predicate: tuple) -> Query: ...

class Scan:
ttl: int
Expand Down
Loading