simon-kuster / BlazorDexie

BlazorDexie is a .NET wrapper around dexie.js for Blazor
19 stars 6 forks source link

What does AddBlob do behind the scenes? #7

Closed thepra closed 1 year ago

thepra commented 1 year ago

Hi, I would like to make use of that function but I can't understand how giving this function a byte[] and TKey? is going to add that blob to the specific field that I wish the blob gave, am I missing something or is there some implicit logic that I'm not aware?

simon-kuster commented 1 year ago

The idea behind the functions AddBlob, GetBlob, AddObjectUrl and GetObjectUrl is to have a dedicated store for the data (blob). The meta data should be stored in a differnt store. In the data store the data will be stored as blob and outbound keys will be used. That means the saved object is a blob and the key is not not part of it.

More about dexie outbound keys: https://dexie.org/docs/inbound#examples-of-outbound-primary-key

I hope my answer could clarify your question.

thepra commented 1 year ago

ok, now I got it, thanks for the clarification.