Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions +dj/Relvar.m
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ function insert(self, tuples, command)
blobs{end+1} = char(v); %#ok<AGROW>
end
elseif header.attributes(i).isBlob
assert(~issparse(v), ...
'DataJoint:DataType:Mismatch', ...
'The field `%s` must not be a sparse blob', ...
header.attributes(i).name);
valueStr = sprintf('%s"{M}",', valueStr);
blobs{end+1} = v; %#ok<AGROW>
else
Expand Down Expand Up @@ -363,6 +367,10 @@ function update(self, attrname, value)
valueStr = '"{S}"';
value = {char(value)};
case header.attributes(ix).isBlob
assert(~issparse(value), ...
'DataJoint:DataType:Mismatch', ...
'The field `%s` must not be a sparse blob', ...
attrname);
valueStr = '"{M}"';
value = {value};
case header.attributes(ix).isNumeric
Expand Down