Skip to content

Commit 1e278bc

Browse files
committed
RDBC-700 Misc
1 parent 215f965 commit 1e278bc

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ravendb/documents/session/tokens/query_tokens/definitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def write_to(self, writer: List[str]):
368368

369369

370370
class GroupBySumToken(QueryToken):
371-
def __init__(self, field_name: str, praojected_name: str):
371+
def __init__(self, field_name: str, projected_name: str):
372372
if field_name is None:
373373
raise ValueError("field_name cannot be None")
374374

ravendb/documents/session/tokens/query_tokens/query_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def write_to(self, writer: List[str]) -> None:
1010
raise NotImplementedError("Error : write_to is not implemented")
1111

1212
def write_field(self, writer: List[str], field: str):
13-
key_word = field in self.RQL_KEYWORDS
13+
key_word = self.is_keyword(field)
1414
if key_word:
1515
writer.append("'")
1616
writer.append(field)

ravendb/documents/subscriptions/document_subscriptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from typing import Optional, Type, TypeVar, Dict, List, TYPE_CHECKING
33

44
from ravendb.documents.operations.ongoing_tasks import ToggleOngoingTaskStateOperation, OngoingTaskType
5+
from ravendb.documents.session.tokens.query_tokens.query_token import QueryToken
56
from ravendb.documents.session.utils.includes_util import IncludesUtil
67
from ravendb.documents.commands.subscriptions import (
78
CreateSubscriptionCommand,
@@ -111,7 +112,7 @@ def ensure_criteria(self, criteria: SubscriptionCreationOptions, object_type: Ty
111112
query_builder.append(escaped_include)
112113
query_builder.append("'")
113114
else:
114-
query_builder.append(include)
115+
query_builder.append(f"'{include}'" if QueryToken.is_keyword(include) else include)
115116

116117
number_of_includes_added += 1
117118
# todo: uncomment on Counters and TimeSeries development

0 commit comments

Comments
 (0)