Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions advanced_alchemy/repository/_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -1503,15 +1503,15 @@ async def list_and_count(
Returns:
Count of records returned by query, ignoring pagination.
"""
self.count_with_window_function = (
count_with_window_function = (
count_with_window_function if count_with_window_function is not None else self.count_with_window_function
)
self.uniquify = self._get_uniquify(uniquify)
error_messages = self._get_error_messages(
error_messages=error_messages,
default_messages=self.error_messages,
)
if self._dialect.name in {"spanner", "spanner+spanner"} or count_with_window_function:
if self._dialect.name in {"spanner", "spanner+spanner"} or not count_with_window_function:
return await self._list_and_count_basic(
*filters,
auto_expunge=auto_expunge,
Expand Down
4 changes: 2 additions & 2 deletions advanced_alchemy/repository/_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1504,15 +1504,15 @@ def list_and_count(
Returns:
Count of records returned by query, ignoring pagination.
"""
self.count_with_window_function = (
count_with_window_function = (
count_with_window_function if count_with_window_function is not None else self.count_with_window_function
)
self.uniquify = self._get_uniquify(uniquify)
error_messages = self._get_error_messages(
error_messages=error_messages,
default_messages=self.error_messages,
)
if self._dialect.name in {"spanner", "spanner+spanner"} or count_with_window_function:
if self._dialect.name in {"spanner", "spanner+spanner"} or not count_with_window_function:
return self._list_and_count_basic(
*filters,
auto_expunge=auto_expunge,
Expand Down
Loading