File tree 3 files changed +21
-0
lines changed
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 1
1
## 2.2.0 ##
2
2
3
3
* allow to refer endpoints by node id
4
+ * support null type in queries
4
5
5
6
## 2.1.0 ##
6
7
Original file line number Diff line number Diff line change @@ -256,10 +256,15 @@ def _primitive_type_to_native(type_pb):
256
256
return _primitive_type_by_id .get (type_pb .type_id )
257
257
258
258
259
+ def _null_type_factory (type_pb ):
260
+ return types .NullType ()
261
+
262
+
259
263
_type_to_native_map = {
260
264
"optional_type" : _optional_type_to_native ,
261
265
"type_id" : _primitive_type_to_native ,
262
266
"decimal_type" : _decimal_type_to_native ,
267
+ "null_type" : _null_type_factory ,
263
268
}
264
269
265
270
Original file line number Diff line number Diff line change 7
7
from datetime import date , datetime
8
8
import uuid
9
9
import struct
10
+ from google .protobuf import struct_pb2
10
11
11
12
12
13
if six .PY3 :
@@ -214,6 +215,20 @@ def __str__(self):
214
215
return "Decimal(%d,%d)" % (self ._precision , self ._scale )
215
216
216
217
218
+ class NullType (AbstractTypeBuilder ):
219
+ __slots__ = ("_repr" , "_proto" )
220
+
221
+ def __init__ (self ):
222
+ self ._proto = _apis .ydb_value .Type (null_type = struct_pb2 .NULL_VALUE )
223
+
224
+ @property
225
+ def proto (self ):
226
+ return self ._proto
227
+
228
+ def __str__ (self ):
229
+ return "NullType"
230
+
231
+
217
232
class OptionalType (AbstractTypeBuilder ):
218
233
__slots__ = ("_repr" , "_proto" , "_item" )
219
234
You can’t perform that action at this time.
0 commit comments