Skip to content

Commit 9c7247d

Browse files
committed
Add GraphQL utilities to Fusion; add utility functions to FusionSQLResult
1 parent 1a9e1cc commit 9c7247d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

singlestoredb/fusion/result.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import operator
55
import re
6+
import sys
67
from typing import Any
78
from typing import Iterable
89
from typing import List
@@ -49,7 +50,13 @@ def gen() -> Iterable[Any]:
4950
return gen()
5051

5152

52-
class FieldIndexDict(dict[str, int]):
53+
if sys.version_info < (3, 9):
54+
StrDict = dict
55+
else:
56+
StrDict = dict[str, int]
57+
58+
59+
class FieldIndexDict(StrDict):
5360
"""Case-insensitive dictionary for column name lookups."""
5461

5562
def __getitem__(self, key: str) -> int:

0 commit comments

Comments
 (0)