You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developers/applications/defining-schemas.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,17 +191,17 @@ If you do not define a schema for a table and create a table through the operati
191
191
192
192
HarperDB supports the following field types in addition to user defined (object) types:
193
193
194
-
* `String`: String/text.
195
-
* `Int`: A 32-bit signed integer (from -2147483648 to 2147483647).
196
-
* `Long`: A 54-bit signed integer (from -9007199254740992 to 9007199254740992).
197
-
* `Float`: Any number (any number that can be represented as a [64-bit double precision floating point number](https://en.wikipedia.org/wiki/Double-precision\_floating-point\_format). Note that all numbers are stored in the most compact representation available).
198
-
* `BigInt`: Any integer (negative or positive) with less than 300 digits. (Note that `BigInt` is a distinct and separate type from standard numbers in JavaScript, so custom code should handle this type appropriately.)
199
-
* `Boolean`: true or false.
200
-
* `ID`: A string (but indicates it is not intended to be human readable).
201
-
* `Any`: Any primitive, object, or array is allowed.
202
-
* `Date`: A Date object.
203
-
* `Bytes`: Binary data (as a Buffer or Uint8Array).
204
-
* `Blob`: Binary data designed for large blocks of data that can be streamed. It is recommend that you use this for binary data that will typically be larger than 20KB.
194
+
* `String`: String/text
195
+
* `Int`: A 32-bit signed integer (from -2147483648 to 2147483647)
196
+
* `Long`: A 54-bit signed integer (from -9007199254740992 to 9007199254740992)
197
+
* `Float`: Any number (any number that can be represented as a [64-bit double precision floating point number](https://en.wikipedia.org/wiki/Double-precision\_floating-point\_format). Note that all numbers are stored in the most compact representation available)
198
+
* `BigInt`: Any integer (negative or positive) with less than 300 digits (Note that `BigInt` is a distinct and separate type from standard numbers in JavaScript, so custom code should handle this type appropriately)
199
+
* `Boolean`: true or false
200
+
* `ID`: A string (but indicates it is not intended to be human readable)
201
+
* `Any`: Any primitive, object, or array is allowed
202
+
* `Date`: A Date object
203
+
* `Bytes`: Binary data as a Buffer or Uint8Array
204
+
* `Blob`: Binary data as a [Blob](../../technical-details/reference/blob.md), designed for large blocks of data that can be streamed. It is recommend that you use this for binary data that will typically be larger than 20KB.
Copy file name to clipboardExpand all lines: docs/technical-details/reference/data-types.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,13 @@ Dates can be stored as a specific data type. This is not supported in JSON, but
41
41
42
42
## Binary Data
43
43
44
-
Binary data can be stored in property values as well. JSON doesn’t have any support for encoding binary data, but MessagePack and CBOR support binary data in data structures, and this will be preserved in HarperDB. Custom Functions can also store binary data by using NodeJS’s Buffer or Uint8Array instances to hold the binary data. The GraphQL schema type name is `Bytes`.
44
+
Binary data can be stored in property values as well, with two different data types that are available:
45
+
46
+
### Bytes
47
+
JSON doesn’t have any support for encoding binary data, but MessagePack and CBOR support binary data in data structures, and this will be preserved in HarperDB. Custom Functions can also store binary data by using NodeJS’s Buffer or Uint8Array instances to hold the binary data. The GraphQL schema type name is `Bytes`.
48
+
49
+
### Blobs
50
+
Binary data can also be stored with [`Blob`s](blob.md), which can scale much better for larger content than `Bytes`, as it is designed to be streamed and does not need to be held entirely in memory. It is recommended that `Blob`s are used for content larger than 20KB.
0 commit comments