added new BSON default binary subtype; fixed 0x02 binary subtype handling
parent
c186b54449
commit
0e980ed7c7
|
@ -79,9 +79,10 @@ CONSTANT: T_Integer64 HEX: 12
|
||||||
CONSTANT: T_MinKey HEX: FF
|
CONSTANT: T_MinKey HEX: FF
|
||||||
CONSTANT: T_MaxKey HEX: 7F
|
CONSTANT: T_MaxKey HEX: 7F
|
||||||
|
|
||||||
CONSTANT: T_Binary_Function HEX: 1
|
CONSTANT: T_Binary_Default HEX: 0
|
||||||
CONSTANT: T_Binary_Bytes HEX: 2
|
CONSTANT: T_Binary_Function HEX: 1
|
||||||
CONSTANT: T_Binary_UUID HEX: 3
|
CONSTANT: T_Binary_Bytes_Deprecated HEX: 2
|
||||||
CONSTANT: T_Binary_MD5 HEX: 5
|
CONSTANT: T_Binary_UUID HEX: 3
|
||||||
CONSTANT: T_Binary_Custom HEX: 80
|
CONSTANT: T_Binary_MD5 HEX: 5
|
||||||
|
CONSTANT: T_Binary_Custom HEX: 80
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,8 @@ DEFER: read-elements
|
||||||
: bson-binary-read ( -- binary )
|
: bson-binary-read ( -- binary )
|
||||||
read-int32 read-byte
|
read-int32 read-byte
|
||||||
{
|
{
|
||||||
{ T_Binary_Bytes [ read ] }
|
{ T_Binary_Default [ read ] }
|
||||||
|
{ T_Binary_Bytes_Deprecated [ drop read-int32 read ] }
|
||||||
{ T_Binary_Custom [ read bytes>object ] }
|
{ T_Binary_Custom [ read bytes>object ] }
|
||||||
{ T_Binary_Function [ read ] }
|
{ T_Binary_Function [ read ] }
|
||||||
[ drop read >string ]
|
[ drop read >string ]
|
||||||
|
|
|
@ -56,7 +56,7 @@ DEFER: write-pair
|
||||||
|
|
||||||
TYPED: write-byte-array ( binary: byte-array -- )
|
TYPED: write-byte-array ( binary: byte-array -- )
|
||||||
[ length write-int32 ]
|
[ length write-int32 ]
|
||||||
[ T_Binary_Bytes write1 write ] bi ; inline
|
[ T_Binary_Default write1 write ] bi ; inline
|
||||||
|
|
||||||
TYPED: write-mdbregexp ( regexp: mdbregexp -- )
|
TYPED: write-mdbregexp ( regexp: mdbregexp -- )
|
||||||
[ regexp>> write-cstring ]
|
[ regexp>> write-cstring ]
|
||||||
|
|
Loading…
Reference in New Issue