File tree 4 files changed +17
-0
lines changed
4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ export class Binary extends BSONValue {
56
56
static readonly SUBTYPE_ENCRYPTED = 6 ;
57
57
/** Column BSON type */
58
58
static readonly SUBTYPE_COLUMN = 7 ;
59
+ /** Sensitive BSON type */
60
+ static readonly SUBTYPE_SENSITIVE = 8 ;
59
61
/** User BSON type */
60
62
static readonly SUBTYPE_USER_DEFINED = 128 ;
61
63
Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ export const BSON_BINARY_SUBTYPE_ENCRYPTED = 6;
109
109
/** Column BSON type @internal */
110
110
export const BSON_BINARY_SUBTYPE_COLUMN = 7 ;
111
111
112
+ /** Sensitive BSON type @internal */
113
+ export const BSON_BINARY_SUBTYPE_SENSITIVE = 8 ;
114
+
112
115
/** Binary User Defined Type @internal */
113
116
export const BSON_BINARY_SUBTYPE_USER_DEFINED = 128 ;
114
117
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ describe('BSON Constants', () => {
19
19
| "\x04" UUID
20
20
| "\x05" MD5
21
21
| "\x06" Encrypted BSON value
22
+ | "\x07" Column BSON value
23
+ | "\x08" Sensitive BSON value
22
24
| "\x80" User defined
23
25
*/
24
26
it ( 'Default should be 0' , ( ) => {
@@ -55,6 +57,11 @@ describe('BSON Constants', () => {
55
57
expect ( constants . BSON_BINARY_SUBTYPE_COLUMN ) . to . equal ( 7 ) ;
56
58
expect ( Binary . SUBTYPE_COLUMN ) . to . equal ( 7 ) ;
57
59
} ) ;
60
+
61
+ it ( 'Sensitive should be 8' , ( ) => {
62
+ expect ( constants . BSON_BINARY_SUBTYPE_SENSITIVE ) . to . equal ( 8 ) ;
63
+ expect ( Binary . SUBTYPE_SENSITIVE ) . to . equal ( 8 ) ;
64
+ } ) ;
58
65
} ) ;
59
66
context ( 'BSON Type indicators' , ( ) => {
60
67
/*
Original file line number Diff line number Diff line change 55
55
"canonical_bson" : " 1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400" ,
56
56
"canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 07\" }}}"
57
57
},
58
+ {
59
+ "description" : " subtype 0x08" ,
60
+ "canonical_bson" : " 1D000000057800100000000873FFD26444B34C6990E8E7D1DFC035D400" ,
61
+ "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 08\" }}}"
62
+ },
58
63
{
59
64
"description" : " subtype 0x80" ,
60
65
"canonical_bson" : " 0F0000000578000200000080FFFF00" ,
You can’t perform that action at this time.
0 commit comments