|
11 | 11 | 'STRING', '^((var)?char|enum|date|(var)?year|time|timestamp)', ... |
12 | 12 | 'INTERNAL_BLOB', '^(tiny|medium|long)?blob$', ... |
13 | 13 | 'EXTERNAL_BLOB', '^blob@(?<store>[a-z]\w*)$', ... |
14 | | - 'UUID', 'uuid$' ... |
| 14 | + 'INTERNAL_ATTACH', '^attach$', ... |
| 15 | + 'EXTERNAL_ATTACH', '^attach@(?<store>[a-z]\w*)$', ... |
| 16 | + 'FILEPATH', '^filepath@(?<store>[a-z]\w*)$', ... |
| 17 | + 'UUID', '^uuid$' ... |
15 | 18 | ) |
16 | | - SPECIAL_TYPES = {'UUID', 'EXTERNAL_BLOB'} |
17 | | - EXTERNAL_TYPES = {'EXTERNAL_BLOB'} % data referenced by a UUID in external tables |
18 | | - SERIALIZED_TYPES = {'EXTERNAL_BLOB'} % requires packing data |
| 19 | + SPECIAL_TYPES = {'UUID', 'INTERNAL_ATTACH', 'EXTERNAL_ATTACH', 'EXTERNAL_BLOB', ... |
| 20 | + 'FILEPATH', 'ADAPTED'} |
| 21 | + % data referenced by a UUID in external tables |
| 22 | + EXTERNAL_TYPES = {'EXTERNAL_ATTACH', 'EXTERNAL_BLOB', 'FILEPATH'} |
| 23 | + % requires packing data |
| 24 | + SERIALIZED_TYPES = {'EXTERNAL_ATTACH', 'INTERNAL_ATTACH', 'EXTERNAL_BLOB', ... |
| 25 | + 'INTERNAL_BLOB'} |
19 | 26 | end |
20 | 27 |
|
21 | 28 | methods(Static) |
@@ -313,6 +320,8 @@ case regexp(line, ['^[a-z][a-z\d_]*\s*' ... % name |
313 | 320 | % category: <string> DataJoint type match based on TYPE_PATTERN. |
314 | 321 | if strcmpi(category, 'UUID') |
315 | 322 | field.type = dj.internal.Declare.UUID_DATA_TYPE; |
| 323 | + elseif strcmpi(category, 'INTERNAL_ATTACH') |
| 324 | + field.type = 'LONGBLOB'; |
316 | 325 | elseif any(strcmpi(category, dj.internal.Declare.EXTERNAL_TYPES)) |
317 | 326 | field.store = strtrim(field.type((strfind(field.type,'@')+1):end)); |
318 | 327 | field.type = dj.internal.Declare.UUID_DATA_TYPE; |
|
0 commit comments