Class BsonUtils
- java.lang.Object
-
- org.apache.flink.cdc.connectors.mongodb.source.utils.BsonUtils
-
public class BsonUtils extends Object
Utility class to dealBsonValues.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcompareBsonArray(org.bson.BsonArray a1, org.bson.BsonArray a2)static intcompareBsonBinary(org.bson.BsonBinary b1, org.bson.BsonBinary b2)static intcompareBsonDocument(org.bson.BsonDocument d1, org.bson.BsonDocument d2)static intcompareBsonValue(org.bson.BsonValue o1, org.bson.BsonValue o2)static intcompareJavascriptWithScope(org.bson.BsonJavaScriptWithScope c1, org.bson.BsonJavaScriptWithScope c2)static booleanisArray(org.bson.BsonValue bsonValue)static booleanisBsonNumber(org.bson.BsonValue bsonValue)static booleanisMaxKey(org.bson.BsonValue bsonValue)static booleanisMinKey(org.bson.BsonValue bsonValue)static booleanisNull(org.bson.BsonValue bsonValue)static org.bson.BsonDocumenttoBsonDocument(org.bson.BsonValue bsonValue)static org.bson.types.Decimal128toDecimal128(org.bson.BsonValue bsonValue)static StringtoJavaString(org.bson.BsonValue bsonValue)static inttypeOrder(org.bson.BsonValue bsonValue)
-
-
-
Method Detail
-
compareBsonValue
public static int compareBsonValue(org.bson.BsonValue o1, org.bson.BsonValue o2)
-
compareBsonDocument
public static int compareBsonDocument(org.bson.BsonDocument d1, org.bson.BsonDocument d2)
-
compareBsonArray
public static int compareBsonArray(org.bson.BsonArray a1, org.bson.BsonArray a2)
-
compareBsonBinary
public static int compareBsonBinary(org.bson.BsonBinary b1, org.bson.BsonBinary b2)
-
compareJavascriptWithScope
public static int compareJavascriptWithScope(org.bson.BsonJavaScriptWithScope c1, org.bson.BsonJavaScriptWithScope c2)
-
isNull
public static boolean isNull(org.bson.BsonValue bsonValue)
-
isBsonNumber
public static boolean isBsonNumber(org.bson.BsonValue bsonValue)
-
isArray
public static boolean isArray(org.bson.BsonValue bsonValue)
-
isMinKey
public static boolean isMinKey(org.bson.BsonValue bsonValue)
-
isMaxKey
public static boolean isMaxKey(org.bson.BsonValue bsonValue)
-
toDecimal128
public static org.bson.types.Decimal128 toDecimal128(org.bson.BsonValue bsonValue)
-
toJavaString
public static String toJavaString(org.bson.BsonValue bsonValue)
-
toBsonDocument
public static org.bson.BsonDocument toBsonDocument(org.bson.BsonValue bsonValue)
-
typeOrder
public static int typeOrder(org.bson.BsonValue bsonValue)
-
-