Class MongoTypeConverter
java.lang.Object
com.northconcepts.datapipeline.mongodb.MongoTypeConverter
Converts DataPipeline records and values to and from MongoDB BSON documents and values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RecordbsonDocumentToRecord(BsonDocument document) Converts a BSON document to a record with one field per key, converting nested documents and arrays recursively.static ValueNode<?> bsonValueToValueNode(BsonValue bsonValue) Converts a BSON value to a value node (null for a BSON null); documents become records and object IDs become strings.static BsonDocumentrecordToBsonDocument(Record record) Converts a record to a BSON document with one entry per field, converting nested records and arrays recursively.static BsonValuevalueNodeToBsonValue(ValueNode<?> valueNode) Converts a value node to a BSON value (BSON null for null values); throws for big integers, big decimals and UUIDs.
-
Method Details
-
bsonDocumentToRecord
Converts a BSON document to a record with one field per key, converting nested documents and arrays recursively. -
bsonValueToValueNode
Converts a BSON value to a value node (null for a BSON null); documents become records and object IDs become strings. -
recordToBsonDocument
Converts a record to a BSON document with one entry per field, converting nested records and arrays recursively. -
valueNodeToBsonValue
Converts a value node to a BSON value (BSON null for null values); throws for big integers, big decimals and UUIDs.
-