Skip to content

Commit 299b771

Browse files
committed
Data type converter: Remove methods for mutability
1 parent 410c474 commit 299b771

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/crate/client/converter.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@ def set(self, type_: Union[CrateDatatypeIdentifier, int], converter: Callable[[O
112112
type_int = self.get_mapping_key(type_)
113113
self.mappings[type_int] = converter
114114

115-
def remove(self, type_: Union[CrateDatatypeIdentifier, int]) -> None:
116-
type_int = self.get_mapping_key(type_)
117-
self.mappings.pop(type_int, None)
118-
119-
def update(self, mappings: Dict[int, Callable[[Optional[InputVal]], Optional[Any]]]) -> None:
120-
self.mappings.update(mappings)
121-
122115
@staticmethod
123116
def get_mapping_key(type_: Union[CrateDatatypeIdentifier, int]) -> int:
124117
if isinstance(type_, Enum):

src/crate/client/test_cursor.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,6 @@ def test_execute_with_converter(self):
9393
],
9494
])
9595

96-
# When removing the converters, all values are forwarded 1:1.
97-
converter.remove(CrateDatatypeIdentifier.TEXT)
98-
converter.remove(CrateDatatypeIdentifier.IP)
99-
converter.remove(CrateDatatypeIdentifier.TIMESTAMP)
100-
converter.remove(CrateDatatypeIdentifier.BIT)
101-
c.execute("")
102-
result = c.fetchone()
103-
self.assertEqual(result, ['foo', '10.10.10.1', 1658167836758, "B'0110'"])
104-
10596
conn.close()
10697

10798
def test_execute_array_with_converter(self):

0 commit comments

Comments
 (0)