Skip to content

Commit 573f976

Browse files
author
Peng Ren
committed
Fix type code issue
1 parent fb25672 commit 573f976

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pymongosql/sql/projection_functions.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
3232

3333
def get_type_code(self) -> str:
3434
"""Return type code for result description"""
35-
return "str"
35+
return str
3636

3737

3838
class DateFunction(ProjectionFunction):
@@ -101,7 +101,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
101101
return value
102102

103103
def get_type_code(self) -> str:
104-
return "datetime"
104+
return datetime
105105

106106

107107
class TimestampFunction(ProjectionFunction):
@@ -180,7 +180,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
180180
return value
181181

182182
def get_type_code(self) -> str:
183-
return "datetime"
183+
return datetime
184184

185185

186186
class DatetimeFunction(ProjectionFunction):
@@ -237,7 +237,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
237237
return value
238238

239239
def get_type_code(self) -> str:
240-
return "datetime"
240+
return datetime
241241

242242

243243
class NumberFunction(ProjectionFunction):
@@ -274,7 +274,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
274274
return value
275275

276276
def get_type_code(self) -> str:
277-
return "float"
277+
return float
278278

279279

280280
class BoolFunction(ProjectionFunction):
@@ -311,7 +311,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
311311
return bool(value)
312312

313313
def get_type_code(self) -> str:
314-
return "bool"
314+
return bool
315315

316316

317317
class SubstrFunction(ProjectionFunction):
@@ -362,7 +362,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
362362
return value
363363

364364
def get_type_code(self) -> str:
365-
return "str"
365+
return str
366366

367367

368368
class SubstringFunction(SubstrFunction):
@@ -418,7 +418,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
418418
return value
419419

420420
def get_type_code(self) -> str:
421-
return "str"
421+
return str
422422

423423

424424
class TrimFunction(ProjectionFunction):
@@ -445,7 +445,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
445445
return value.strip()
446446

447447
def get_type_code(self) -> str:
448-
return "str"
448+
return str
449449

450450

451451
class UpperFunction(ProjectionFunction):
@@ -472,7 +472,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
472472
return value.upper()
473473

474474
def get_type_code(self) -> str:
475-
return "str"
475+
return str
476476

477477

478478
class LowerFunction(ProjectionFunction):
@@ -499,7 +499,7 @@ def convert_value(self, value: Any, format_param: Optional[str] = None) -> Any:
499499
return value.lower()
500500

501501
def get_type_code(self) -> str:
502-
return "str"
502+
return str
503503

504504

505505
class ProjectionFunctionRegistry:

0 commit comments

Comments
 (0)