Skip to content

Commit 0f431d6

Browse files
committed
DOCS-808 port MongoDB Extended JSON add bsontype directive
1 parent d8ea4a0 commit 0f431d6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/mongodb_domain.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ def get_index_text(self, objectname, name_obj):
136136
return _('%s (JavaScript shell macro)') % (name)
137137
elif self.objtype == 'limit':
138138
return _('%s (MongoDB system limit)') % (name)
139+
elif self.objtype == 'bsontype':
140+
return _('%s (BSON type)') % (name)
139141
return ''
140142

141143
def run(self):
@@ -213,6 +215,7 @@ class MongoDBDomain(Domain):
213215
'error': ObjType(l_('error'), 'error'),
214216
'macro': ObjType(l_('macro'), 'macro'),
215217
'limit': ObjType(l_('limit'), 'limit'),
218+
'bsontype': ObjType(l_('bsontype'), 'bsontype'),
216219
}
217220

218221
directives = {
@@ -230,6 +233,7 @@ class MongoDBDomain(Domain):
230233
'error': MongoDBObject,
231234
'macro': MongoDBObject,
232235
'limit': MongoDBObject,
236+
'bsontype': MongoDBObject,
233237
}
234238
roles = {
235239
'dbcommand': MongoDBXRefRole(),
@@ -246,6 +250,7 @@ class MongoDBDomain(Domain):
246250
'error': MongoDBXRefRole(),
247251
'macro': MongoDBXRefRole(),
248252
'limit': MongoDBXRefRole(),
253+
'bsontype': MongoDBXRefRole(),
249254
}
250255
initial_data = {
251256
'objects': {}, # fullname -> docname, objtype

0 commit comments

Comments
 (0)