Skip to content

Commit 106f859

Browse files
committed
Update docs: use <djblob> for serialized data, longblob for raw bytes
1 parent c173356 commit 106f859

File tree

7 files changed

+18
-13
lines changed

7 files changed

+18
-13
lines changed

docs/src/compute/key-source.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ definition = """
4545
-> Recording
4646
---
4747
sample_rate : float
48-
eeg_data : longblob
48+
eeg_data : <djblob>
4949
"""
5050
key_source = Recording & 'recording_type = "EEG"'
5151
```

docs/src/compute/make.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class ImageAnalysis(dj.Computed):
152152
# Complex image analysis results
153153
-> Image
154154
---
155-
analysis_result : longblob
155+
analysis_result : <djblob>
156156
processing_time : float
157157
"""
158158

@@ -188,7 +188,7 @@ class ImageAnalysis(dj.Computed):
188188
# Complex image analysis results
189189
-> Image
190190
---
191-
analysis_result : longblob
191+
analysis_result : <djblob>
192192
processing_time : float
193193
"""
194194

docs/src/compute/populate.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class FilteredImage(dj.Computed):
4040
# Filtered image
4141
-> Image
4242
---
43-
filtered_image : longblob
43+
filtered_image : <djblob>
4444
"""
4545

4646
def make(self, key):
@@ -196,7 +196,7 @@ class ImageAnalysis(dj.Computed):
196196
# Complex image analysis results
197197
-> Image
198198
---
199-
analysis_result : longblob
199+
analysis_result : <djblob>
200200
processing_time : float
201201
"""
202202

@@ -230,7 +230,7 @@ class ImageAnalysis(dj.Computed):
230230
# Complex image analysis results
231231
-> Image
232232
---
233-
analysis_result : longblob
233+
analysis_result : <djblob>
234234
processing_time : float
235235
"""
236236

docs/src/design/integrity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ definition = """
142142
-> EEGRecording
143143
channel_idx : int
144144
---
145-
channel_data : longblob
145+
channel_data : <djblob>
146146
"""
147147
```
148148
![doc_1-many](../images/doc_1-many.png){: style="align:center"}

docs/src/design/tables/attributes.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ fractional digits.
4848
Because of its well-defined precision, `decimal` values can be used in equality
4949
comparison and be included in primary keys.
5050

51-
- `longblob`: arbitrary numeric array (e.g. matrix, image, structure), up to 4
51+
- `longblob`: raw binary data, up to 4
5252
[GiB](http://en.wikipedia.org/wiki/Gibibyte) in size.
53-
Numeric arrays are compatible between MATLAB and Python (NumPy).
53+
Stores and returns raw bytes without serialization.
54+
For serialized Python objects (arrays, dicts, etc.), use `<djblob>` instead.
5455
The `longblob` and other `blob` datatypes can be configured to store data
5556
[externally](../../sysadmin/external-store.md) by using the `blob@store` syntax.
5657

@@ -71,6 +72,10 @@ info).
7172
These types abstract certain kinds of non-database data to facilitate use
7273
together with DataJoint.
7374

75+
- `<djblob>`: DataJoint's native serialization format for Python objects. Supports
76+
NumPy arrays, dicts, lists, datetime objects, and nested structures. Compatible with
77+
MATLAB. See [custom types](customtype.md) for details.
78+
7479
- `attach`: a [file attachment](attach.md) similar to email attachments facillitating
7580
sending/receiving an opaque data file to/from a DataJoint pipeline.
7681

docs/src/design/tables/customtype.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ schema = dj.schema("mydb")
454454

455455
1. **Choose descriptive type names**: Use lowercase with underscores (e.g., `spike_train`, `graph_embedding`)
456456

457-
2. **Select appropriate storage types**: Use `longblob` for complex objects, `json` for simple structures, external storage for large data
457+
2. **Select appropriate storage types**: Use `<djblob>` for complex objects, `json` for simple structures, external storage for large data
458458

459459
3. **Add validation**: Use `validate()` to catch data errors early
460460

docs/src/design/tables/master-part.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class Segmentation(dj.Computed):
2626
-> Segmentation
2727
roi : smallint # roi number
2828
---
29-
roi_pixels : longblob # indices of pixels
30-
roi_weights : longblob # weights of pixels
29+
roi_pixels : <djblob> # indices of pixels
30+
roi_weights : <djblob> # weights of pixels
3131
"""
3232

3333
def make(self, key):
@@ -101,7 +101,7 @@ definition = """
101101
-> ElectrodeResponse
102102
channel: int
103103
---
104-
response: longblob # response of a channel
104+
response: <djblob> # response of a channel
105105
"""
106106
```
107107

0 commit comments

Comments
 (0)