BSON Types
BSON 데이터형
- MongoDB의 Document를 저장하기 위한 Binary Serialization Format이다.
- MongoDB의 Remote Procedure Call에 사용된다.
MongoDB BSON Types
|
Type Name
|
Type Number
|
Alias
|
Notes
|
|
Double
|
1
|
"double"
|
|
|
String
|
2
|
"string"
|
|
|
Object
|
3
|
"object"
|
|
|
Array
|
4
|
"array"
|
|
|
Binary data
|
5
|
"binData"
|
|
|
Undefined
|
6
|
"undefined"
|
※ DEPRECATED
|
|
ObjectId
|
7
|
"objectId"
|
|
|
Boolean
|
8
|
"bool"
|
|
|
Date
|
9
|
"date"
|
|
|
Null
|
10
|
"null"
|
|
|
Regular Expression
|
11
|
"regex"
|
|
|
DBPointer
|
12
|
"dbPointer"
|
※ DEPRECATED
|
|
JavaScript
|
13
|
"javascript"
|
|
|
Symbol
|
14
|
"symbol"
|
※ DEPRECATED
|
|
JavaScript code with scope
|
15
|
"javascriptWithScope"
|
※ DEPRECATED
(in MongoDB 4.4.) |
|
32-bit integer
|
16
|
"int"
|
|
|
Timestamp
|
17
|
"timestamp"
|
|
|
64-bit integer
|
18
|
"long"
|
|
|
Decimal128
|
19
|
"decimal"
|
※ New Type
(in version 3.4.) |
|
Min key
|
-1
|
"minKey"
|
|
|
Max key
|
127
|
"maxKey"
|
|
Instruction for Array (배열 관련 명령어)
- 대괄호([ ])로 여러 데이터를 한꺼번에 묶을 수 있는 데이터 타입이다.
