@@ -128,23 +128,13 @@ end
128128# also creates an originId as uuid4
129129addBlob! (store:: AbstractBlobStore , data) = addBlob! (store, uuid4 (), data)
130130
131- # fallback as not all blobStores use filename
132- function addBlob! (store:: AbstractBlobStore , blobId:: UUID , data, :: String )
133- return addBlob! (store, blobId, data)
134- end
135-
136- function addBlob! (store:: AbstractBlobStore{T} , data:: T , :: String ) where {T}
137- return addBlob! (store, uuid4 (), data)
138- end
139-
140131# update
141- function updateBlob! (dfg:: AbstractDFG , entry:: BlobEntry , data:: T ) where {T}
142- return updateBlob! (getBlobStore (dfg, entry. blobstore), entry, data)
132+ function updateBlob! (dfg:: AbstractDFG , entry:: BlobEntry , data)
133+ return updateBlob! (getBlobStore (dfg, entry. blobstore), entry. blobId , data)
143134end
144135
145136function updateBlob! (store:: AbstractBlobStore , entry:: BlobEntry , data)
146- blobId = isnothing (entry. blobId) ? entry. originId : entry. blobId
147- return updateBlob! (store, blobId, data)
137+ return updateBlob! (store, entry. blobId, data)
148138end
149139# delete
150140function deleteBlob! (dfg:: AbstractDFG , entry:: BlobEntry )
241231
242232function deleteBlob! (store:: FolderStore{T} , blobId:: UUID ) where {T}
243233 blobfilename = joinpath (store. folder, string (blobId))
244-
245- data = getBlob (store, blobId)
246234 rm (blobfilename)
247- return data
235+ return 1
248236end
249237
250238# hasBlob or existsBlob?
@@ -292,7 +280,8 @@ function updateBlob!(store::InMemoryBlobStore{T}, blobId::UUID, data::T) where {
292280end
293281
294282function deleteBlob! (store:: InMemoryBlobStore , blobId:: UUID )
295- return pop! (store. blobs, blobId)
283+ pop! (store. blobs, blobId)
284+ return 1
296285end
297286
298287hasBlob (store:: InMemoryBlobStore , blobId:: UUID ) = haskey (store. blobs, blobId)
@@ -430,7 +419,8 @@ function updateBlob!(store::RowBlobStore{T}, blobId::UUID, blob::T) where {T}
430419end
431420
432421function deleteBlob! (store:: RowBlobStore , blobId:: UUID )
433- return getfield (pop! (store. blobs, blobId), :blob )
422+ getfield (pop! (store. blobs, blobId), :blob )
423+ return 1
434424end
435425
436426hasBlob (store:: RowBlobStore , blobId:: UUID ) = haskey (store. blobs, blobId)
0 commit comments