File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Expand file tree Collapse file tree 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 {
5656 static readonly SUBTYPE_ENCRYPTED = 6 ;
5757 /** Column BSON type */
5858 static readonly SUBTYPE_COLUMN = 7 ;
59+ /** Sensitive BSON type */
60+ static readonly SUBTYPE_SENSITIVE = 8 ;
5961 /** User BSON type */
6062 static readonly SUBTYPE_USER_DEFINED = 128 ;
6163
Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ export const BSON_BINARY_SUBTYPE_ENCRYPTED = 6;
109109/** Column BSON type @internal */
110110export const BSON_BINARY_SUBTYPE_COLUMN = 7 ;
111111
112+ /** Sensitive BSON type @internal */
113+ export const BSON_BINARY_SUBTYPE_SENSITIVE = 8 ;
114+
112115/** Binary User Defined Type @internal */
113116export const BSON_BINARY_SUBTYPE_USER_DEFINED = 128 ;
114117
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ describe('BSON Constants', () => {
1919 | "\x04" UUID
2020 | "\x05" MD5
2121 | "\x06" Encrypted BSON value
22+ | "\x07" Column BSON value
23+ | "\x08" Sensitive BSON value
2224 | "\x80" User defined
2325 */
2426 it ( 'Default should be 0' , ( ) => {
@@ -55,6 +57,11 @@ describe('BSON Constants', () => {
5557 expect ( constants . BSON_BINARY_SUBTYPE_COLUMN ) . to . equal ( 7 ) ;
5658 expect ( Binary . SUBTYPE_COLUMN ) . to . equal ( 7 ) ;
5759 } ) ;
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+ } ) ;
5865 } ) ;
5966 context ( 'BSON Type indicators' , ( ) => {
6067 /*
Original file line number Diff line number Diff line change 5555 "canonical_bson" : " 1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400" ,
5656 "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 07\" }}}"
5757 },
58+ {
59+ "description" : " subtype 0x08" ,
60+ "canonical_bson" : " 1D000000057800100000000873FFD26444B34C6990E8E7D1DFC035D400" ,
61+ "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 08\" }}}"
62+ },
5863 {
5964 "description" : " subtype 0x80" ,
6065 "canonical_bson" : " 0F0000000578000200000080FFFF00" ,
You can’t perform that action at this time.
0 commit comments