Skip to content

Commit 5b3ffc4

Browse files
committed
Merge branch 'blobs'
2 parents ef39ae4 + 31a34df commit 5b3ffc4

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

docs/developers/applications/defining-schemas.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,17 @@ If you do not define a schema for a table and create a table through the operati
191191

192192
HarperDB supports the following field types in addition to user defined (object) types:
193193

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.
205205

206206
#### Renaming Tables
207207

docs/technical-details/reference/data-types.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ Dates can be stored as a specific data type. This is not supported in JSON, but
4141

4242
## Binary Data
4343

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.
4551

4652
## Explicit Map/Set
4753

0 commit comments

Comments
 (0)