Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit 49549a2

Browse files
paulbissderickr
authored andcommitted
Add KindOfPersistentArray to convertElement
1 parent 9bc3820 commit 49549a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bson.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,18 @@ void VariantToBsonConverter::convertElement(bson_t *bson, const char *key, Varia
111111
convertString(bson, key, v.toString());
112112
break;
113113
case KindOfArray:
114+
case KindOfPersistentArray:
114115
case KindOfObject:
115116
convertDocument(bson, key, v);
116117
break;
118+
case KindOfRef:
119+
convertElement(bson, key, *v.getRefData());
120+
break;
117121
case KindOfResource:
118122
throw MongoDriver::Utils::throwUnexpectedValueException("Got unsupported type 'resource'");
119123
return;
120-
default:
121-
break;
124+
case KindOfClass:
125+
not_reached();
122126
}
123127
}
124128

0 commit comments

Comments
 (0)