SQLite Forum

Efficient array data type
Login
Not really.

CArray is about using **in SQL** arrays which live in C-memory.  

But it would be relatively easy to write something based on CArray  
which instead of accessing C-memory directly, read from an SQLite  
blob instead, and did the same kind of *decoding* (i.e. C-casts).  

But doing that, you lose portability of your data, because if you  
store C-arrays as persistent blobs, they are in whatever endianness  
your machine is in. x86 and x64 are little-endian though, while ARM  
is either I think (at least at the chip-level I believe). And of course  
blobs are opaque, so unless you encoding the type (and endianness) in  
the blob as well, or another column next to it, it's error prone. But  
it might be OK too, depends on the context.

JSON1 also does what you want, but using text instead of blobs indeed.

You basically want a mix of CArray and JSON1 :)

There's nothing like that out of the box, ready to use, but again, writing   
a custom table-valued function that decode blobs is not too difficult.